- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Monitoring
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
09-05-2001 12:20 PM
09-05-2001 12:20 PM
I've a little probleme here, I want to monitor the processes that are running on my HP-UX 10.20 box...
I try to use "top" but when I put it in a logfile, I can't see it normaly, it seems that it displays the screen caracters.... I try to do a script with the command "ps" but it some kind of tricky when it come with the grep and everything...
I was wondering if there's an utility that I can use to do it, or if some body have a command line to do the job...
thanx...
Jonathan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2001 12:27 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2001 12:28 PM
09-05-2001 12:28 PM
Re: Monitoring
'top' has a little known, largely undocumented option to do exactly what you want. To capture, for instance, one screen view into a file, use the '-f' option like this:
# top -d 1 -f /tmp/top.out
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2001 12:43 PM
09-05-2001 12:43 PM
Re: Monitoring
The output of ps -ef has 13 columns:-
ps -ef | awk '{print $X,$Y,$z }' > output file
Change the X,Y and Z to the columns that you want.
if you wish to get ps output for certain users then:-
ps -e | grep
HTH
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2001 12:45 PM
09-05-2001 12:45 PM
Re: Monitoring
what are you trying to monitor exactly?
Anyway you could use top -d 1 -f /tmp/top.out
which would print 1 display of the top output.
Also you could use ps (with the XPG4 environments)
eg:
To sort the top processes based on the cpu usage
UNIX95= ps -e -o pcpu -o ruser,args |sort -rn |grep -v %CPU
To monitor the process based on the memory sizes
UNIX95= ps -e -o vsz=Kbytes -o ruser,pid,ppid,args |sort -rnk2
you could put this as aliases in your .kshrc
eg:
pscpu="UNIX95= ps -e -o pcpu -o ruser,args |sort -rn |grep -v %CPU"
psmem="UNIX95= ps -e -o vsz=Kbytes -o ruser,pid,ppid,args |sort -rnk2"
Look at the man pages of ps for more information.
-Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2001 05:50 AM
09-06-2001 05:50 AM
Re: Monitoring
regards
jonathan