- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- #ps -ef | grep pmon
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
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
тАО07-10-2006 02:44 AM
тАО07-10-2006 02:44 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2006 02:46 AM
тАО07-10-2006 02:46 AM
Solutionmodify to
ps -ef | grep pmon | grep -v pmon
Even more accurate
UNIX95=1
ps -C pmon
Do not set UNIX95 permenent, it breaks sd/ux
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2006 02:48 AM
тАО07-10-2006 02:48 AM
Re: #ps -ef | grep pmon
ps -ef | grep pmon | grep -v grep
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2006 03:17 AM
тАО07-10-2006 03:17 AM
Re: #ps -ef | grep pmon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2006 07:51 AM
тАО07-10-2006 07:51 AM
Re: #ps -ef | grep pmon
ps will match the exact name of the process, regardless of whether it was started as ./pmon or /opt/pmonstuff/bin/pmon or simply pmon. It is the C option and must be temporarily enabled with UNIX95, like this:
UNIX95= ps -fC pmon
DO NOT export UNIX95 -- just use it as shown since the variable is temporary just for ps. Making UNIX95 permanent can lead to unexpected behavior of other commands. And yes, the UNIX95= is correct -- it means defined UNIX95 as a null string.
To see how unreliable ps|grep is, try these two commands to find all the shells:
ps -ef | grep -v grep | grep sh
and
UNIX95= ps -fC sh
To make life easier, I simply alias the ps command in .profile so it is always used with ps:
alias ps="UNIX95= /usr/bin/ps"
Now you can type ps and get all the special features like -H and -o, something like this:
ps -eH
ps -C pmon -o vsz,pid,ppid,ruser,args
UNIX95 (when defined even as a null variable) turns on XPG4 behavior as defined in the ps man page.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2006 01:52 PM
тАО07-10-2006 01:52 PM
Re: #ps -ef | grep pmon
#ps -ef | grep p[m]on
Which letter gets the brackets around it doesn't matter, as long as only one charcter is bracketed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2006 11:53 PM
тАО07-10-2006 11:53 PM
Re: #ps -ef | grep pmon
If my previous response gives false positives, use:
ps -ef | grep ora_pmon_ | grep -v grep
Whenever you grep for something, you need to keep in mind that grep will return any line containing the search pattern in any position. If you get unintended results, you will need to narrow down the search pattern.
Understanding the way grep works is an essential trait of any sysadmin, as it is ubiquitous in the Unix world.
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-11-2006 01:02 AM
тАО07-11-2006 01:02 AM