03-26-2004 04:23 AM
Could someone give me some ideas on the differences we noticed on ps -ef command for HP-UX 11.0 and HP-UX 11i systems.
On 11.0, the process name for shell scripts is correct, on 11i, the process name is "prefixed" with the Shell command.
Let me try to be more clear : the shell script is nothing more than:
I run it in bckground as './dumb.ksh &', then a ps -ef command gives me :
marcos 123 122 0 16:00:12 pts/1 0:00 ./dumb.ksh
marcos 123 122 0 16:00:12 pts/1 0:00 /usr/bin/ksh ./dumb.ksh
What can explain this difference on process name (COMMAND column of ps output)
Thanx in advance,
03-26-2004 04:36 AM
I do the same thing as you and on all machines I see the shell preceding the script name in the 'ps' output.
Perhaps it is a patching issue?
On one of my 11.0 systems I have PHCO_18446 and on the other I have PHCO_26274 both of which are 'ps cumulative' patches.
On my 11.11 system I have PHCO_29042 which is the 'ps cumulative' patch for 11.11.
03-26-2004 04:38 AM
# cat 1
# ./1 &
# ps -ef | grep ./1
root 13710 10827 0 09:37:31 pts/tb 0:00 /usr/bin/ksh ./1
root@TESTMACHINE: (/root)> uname -r
root@TESTMACHINE: (/root)> ./1 &
root@TESTMACHINE: (/root)> ps -ef | grep ./1
root 6860 6811 3 09:37:10 pts/ta 0:00 /usr/bin/ksh ./1
I see the same behaviour too !!!!
03-26-2004 03:22 PM
It caused me an issue because I used to have a script that looked for something in a line returned by a 'ps -ef' - the extra information meant that the string I was looking for no longer appeared (the length of pstat wasn't long enough).
I had to add an extra option to get more information on the pstat line (ps -efx).
I can't be 100% sure, but I think that the 'x' option was added under 11i (I don't remember it being there under 11.00, but I haven't touched an 11.00 system for ages).