- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to get status of 2 process only
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
тАО04-08-2009 02:44 AM
тАО04-08-2009 02:44 AM
Which option i should use with ps command to know the status of 2 processes only?
Regards,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2009 02:49 AM
тАО04-08-2009 02:49 AM
Re: How to get status of 2 process only
ps -exlf| grep -ie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2009 02:56 AM
тАО04-08-2009 02:56 AM
Re: How to get status of 2 process only
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2009 02:59 AM
тАО04-08-2009 02:59 AM
Re: How to get status of 2 process only
UNIX95=EXTENDED_PS ps -f -C name1 -C name2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2009 03:07 AM
тАО04-08-2009 03:07 AM
Re: How to get status of 2 process only
Rana i didn't get your command well,
could you pls. clear it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2009 03:08 AM
тАО04-08-2009 03:08 AM
Re: How to get status of 2 process only
I tried your command but it prints all processes not the grep processes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2009 03:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2009 03:24 AM
тАО04-08-2009 03:24 AM
Re: How to get status of 2 process only
#ps -ef |egrep '(PID1|PID2)'
or
#ps -fp PID1,PID2
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2009 03:49 AM
тАО04-08-2009 03:49 AM
Re: How to get status of 2 process only
that's strange. I tried to grep for diag and bash processes and it works:
root@vl1:(/)#ps -ef | grep -e diag -e bash
root 2147 2128 0 22:39:49 console 0:00 bash
root 1712 1 0 22:39:06 ? 0:01 /usr/sbin/stm/uut/bin/sys/diagmond
root 2494 1712 0 22:49:36 ? 0:00 diaglogd
root 25575 25278 0 13:46:59 pts/0 0:00 grep -e diag -e bash
novakj 25242 25240 0 13:34:34 pts/0 0:00 -bash
root 25278 25262 0 13:34:40 pts/0 0:00 bash
Jozef
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2009 03:52 AM
тАО04-08-2009 03:52 AM
Re: How to get status of 2 process only
I tried ps -fp PID1,PID2 it works fine, but also i need to use by process name as process id could be changed. so could you provide me command to check process with 2 or 3 process names, not ID?