[OmniOS-discuss] how can i use handy utilities like top, htop, nano, etc in omniOS.

Jim Klimov jimklimov at cos.ru
Mon Sep 9 08:16:47 UTC 2013


On 2013-09-06 16:03, Chris Nehren wrote:
> htop, if it's anything like top, is horrible for CPU usage:
> http://www.brendangregg.com/DTrace/prstatvstop.html

Enlightening article, thanks for pointing to it (and for writing).

One nit so far: in the middle, part about syscall overheads, I think
there is an order-of-magnitude problem, which makes the difference
between the tools even more glaring: unless I am misreading something,
in the example prstat open()s consume 2.3ms, not 23 (2339907), compared
to 210ms in top. (Besides, 57+23 would add up to almost all of the 81ms)

On another hand, if top does them 10 times (once per screen update) and
prstat does them once, the diffference should indeed be around 10 times.
Something does not add up, IMHO :)

> However, the reason for this extra overhead is the iteration over
 > processes in /proc, so for servers running hundreds of processes
 > the overhead will be greater (on this server only 95 processes
 > were running).

Interesting point... however, while "ps -ef" outputs do lag noticeably
(several seconds) on a Thumper with about 1000-2000 processes (many
local zones) before outputting a list of programs, "top" does not...

Finally, my "real" questions are below:
1) Is it a problem (limits, buffers) that prstat would require more
    allowed open filehandles?
2) What happens if the user running prstat is not allowed to use so
    many handles (by limits or other resource constraints)?
3) Does prstat "fail over" to displaying new processes if a PID is
    reused quickly (between screen refreshes) for some reason>
4) Is there any possible improvement in rewriting prstat in DTrace? ;)
5) If prstat is so great, and top output is so convenient, how come
    nobody made a top-like interface for prstat engine? Should an RFE
    be filed into illumos tracker to this effect? ;)

Thanks,
//Jim Klimov



More information about the OmniOS-discuss mailing list