Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Nenad Vidovic <nenad@swi.com>
Subject: Process states from 'ps' and using a C function differ.
Date: 1999/01/26	[thread overview]
Message-ID: <36AE29FE.3461DAD8@swi.com> (raw)

Hi!

The ps command shows several different process states:  R (running), S
(sleeping < 20 s), I (sleeping > 20s), T (stopped), U (uninterruptible
sleeping), H (halted).

On the other hand, to determine proc info from using a C function
requires /usr/include/sys/procfs.h, and this file lists the states in
the same way excepts for: S (sleeping), I (intermediate state of task
creation).

Basically, the state "I" means two different things, depending on
whether the info is retrieved from "ps" or from a C function.  e.g.,
"ps" will list 15 sleeping, 65 idle, but the C function will list 80
sleeping (i.e. a combination of S and I using "ps"), and none in the "I"
state.

How do we get the number of idle processes using the C function?
What is the difference between the "I" state in "ps" and in procfs.h?
Thanks for answers......

Regards,
Nenad




                 reply	other threads:[~1999-01-26  5:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox