- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: long output for PS command
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
Forums
Discussions
Discussions
Discussions
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
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
08-25-2003 09:38 AM
08-25-2003 09:38 AM
long output for PS command
These commands print the PID of the process.
Linux:
ps -auwwwx | grep gravitixagent | grep -v grep|awk '{print $2}'
Solaris:
/usr/ucb/ps -auwwwx | grep gravitixagent | grep -v grep|awk '{print $2}'
HP : ??
I'm looking for the similar command in HP which gives the output beyond 80 characters.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2003 09:50 AM
08-25-2003 09:50 AM
Re: long output for PS command
In 11i & up-to-date patched 11.0 you can use the -x parameter in a ps command to get more output....
ps -efx
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2003 10:48 AM
08-25-2003 10:48 AM
Re: long output for PS command
Did you try
ps -ef
That can go more than 80 characters, with the command line . . .
but if you just want the PID, then
ps -ef | grep whatever | awk '{print $}'
will work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2003 10:53 AM
08-25-2003 10:53 AM
Re: long output for PS command
Here are a couple of scripts I use that might be of interest:
$ cat $(which psgrep)
#!/sbin/sh
# psgrep - ps and grep in one step
print " UID PID PPID C STIME TTY TIME COMMAND"
ps -fade | grep $1 | grep -v grep
$
$ cat $(which awkc)
# awkc - print out one or more columns
p=\$$( echo $1 | sed 's/,/,\$/g' )
shift
eval "awk '{ print $p }'" $*
# eof
$
Hope this helps,
Rob Pierce
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2003 11:16 AM
08-25-2003 11:16 AM
Re: long output for PS command
Jeff is correct. You should have, or download and install:
For 11.0: PHCO_26274, PHKL_29434 & PHKL_26008
These add the '-x' option to 'ps' and enable the 'pstat(2)' interface to handle the kernel's extended storage (up to 1020 characters).
For 11.11, make sure you have patch PHCO_29042.
Regards!
...JRF...