top(1) STATE column

Dan Nelson dnelson at allantgroup.com
Sat Sep 16 20:16:40 PDT 2006


In the last episode (Sep 16), Pietro Cerutti said:
> I'd like to know the meaning of the possible STATEs showing up in
> top. In the manual pages I found this:
> 
>       STATE is the current state (one of "START", "RUN" (shown as
>       "CPUn" on SMP systems), "SLEEP", "STOP", "ZOMB", "WAIT", "LOCK"
>       or the event on which the process waits)
> 
> Where can I found info about other possible states (nanslp, kserel,
> ttyin, ucond, sbwait, ...) that I usually see in top?
> 
> I think these have to do with the "the event on which the process
> waits" part of the man page... isn't there any complete list on
> those?

They're only documented in the source, as far as I know.  A quick grep
comes up with around 300 different unique waits and mutexes in the
kernel:

find /sys -name "*.c" | xargs grep 'sleep(.*".*"' | sed -e 's/^.*\"\(.*\)\".*$/\1/' | sort -u | wc -l

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list