Subject: Re: changes to top to print wchan for sleeping procs
To: None <enami@but-b.or.jp>
From: John Darrow <John.P.Darrow@wheaton.edu>
List: tech-userlevel
Date: 01/17/2001 16:30:37
Laine Stump <lainestump@rcn.com> wrote:
>Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de> writes:
>> On Wed, 17 Jan 2001, enami tsugutomo wrote:
>> > Here is my local mod to top(1) to print wchan for sleeping process.
>> > Some of us also likes this change. So, I'd like to commit this. Is
>> > there any objection or thoughts? Especially, is it better to have a
>> I think it's confusing as see seem to have a whole bunch of new CPU states
>> now. replacing wchan in favour of wchan, and leaving the old state avoids
>> this.
>Isn't it the case that the STATE column is more or less redundant
>when there is anything of interest in WCHAN? After all, it's always
>"sleep". And when STATE isn't "sleep", WCHAN is empty - you have two
>columns whose information can be completely contained in a single
>column. Aside from that, if you put a separate column for WCHAN,
>either the display must be wider than 80 columns, or you must get rid of
>something else.
>I like the patch the way it is. The only possible change I might
>suggest (and there probably isn't enough room for it on the line
>anyway) would be to give some sort of indication *in the same column*
>that the process is actually in a sleep state. Maybe, eg, "(S)select",
>"S-select", "W-select", "(select)", or something like that.
How about if we do the non-wait-channel states in CAPS, and the wait
channels in small letters? This should be pretty clearly visible...
This would even work with the cpu indicators (which I like).
We could even change the header to indicate this. Thus you'd have
something like:
PID USERNAME PRI NICE SIZE RES STATE/wchn TIME WCPU CPU COMMAND
21958 enami 10 0 748K 1232K wait 0:00 0.67% 0.24% bash
4 root 18 0 0K 24M syncer 16:19 0.15% 0.15% ioflush
21957 root 2 0 268K 1380K select 0:00 0.22% 0.10% sshd
284 enami 2 0 8200K 9520K select 56:17 0.00% 0.00% XFree86
11117 enami 36 4 20M 4K STOP 22:14 0.00% 0.00% <emacs>
23502 enami 2 0 712K 4K select 7:28 0.00% 0.00% <slogin>
2863 enami 28 0 1820K 4K STOP 3:44 0.00% 0.00% <w3m>
287 enami 2 0 396K 4K select 1:23 0.00% 0.00% <kterm>
166 root 2 0 48K 348K nfsd 1:02 0.00% 0.00% nfsd
215 root 28 0 10M 35M RUN 8:02 0.10% 0.10% XF86_SVGA
11314 root -12 -20 152K 520K ONPROC 0:00 0.00% 0.00% top
jdarrow
--
John Darrow - Senior Technical Specialist Office: 630/752-5201
Computing Services, Wheaton College, Wheaton, IL 60187 Fax: 630/752-5968
Alphapage: 6303160707@alphapage.airtouch.com Pager: 630/316-0707
Email: John.P.Darrow@wheaton.edu