1831929 Members
3636 Online
110031 Solutions
New Discussion

XPG4 version of ps

 
SOLVED
Go to solution
Norman Lowe
Frequent Advisor

XPG4 version of ps

The man page for the ps command includes information on an XPG4 version. This version doesn't seem to be on my system ,only the regular version in /usr/bin. How can the XPG version be installed?
3 REPLIES 3
H.Merijn Brand (procura
Honored Contributor

Re: XPG4 version of ps

Have you tried the environment variable UNIX95?

# env UNIX95=1 ps ...

completely different behaviour of the same program
Enjoy, Have FUN! H.Merijn
James R. Ferguson
Acclaimed Contributor
Solution

Re: XPG4 version of ps

Hi Norman:

The XPG4 variations are armed by setting the UNIX95 variable. While you could set this and propagage (export) it to your running environment this my cause other standard commands (including 'ps') to behave unexpectedly when you run them. A better choice is to set the variable *only* for the duration of the command line. Consider:

# UNIX95= ps -e -o "user,vsz,pid,ppid,args"|sort -rnk

Note the blank (space) charater after the equal sign and before the 'ps' command. In this example you can obtain a list of processes by virtual size, sorted from largest to smallest.

Regards!

...JRF...
Mark Henry_3
Occasional Contributor

Re: XPG4 version of ps

Thanks guys.. this looks like the stuff..

Mark