Added prependability to the table
This commit is contained in:
parent
544fa567fd
commit
67d9375e40
@ -51,6 +51,8 @@ sub diskheader {
|
||||
printf("%-10s", "Time"); for (@disks) {printf("%-5s",$_);} printf("\n");
|
||||
}
|
||||
sub headerlines {printf("%-10s", "---------+"); for (@disks) {printf("%-5s","----+");} printf("\n");}
|
||||
my $preheaded=0;
|
||||
printf("\n"); # placeholder ;)
|
||||
diskheader();
|
||||
headerlines();
|
||||
my $headertracker=0;
|
||||
@ -75,6 +77,14 @@ while (1) {
|
||||
}
|
||||
close $cmd;
|
||||
}
|
||||
# We can't get the basic stats until at least one run-through of the smart output
|
||||
# so this prepends the types of disks to the table header
|
||||
if (not $preheaded) {
|
||||
printf("%s",`tput cuu1; tput cuu1; tput cuu1; tput cub 80`);
|
||||
diskheader();
|
||||
printf("%s\n",`tput cub 80;`);
|
||||
$preheaded=1;
|
||||
}
|
||||
printf("\n");
|
||||
printf("%s","Sleeping for $INTERVAL seconds...");
|
||||
$headertracker=$headertracker+1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user