I see from your other question that you are using hp-ux. I have bad news. HP has removed most of the information from sys/proc.h and as a result this is no longer possible with hp-ux. To get a feel for accessing kernel structures see
this thread.
With hp-ux, pstat() is all that's left.