UNIX95 not fully working in a system container (679 Views)
Reply
Occasional Advisor
malc_p
Posts: 16
Registered: ‎01-15-2014
Message 1 of 12 (679 Views)

UNIX95 not fully working in a system container

Hi all

Here's an interesting one...

 

We're running 11.11 system containers under an 11.31 Itanium host, and have successfuly converted our system to run on it; but one thing (among several...) that isn't working the same is using UNIX95 to get a hierarchical 'ps' listing, i,e,

 

UNIX95= ps -xHfu<user>

 

gives us no output (where 'ps -xfu<user>' does but with no hierarchy shown)

 

We can use it on the host, no problem, but we do some process management on the containers that it came in very useful for before we virtualised, and now it doesn't work. Any ideas please?

Thanks

Acclaimed Contributor
Dennis Handly
Posts: 25,294
Registered: ‎03-06-2006
Message 2 of 12 (656 Views)

Re: UNIX95= ps not fully working in a system container

>UNIX95= ps -xHfu <user>

 

Do you have an alias for ps(1)?  Try:

UNIX95= \ps -xHfu <user>

Occasional Advisor
malc_p
Posts: 16
Registered: ‎01-15-2014
Message 3 of 12 (651 Views)

Re: UNIX95= ps not fully working in a system container

No, ps is /usr/bin/ps (I also checked using the fully qualified pathname and get the same result) so not an alias; all we get is:

 

dba:>UNIX95= ps -Hxfudba                            
UID        PID  PPID  C    STIME TTY          TIME CMD                         
dba:>

 

...whereas 'ps-xfudba' gives a whole slew of processes (as expected)

 

NB we're running ksh; we get the same result in Bourne shell

 

 

Acclaimed Contributor
Dennis Handly
Posts: 25,294
Registered: ‎03-06-2006
Message 4 of 12 (627 Views)

Re: UNIX95= ps not fully working in a system container

[ Edited ]

>UNIX95= ps -Hxfudba                            

Have you tried tusc on it?

 

>we get the same result in Bourne shell

 

There shouldn't be any Bourne shells, did you mean Posix?  /usr/bin/sh is Posix.

Occasional Advisor
malc_p
Posts: 16
Registered: ‎01-15-2014
Message 5 of 12 (621 Views)

Re: UNIX95= ps not fully working in a system container

No, I meant in /bin/sh, which is Bourne.

 

It seems all the XPG4-only options fail, not just H.

 

 

Honored Contributor
Patrick Wallek
Posts: 13,787
Registered: ‎06-21-2000
Message 6 of 12 (618 Views)

Re: UNIX95= ps not fully working in a system container

>>No, I meant in /bin/sh, which is Bourne.

 

Actually, it's not.  /bin/sh and /sbin/sh are POSIX shells, NOT bourne shells.

 

From 'man sh':

 

 Remarks
      The POSIX .2 standard requires that, on a POSIX-compliant system,
      executing the command sh activates the POSIX shell (located in file
      /usr/bin/sh on HP-UX systems), and executing the command man sh
      produces an on-line manual entry that displays the syntax of the POSIX
      shell command-line.

 

If I recall correctly the Bourne shell is actually in /usr/old/bin/sh.

 

 

 

 

 

 

Acclaimed Contributor
Dennis Handly
Posts: 25,294
Registered: ‎03-06-2006
Message 7 of 12 (613 Views)

Re: UNIX95= ps not fully working in a system container

>If I recall correctly the Bourne shell is actually in /usr/old/bin/sh.

 

Yes it's there for 11.11.  For 11.31, I don't see it there or in /usr/old/usr/bin/.

 

And "UNIX95= ps -Hxfu <user>" works fine on my 11.11 system.

Occasional Advisor
malc_p
Posts: 16
Registered: ‎01-15-2014
Message 8 of 12 (604 Views)

Re: UNIX95= ps not fully working in a system container

Whatever! Bourne, shmourne.

 

The issue remains that ps -H (with UNIX95 set) worked fine on our old system on an HP9000 running 11.11 and now we're virtualised, ps -H doesn't work any more.

 

Any clues as to why/where I can look please?

 

Thanks

Acclaimed Contributor
Dennis Handly
Posts: 25,294
Registered: ‎03-06-2006
Message 9 of 12 (600 Views)

Re: UNIX95= ps not fully working in a system container

[ Edited ]

>Any clues as to why/where I can look please?

 

Well, you can try HPSC.

But tusc is your friend.  I suppose I could take my 11.11 ps(1) and run on 11.31 and see what happens.

Honored Contributor
Bill Hassell
Posts: 14,226
Registered: ‎05-29-2000
Message 10 of 12 (578 Views)

Re: UNIX95 not fully working in a system container

I can confirm that on an Itanium box, running a container with 11.11 and another running 10.20, both fail to report -H correctly.

 

On 11.11:

 

# UNIX95=1 ps -eH
  PID TTY          TIME CMD
25675 ?           00:00 autofskd_12

# ps -e
  PID TTY          TIME CMD
25661 ?           00:00 nfsmapid
25791 ?           00:00 httpd
28612 ?           00:00 sshd:
25488 ?           00:00 srp_init
25681 ?           00:00 inetd
25725 ?           00:00 cron
25655 ?           00:00 nfs4cbd
25587 ?           00:00 sshd
28614 pts/0       00:00 -sh
25792 ?           00:00 httpd
25597 ?           00:00 rpcbind
25721 ?           00:00 lpsched
25812 ?           00:02 prngd
25793 ?           00:00 httpd
25760 ?           00:04 nmbd
25728 ?           00:00 swagentd
25789 ?           00:02 httpd
25576 ?           00:00 syslogd
25763 ?           00:00 smbd
25675 ?           00:00 autofskd_12
25788 ?           00:00 smbd
25628 ?           00:00 rpc.statd
25634 ?           00:00 rpc.lockd
25673 ?           00:06 automountd
28930 pts/0       00:00 ps

 

 

On 10.20:

# UNIX95=1 ps -eH
  PID TTY          TIME CMD
 5981 ?        00:00:00 nfssrp_kdaemon
 5994 ?        00:00:00 autofskd_13

# ps -e
  PID TTY          TIME CMD
 5951 ?        00:00:00 rpc.lockd
 5998 ?        00:00:00 inetd
 5945 ?        00:00:00 rpc.statd
 6054 ?        00:00:00 sh
28945 pts/ta   00:00:00 -sh
 5978 ?        00:00:00 nfsmapid
29022 pts/ta   00:00:00 ps
 7737 ?        00:00:00 sshd
 6043 ?        00:00:00 cron
 5981 ?        00:00:00 nfssrp_kdaemon
 5972 ?        00:00:00 nfs4cbd
 5932 ?        00:00:00 rpcbind
 5992 ?        00:00:05 automountd
 5920 ?        00:00:00 syslogd
 5850 ?        00:00:00 srp_init
 5994 ?        00:00:00 autofskd_13
 6306 ?        00:00:00 dtlogin
 6015 ?        00:00:00 sendmail:
 6046 ?        00:00:00 swagentd
28944 pts/ta   00:00:00 telnetd

 

Looks like a feature -- haven't tried 11.23 in a container yet.

 

 

Occasional Advisor
malc_p
Posts: 16
Registered: ‎01-15-2014
Message 11 of 12 (571 Views)

Re: UNIX95 not fully working in a system container

Bill, thanks - it's not just me then, I was beginning to worry...!

 

I'll raise it with HP, might just be some simple step I can run in the global.

 

Appreciate your help.

 

Malc

 

 

HP Pro
Rajesh K Chaurasia
Posts: 76
Registered: ‎01-31-2008
Message 12 of 12 (507 Views)

Re: UNIX95 not fully working in a system container

In HP 9000 containers the default configuration is to emulate legacy PA-RISC HP-UX environment which impacts emulation of XPG signals and semantics. Please refer to .ariesrc file in container root directory (not host root). You may notice an ARIES option which looks like -compat_legacy and/or -compat_sig. I suggest adding a new line for ps command as below

 

/usr/bin/ps    -nocompat_legacy -nocompat_sig

 

Then try UNIX95 variant of ps option, hopefully it should work.

 

Regards

-Rajesh

 

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.