- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: PID Number in the TOP
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-07-2007 04:00 AM
тАО02-07-2007 04:00 AM
I'm using HPUX 11i.
Please I would like to know how can I get the PID number in the TOP... For example
host:> top -h
CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU
3 ? 13538 oracle9i 154 20 643M 7764K sleep 0:40 4.98 4.97 oracledbscmdes
1 ? 5819 root 154 20 9632K 2848K sleep 1514:55 3.17 3.16 cupsd
0 ? 7125 root 154 20 12024K 3140K sleep 433:13 2.90 2.89 netmon
0 ? 29685 oracle9i 154 20 800M 1788K sleep 33:15 2.36 2.36 oracledbslade1
In this case I need the 13538 PID number!
By command line is it possible to get this PID number?
Please, could someone give me a help?
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2007 04:09 AM
тАО02-07-2007 04:09 AM
Re: PID Number in the TOP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2007 04:28 AM
тАО02-07-2007 04:28 AM
Re: PID Number in the TOP
Sorry, but could you show an example because my problem is exactly this... I'm not obtaining to extract the first PID on the TOP...
Thanks!!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2007 04:33 AM
тАО02-07-2007 04:33 AM
Re: PID Number in the TOP
ps -ef |grep 13538
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2007 04:36 AM
тАО02-07-2007 04:36 AM
Re: PID Number in the TOP
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2007 04:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2007 04:52 AM
тАО02-07-2007 04:52 AM
Re: PID Number in the TOP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2007 05:36 AM
тАО02-07-2007 05:36 AM
Re: PID Number in the TOP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2007 06:29 PM
тАО02-07-2007 06:29 PM
Re: PID Number in the TOP
But grep will find the children of that PID.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2007 08:50 PM
тАО02-07-2007 08:50 PM
Re: PID Number in the TOP
top -h -f top.out
awk 'NF>12&&!/^CPU/ {print $3}' top.out
This to have all the PID, if you want only the first:
awk 'NF>12&&!/^CPU/ {print $3}' top.out|head -1
HTH,
Art