Re: vmstat -w not honored

2013-02-15 Thread Lowell Gilbert
Fleuriot Damien m...@my.gd writes:

 I'm running 8.3-STABLE and apparently, vmstat won't honor both -i
 (interrupts) and -w (repeat display every wait delay seconds) flags at
 the same time.
 The problem also arises with -z.

 The manual doesn't mention these flags being incompatible with -w.

They are. And with -c as well. *Only* the actual VM-related information
display supports the looping. [The full set of flags incompatible with 
w and c is: f, i, m, s, z.

 Anyone knows if this is intended behavior ?

A better question would be whether it would actually be useful to
change. In theory, other display routines could be modified to
repeat. But their output formats would have to change, to fit all of the
output on a single line. That would be a lot less readable for humans.

If you've got an idea for what it could look like, I'd be happy to
implement it for you. It would also have to figure out what the results
would be if multiple kinds of output (e.g., interrupt counts *and*
virtual memory) were specified. For the one-shot types of output, you
can get more than one in a single command. 

 I wanna make sure before filling a PR, either to get this fixed or the man 
 pages adjusted.

Well, the following patch will at least warn the user about it at run time:

--- vmstat.c(revision 246551)
+++ vmstat.c(working copy)
@@ -304,6 +304,8 @@
reps = -1;
} else if (reps)
interval = 1 * 1000;
+if (interval  !(todo  VMSTAT))
+warnx(Ignoring repeat request: cannot repeat on this type of 
output);
 
if (todo  FORKSTAT)
doforkst();
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


vmstat -w not honored

2013-02-13 Thread Fleuriot Damien
Hello list,


I'm running 8.3-STABLE and apparently, vmstat won't honor both -i (interrupts) 
and -w (repeat display every wait delay seconds) flags at the same time.
The problem also arises with -z.

The manual doesn't mention these flags being incompatible with -w.



Anyone knows if this is intended behavior ?

I wanna make sure before filling a PR, either to get this fixed or the man 
pages adjusted.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org