Operating System - HP-UX
1752786 Members
5853 Online
108789 Solutions
New Discussion

Re: CPU consumed by a Process

 
SOLVED
Go to solution
Yogeeraj_1
Honored Contributor

Re: CPU consumed by a Process

see:
http://ou800doc.caldera.com/en/DIFFS/UNIX95_Conformance.html

No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Bill Hassell
Honored Contributor

Re: CPU consumed by a Process

A couple of notes:

There is no need to use grep with ps, especially when looking for a specific PID. Just use the -p option. Not only does it save an extra step, but it avoids the inevitable mistakes when a small PID (as in PID=123) will be found in 1123 1234 2123 and so on. It's really important to use all the options available in ps as they are 100% accurate whereas grep will match anything on the ps line.

UNIX95 is a special variable found in most flavors of Unix and is used to signal an alternate behavior in certain processes and libraries. In the case of ps, you will see the term XPG4 for several options (-C -H -o for example) and these options are invlaid if UNIX95 has not been set. But because UNIX95 affects so many other things, it is always recommended to set the value on the command line so it is temporary for the child process. Never type: export UNIX95=something as it can affect things in an odd way. The use of: UNIX95= ps... may look strange but UNIX95= is defining the variable and giving it a null value, which in the shell is very different than having an undefined variable. You can assign any value to UNIX95, as it needs to exist but the contents are irrelevant.


Bill Hassell, sysadmin