Operating System - HP-UX
1845896 Members
5487 Online
110250 Solutions
New Discussion

the command ps and how to get all the flags thrown to it

 
Daniel J. Doughty
New Member

the command ps and how to get all the flags thrown to it

In solaris I can use /usr/ucb/ps auxww and I will be able to see all the flags that were thrown to a process when it was called. Is there a similar way to do that in HP? The processes I'm talking about receive about 5 lines of text, so using the xpg4 version and reordering the data isn't feasible.

Thanks,
Dan
Everything's simple until you try and do it.
2 REPLIES 2
James R. Ferguson
Acclaimed Contributor

Re: the command ps and how to get all the flags thrown to it

Daniel:

This has come up several times lately. Unfortunately, only a subset of the whole command string is saved by 'ps'. An old document (#1653012245) notes that "the pstat kernel code data structures were modified in 8.0 and the command string length was reduced to 60 characters. There is no standard for this length...[and] this length
should not be relied on in future releases."

This is consistent with the man pages for ps which also note: "Users of ps must not rely on the exact field widths and spacing of its output, as these will vary depending on the system, the release of HP-UX, and the data to be displayed."

...JRF...
Alan Riggs
Honored Contributor

Re: the command ps and how to get all the flags thrown to it

Unfortunately, James is right. It is one of the things I would like to see changed in future HP releases, but I am not holding my breath.

The best workaround I know is to replace the binary/script in quesion with a wrapper which calls your program while recording the flags & PID in a logfile.