- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to get status of 2 process only
Operating System - HP-UX
1755433
Members
3422
Online
108832
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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 04:06 AM
04-08-2009 04:06 AM
Re: How to get status of 2 process only
Hi John:
> so could you provide me command to check process with 2 or 3 process names, not ID?
Dennis already pointed you in the direction you need --- finding a process _by_name_ without using 'grep'. For example:
# UNIX95= ps -C cron -C syslogd -o pid= -o comm=
...would find and list the pid and the name of the processes named "cron" and "syslogd".
The equal symbol following the 'ps' field name suppresses the heading. The '-C name' switch/argument is valid only when the UNIX95 variable is set. Writing 'UNIX95= ' with whitespace before the command that follows, _without_ any semicolon, sets the variarble only for the duration of the command line. You don't want it capriciously set in your environment as it impacts the behavior of many commands in subtle ways.
Dennis prefers to write something like 'UNIX95=EXTENDED_PS' which could just as well be 'UNIX95=1' _but_ not 'UNIX95=0' as you might infer would turn it _off_. ANY lvalue use of UNIX95 will turn it _on_. Beware.
Regards!
...JRF...
> so could you provide me command to check process with 2 or 3 process names, not ID?
Dennis already pointed you in the direction you need --- finding a process _by_name_ without using 'grep'. For example:
# UNIX95= ps -C cron -C syslogd -o pid= -o comm=
...would find and list the pid and the name of the processes named "cron" and "syslogd".
The equal symbol following the 'ps' field name suppresses the heading. The '-C name' switch/argument is valid only when the UNIX95 variable is set. Writing 'UNIX95= ' with whitespace before the command that follows, _without_ any semicolon, sets the variarble only for the duration of the command line. You don't want it capriciously set in your environment as it impacts the behavior of many commands in subtle ways.
Dennis prefers to write something like 'UNIX95=EXTENDED_PS' which could just as well be 'UNIX95=1' _but_ not 'UNIX95=0' as you might infer would turn it _off_. ANY lvalue use of UNIX95 will turn it _on_. Beware.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2009 04:20 AM
04-08-2009 04:20 AM
Re: How to get status of 2 process only
Thanks to all...
- « Previous
-
- 1
- 2
- Next »
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP