- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Monitor CPU usage
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
03-06-2006 09:31 PM
03-06-2006 09:31 PM
Monitor CPU usage
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2006 09:48 PM
03-06-2006 09:48 PM
Re: Monitor CPU usage
Pull the sar command out of this scriptset and you are done:
http://www.hpux.ws/system.perf.sh
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
03-06-2006 09:55 PM
03-06-2006 09:55 PM
Re: Monitor CPU usage
You can take look these threads,
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=888142
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=884510
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=535811&admit=-682735245+1141728940007+28353475
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2006 10:18 PM
03-06-2006 10:18 PM
Re: Monitor CPU usage
#!/usr/bin/sh
$IDLE=`sar -u 3 5 | grep Average | awk '{print $5}'`
if [ "$IDLE" -lt "10" ]
then
echo "Warning CPU high"
fi
~
"cpu_mon" 7 lines, 125 characters
root@PUISCEDB31 # ./cpu_mon
./cpu_mon: line 3: =91: command not found
./cpu_mon: line 4: [: : integer expression expected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2006 11:09 PM
03-06-2006 11:09 PM
Re: Monitor CPU usage
$IDLE=`sar -u 3 5 | grep Average | awk '{print $5}'`
Correct is:
IDLE=`sar -u 3 5 | grep Average | awk '{print $5}'`
You use $IDLE instead only IDLE for variable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2006 08:24 PM
03-07-2006 08:24 PM
Re: Monitor CPU usage
yoy can use glance in adviser_mode to collect data about resources usage including CPU.
This is a little script I use for thi scope.
(It collects CPU, memory, disk and swap)
GlnCmd=/opt/perf/bin/glance
WrkDir=
GlnSyn=$WrkDir/gln_syntax_file
GlnOpt="-j60 -adviser_only -nosort -iterations 2 -bootup -syntax $GlnSyn"
ResLog=$(date +%Y%m)-res-cop.log
#echo -- MM/DD/YY HH:MM:SS CPU DSK MEM SWA
$GlnCmd $GlnOpt 2>/dev/null |tail +2 >>$WrkDir/../dat/$ResLog
cat $WrkDir/gln_syntax_file
print "-- ",
gbl_statdate,
" ",
gbl_stattime,
" ",
gbl_cpu_total_util|3|0,
" ",
gbl_disk_util_peak|3|0,
" ",
gbl_mem_util|3|0,
" ",
gbl_swap_space_util|3|0
HTH,
Art
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2006 08:34 PM
03-09-2006 08:34 PM
Re: Monitor CPU usage
please, remember to assign point who spent time and affort helping you.
It's only a bit thing but really appreciated.
Art