- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: top command - scripting....
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
тАО09-10-2009 04:02 AM
тАО09-10-2009 04:02 AM
top command - scripting....
Any thoughts?
- Tags:
- top
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-10-2009 05:24 AM
тАО09-10-2009 05:24 AM
Re: top command - scripting....
-s
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-10-2009 05:30 AM
тАО09-10-2009 05:30 AM
Re: top command - scripting....
To add to Mel's suggestions, if you want to capture the output of 'top' into a file for subsequent use, be sure to use the '-f filename' switch. If you don't your output file (from simple redirection) would otherwise contain terminal control characters for cursor positioning --- not what you want.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-10-2009 06:56 AM
тАО09-10-2009 06:56 AM
Re: top command - scripting....
Create a file (I called it /tmp/cpu_top) with the following contents:
Print "----------CPU USAGE:"
cpu loop {
PRINT "CPU # ", bycpu_id, " used ", bycpu_cpu_total_util, "% CPU"
}
Then reference this from glance with a suitable interval:
glance -aos /tmp/cpu_top -j 10
it just show every 10 seconds all CPU(s) usage. Of course it is flexible to create more fields. .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-10-2009 10:51 PM
тАО09-10-2009 10:51 PM
Re: top command - scripting....
- top works on sampled metrics, when glance is using accurate metrics-.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2009 12:17 AM
тАО09-11-2009 12:17 AM
Re: top command - scripting....
Yes you are right indeed, Glance is better when it comes to accuracy, different is in method used to measurement. I recommend to check this link about glance v.s. top
http://www.unix.com/hp-ux/50084-glanceplus-v-s-top.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2009 07:42 AM
тАО09-11-2009 07:42 AM
Re: top command - scripting....
You are overlooking one important matter: MONEY!
top is free to use whereas glance is costly. And all you need to see who is the top CPU hog for few seconds, top does the job comparably well. Yes, if you have a large shop with gazillion machines and you need to be on top of performance problem and what-not all the time, glance is worth it's manuals weight in gold, but for a shop with not much of a budget, let alone a home user with one or two hpux machines setup for god knows what, glance is overkill.
UNIX because I majored in cryptology...