libps provides an API for accessing process information. An alternative is a Linux-compatible /proc filesystem.

IRC, OFTC, #debian-hurd, 2013-03-09

<Steap> what's the difference between PSTAT_STATE_P_STOP and
  PSTAT_STATE_T_HALT in libps/ps.h ?
<youpi> Steap: from reading the gnumach source, it seems halted threads are
  thread which have finished they work but not finished terminating yet
<youpi> while STOP is the standard preempted state
<youpi> i.e. not sleeping, but have handed cpu to another thread
<Steap> youpi: thanks. Is this "halted" state similar to anything in Linux
  ?
<youpi> TASK_DEAD, probably