Re: ps performance sucks

From: Bill Davidsen (davidsen@tmr.com)
Date: Fri Nov 08 2002 - 16:05:53 EST


On Thu, 7 Nov 2002, Albert D. Cahalan wrote:

> Are you a vmstat user? Suggestions are needed; it's getting a rewrite.
> I may even change the default format, assuming people don't all
> have scripts that parse the output. How do you like this?
>
> procs ------------memory----------- ---swap-- ----io--- --system-- ----cpu----
> r b swpd free buff cache act !act si so bi bo in cs us sy id wa
> 0 0 304k 14m 2.5m 27m 16m 23m 0 0 0 0 33 4 0 0 90 9
> 0 0 304k 14m 2.5m 27m 16m 23m 0 0 0 0 114 12 1 0 88 11
> 0 0 304k 14m 2.5m 27m 16m 23m 0 0 0 0 104 6 0 1 91 8

The reason I maintain vmstat2 (NOT based on any of your code AFAIK) is
that I want to see data rates on the non-loopback NICs. I also have a
timestamp every line option and after 2.5 settles a bit and I get the time
to find where things are I want optional stats by individual NIC, and
individual drive and partition if I can find it. It isn't in partitions
any more, and the file I was told to use doesn't exist. Maybe in devicefs?
Oh, and -M starts the output with memory sizes, for a package to generate
usage graphs with a line at physical memory size.

An option to flush the buffers after each line even when writing to a
pipe.

Line length: the w option in ps doesn't worry about it, why should vmstat?
If the user tells you to show more, do it.

vmstat2 output attached (it's wide).

-- 
bill davidsen <davidsen@tmr.com>
  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.

Script started on Fri Nov 8 15:49:56 2002 newscon02:earthquake$ vmstat2 -tkfM 10 5 MemTotal: 1551840 kB SwapTotal: 2048248 kB time load free buffs swap pgin pgou dk0 dk1 dk2 dk3 ipkt opkt int ctx usr sys idl i_netK o_netK 15.839 8.25 5.1 1412 49.0 3861 8588 10 243 0 0 6092 6264 8216 3408 35 37 28 5722.2 5785.1 15.842 9.26 7.2 1409 49.0 4272 3764 11 171 0 0 7707 8124 9772 3585 43 43 14 7369.6 7748.6 15.844 8.21 5.5 1412 49.0 3942 7688 11 232 0 0 6351 6281 8554 3289 30 42 28 6412.7 5618.9 15.847 7.77 6.7 1410 49.0 4932 5029 15 202 0 0 7813 7886 10072 3469 42 44 14 7639.9 7342.0 15.850 7.99 7.0 1410 49.0 4367 5976 7 211 0 0 6907 6953 9045 3467 37 38 25 6721.5 6456.4 newscon02:earthquake$ exit Script done on Fri Nov 8 15:56:08 2002 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Nov 15 2002 - 22:00:16 EST