- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: CPU UTILIZATION
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
04-26-2003 10:34 PM
04-26-2003 10:34 PM
I need same help on extracting process that consuming higher percentage of cpu using top command
plz,I NEED THIS IN SHELL SCRIPTING (hp-ux 11)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2003 01:04 AM
04-27-2003 01:04 AM
SolutionIf you really need to use top you could write the script like :
#!/usr/bin/ksh
TEMPFILE=/var/tmp/top.$$
top -n1 -f $TEMPFILE
cat $TEMPFILE | tail -2 | awk '{print $12,$13}'
rm $TEMPFILE
However, this will be a lot slower than something like :
#!/usr/bin/ksh
export UNIX95=XPG4
ps -efo pcpu,comm | sort -r | head -2
Simply because of the amount of data top has to collect and the IO taking place.
Regards,
James.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2003 01:55 AM
04-27-2003 01:55 AM
Re: CPU UTILIZATION
The top commad work perfect,
but the ps -ef giving wrong process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2003 06:53 AM
04-27-2003 06:53 AM
Re: CPU UTILIZATION
The output may be different every time you run this as it only reports the process using the highest percentage of the CPU in that interval. There was an issue with the ps command on 11.00, fixed with the following patch:
PHCO_18446 s700_800 11.00 ps(1) cumulative patch
This patch has no dependencies and does not require a reboot. However, the latest and recommended ps patch is PHCO_26274 and has a couple of dependencies, which will require a reboot if the kernel dependencies are not already installed.
Regards,
James.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2003 10:21 AM
04-27-2003 10:21 AM
Re: CPU UTILIZATION
I've had the same issue as the patches noted above me in the thread, getting those patches in and the March 2003 Quality Pack are a good idea.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com