From b5c6ed0d4b57462e97f12a526f7ea324a601c154 Mon Sep 17 00:00:00 2001 From: Pascal666 Date: Sun, 4 Mar 2018 21:15:15 -0600 Subject: [PATCH] Print stats since boot for first line init() already calls snap_stats(), don't call it again the first time through. --- arcstat.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arcstat.pl b/arcstat.pl index b585356..fb4cb81 100755 --- a/arcstat.pl +++ b/arcstat.pl @@ -352,12 +352,12 @@ sub main { if ($count > 0) { $count_flag = 1; } while (1) { print_header() if ($i == 0); - snap_stats(); calculate(); print_values(); last if ($count_flag == 1 && $count-- <= 1); $i = (($i == $hdr_intr) && (not $raw_output)) ? 0 : $i+1; sleep($int); + snap_stats(); } close($out) if defined $out; }