- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ps cmmand syntax
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-06-2011 11:54 PM
тАО02-06-2011 11:54 PM
ps cmmand syntax
I want to get vsz of the process .
What is the syntax ...
/run>ps -help
ps: illegal option -- h
ps: option requires an argument -- p
usage: ps [-edaxzflP] [-u ulist] [-g glist] [-p plist] [-t tlist] [-R prmgroup] [-Z psetidlist]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2011 12:23 AM
тАО02-07-2011 12:23 AM
Re: ps cmmand syntax
The correct command for help is: man ps
http://h20000.www2.hp.com/bc/docs/support/SupportManual/c02264235/c02264235.pdf
To get vsz you need to use -o:
UNIX95=EXTENDED_PS ps -p PID -opid,vsz,comm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2011 10:25 PM
тАО02-07-2011 10:25 PM
Re: ps cmmand syntax
Please advice other ...
/run>ps -eo vsz
ps: illegal option -- o
usage: ps [-edaxzflP] [-u ulist] [-g glist] [-p plist] [-t tlist] [-R prmgroup] [-Z psetidlist]
/run>uname -a
HP-UX XXXXXX B.11.11 U 9000/800 2311410363 unlimited-user license
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2011 11:32 PM
тАО02-07-2011 11:32 PM
Re: ps cmmand syntax
If this variable is set a bunch of system commands behave differently (aka XPG4 behavior).
As for the ps command itself, when run in that environment it will recognise the -o (and further) options (read man ps).
Because not only the ps command will be affected by a set UNIX95 env var it usually is wise to set UNIX95 only temporarily instead for the whole shell session. That's why Dennis prepended the UNIX95 string to the actual ps command (another way would have been to use the env command, but this would have required a little more typing).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-08-2011 12:18 AM
тАО02-08-2011 12:18 AM
Re: ps cmmand syntax
/run>env | grep U
COLUMNS=80
UNIX95=EXTENDED_PS
/gxs20/run>
/run>ps -p 5306 -opid,comm,stime,time,pcpu,state,vsz
PID COMMAND STIME TIME %CPU S VSZ
5306 java Jan 31 02:23:02 2.79 R 51260
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-08-2011 06:10 AM - last edited on тАО08-08-2011 11:55 AM by Kevin_Paul
тАО02-08-2011 06:10 AM - last edited on тАО08-08-2011 11:55 AM by Kevin_Paul
Re: ps cmmand syntax
>UNIX95=EXTENDED_PS
As mentioned by Ralph, this is probably NOT what you want to do. This causes all sorts of changes in commands that may break your scripts/expectations.
Instead you should do:
UNIX95=EXTENDED_PS ps -p 5306 -opid,comm,stime,time,pcpu,state,vsz
By setting UNIX95, you have also turned on FIDDLE_WITH_FIND_TIMES:
http://h30499.www3.hp.com/t5/System-Administration/need-to-remove-files-older-that-1-day/m-p/4341484#M343630
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-08-2011 05:59 PM
тАО02-08-2011 05:59 PM
Re: ps cmmand syntax
UNIX95= ps -p 5306 -opid,comm,stime,time,pcpu,state,vsz
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-08-2011 11:48 PM
тАО02-08-2011 11:48 PM
Re: ps cmmand syntax
and I often myself prefer for the sake of laziness the non-assigning command-scope definition "UNIX= ps ...".
(Is this correct spelling? I'm never sure about hyphenation in English. Sure, in German we make ample use of hyphens and noun concatenations to form impressive word monsters; e.g. http://www.crossmyt.com/hc/linghebr/awfgrmlg.html)
On the other hand, in a script I would rather prefer Dennis' allusive, intuitive and self-explanatory assignment of "UNIX95=EXTENDED_PS ps ...".