- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ps question
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
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
02-04-2004 11:38 PM
02-04-2004 11:38 PM
ps question
I'm trying to monitor my oc4j process with ps command. But the monitor (not written by me, and I can't change it) uses ps -ef command, so not all line is shown and it can't see "oc4j" string at the end. The solution is to use ps -efx command. Is there any way to make ps -ef execute with x option?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2004 11:46 PM
02-04-2004 11:46 PM
Re: ps question
The command "ps -efx" works for me. Are you getting some sort of error or is the output not what you expect?
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2004 11:49 PM
02-04-2004 11:49 PM
Re: ps question
Not sure what you want but you like to replace the ps -ef command used by a monitoring script into ps -efx. I say change the monitoring script. If you are not allowed to change the script, you can replace /usr/bin/ps with a script that calls the real ps and if -ef are provided autochange -ef in efx.
mv /usr/bin/ps /usr/bin/realps
and create a script called ps like this.
#!/usr/bin/ks
VARS=$1
if [ $VARS -eq "-ef" ]
then
/usr/bin/realps -efx
else
/usr/bin/realps $VARS
fi
But i think it is better to change the monitoring script.
HTH,
Gideon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2004 11:53 PM
02-04-2004 11:53 PM
Re: ps question
ps -efx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2004 11:54 PM
02-04-2004 11:54 PM
Re: ps question
#!/usr/bin/sh
[ $1 = "-ef" ] && EXTRA="x"
ps.orig ${1}$EXTRA
I though an alias would work but I can't seem to make that work.
If you only want to do this for the user that this appliaction runs as, rather than renaming "ps" you could precede the users PATH with a directory containing your script and the script would use the full path to "ps". This means all other users would still use the origianl "ps"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2004 12:04 AM
02-05-2004 12:04 AM
Re: ps question
The problem is that the monitor uses ps -ef.
I thought about changing the original ps, but I really prefer not to do this.
Well, I guess the only option I have is to change the original monitor ...
Thanx all for the help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2004 12:15 AM
02-05-2004 12:15 AM
Re: ps question
before you run the monitor, change the PATH to be :
export PATH=/usr/local/bin:$PATH
this will run the "alternate" ps command.
Regards,
Jean-Luc