Merge "vmstat: Fix -n flag"
This commit is contained in:
commit
52d5dfc8d3
1 changed files with 2 additions and 2 deletions
|
|
@ -75,7 +75,7 @@ int vmstat_main(int argc, char *argv[]) {
|
||||||
int toggle, count;
|
int toggle, count;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
iterations = 0;
|
iterations = -1;
|
||||||
delay = 1;
|
delay = 1;
|
||||||
header_interval = 20;
|
header_interval = 20;
|
||||||
|
|
||||||
|
|
@ -119,7 +119,7 @@ int vmstat_main(int argc, char *argv[]) {
|
||||||
if (!header_interval)
|
if (!header_interval)
|
||||||
print_header();
|
print_header();
|
||||||
read_state(&s[1 - toggle]);
|
read_state(&s[1 - toggle]);
|
||||||
while ((iterations == 0) || (iterations-- > 0)) {
|
while ((iterations < 0) || (iterations-- > 0)) {
|
||||||
sleep(delay);
|
sleep(delay);
|
||||||
read_state(&s[toggle]);
|
read_state(&s[toggle]);
|
||||||
if (header_interval) {
|
if (header_interval) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue