- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Process ID
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
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
06-13-2009 07:55 AM
06-13-2009 07:55 AM
Process ID
Which one is PID?
# ps -ef|grep sam
root 24702 24222 0 21:19:59 pts/tb 0:00 grep sam
Please give me the full description of this line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2009 08:33 AM
06-13-2009 08:33 AM
Re: Process ID
root >> The login name of the real process owner.
24702 >>The process ID number of the process.
24222 >>The process ID number of the parent process.
21:19:59>>Starting time of the process. If the elapsed time
is greater than 24 hours, the starting date is
displayed instead.
pts/tb>>The controlling terminal for the process
0:00 >>The cumulative execution time for the process
grep sam >> process
Rgds
Johnson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2009 10:36 AM
06-13-2009 10:36 AM
Re: Process ID
> Please give me the full description of this line.
And why not ask the manpages? You will learn a great deal from them.
That said, rather than fuzzily matching the basename of a process with 'grep', use the UNIX95 extensions of 'ps':
# UNIX95= ps -f -C cron
Note that the UNIX95 (otherwise known as XPG4) behavior is confined to the command line only by writing 'UNIX95= ps' without any semicolon after the "=" and before the command. Do not set UNIX95 in your profile nor export it to your environment. It affects different commands in different ways and you need to know when and how.
By the way, in your posted command, no process named 'sam' was found. Rather a process named 'grep' with an argument named "sam" was returned!
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2009 10:56 AM
06-13-2009 10:56 AM
Re: Process ID
If you pipe the output to head(1) or more(1) you'll get the titles for each column, that you can match up to the man page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2009 08:29 PM
06-13-2009 08:29 PM
Re: Process ID
ps -ef |head -1
UID PID PPID C STIME TTY TIME COMMAND
now for your case
root 24702 24222 0 21:19:59 pts/tb 0:00 grep sam
so the first one PID is the process ID
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2009 10:28 PM
06-13-2009 10:28 PM
Re: Process ID
process for your "grep" command, not for a
"sam" process, which is what you seem to be
looking for.