- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Script for Memory and 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
09-05-2006 05:27 PM
09-05-2006 05:27 PM
Script for Memory and CPU utilization
We need script for Continuously monitoring the CPU utilization and Memory utilization on our HP unix 11.11 server.
Note:Glance command is not availble in our hp server.Pls guide me,how to install glance in our server.
Thanks&Regards,
Suresh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2006 05:32 PM
09-05-2006 05:32 PM
Re: Script for Memory and CPU utilization
hour=`date +'%H'`
min=`date +'%M'`
uptime=`uptime`
load=`echo $uptime | cut -f2 -dl |cut -f2 -d: | cut -f1 -d, |awk '{print $1}'`
mem=`swapinfo -t |grep ^total | awk '{print $5}' | cut -f1 -d%`
echo "$load-$hour:$min" >> cpu_utilization.txt
echo "$mem-$hour:$min" >> memory_utz.txt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2006 11:01 PM
09-05-2006 11:01 PM
Re: Script for Memory and CPU utilization
Thanks for your quick reply.
Our requirment is %of CPU utilzation and free memory at the same time i.e free memory in GB only.We need %of CPU utilzation and total and free memory in GB.
Pls modify the old script and provide new script for our requirment.
Regards,
Suresh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2006 03:31 AM
09-06-2006 03:31 AM
Re: Script for Memory and CPU utilization
DATE=$(date +'%D @ %T')
CPU=$(uptime | awk '{print $10}' | tr -d ',')
RAM=$(swapinfo -t | awk '/^total/ {printf "%2.2f GiB Avail\t%2.2f GiB Free\n",$2/1048576,$4/1048576}')
echo "$DATE\t$CPU\t$RAM" >> monitor.text
exit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2006 03:32 AM
09-06-2006 03:32 AM
Re: Script for Memory and CPU utilization
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2006 03:38 AM
09-06-2006 03:38 AM
Re: Script for Memory and CPU utilization
I thought I posted to this thread.
Here is a freebie with production time all over the world.
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
09-06-2006 11:53 AM
09-06-2006 11:53 AM
Re: Script for Memory and CPU utilization
hour=`date +'%H'`
min=`date +'%M'`
uptime=`uptime`
load=`echo $uptime | cut -f2 -dl |cut -f2 -d: | cut -f1 -d, |awk '{print $1}'`
mem=`swapinfo -tm |grep ^memory | awk '{print $4/1024}'`
echo "$load-$hour:$min" >> cpu_utilization.txt
echo "$mem-$hour:$min" >> memory_utz.txt
You'll have free memory in GB but with CPU load i have never come accross it displaying in %. Only values you can get in % format are system utilization (%SYS), user utilization (%USR), system idle (%IDLE)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2006 03:20 PM
09-06-2006 03:20 PM
Re: Script for Memory and CPU utilization
Thanks,
We need small modification on that Script.
1.% of cpu --> Pls use the Glance command output
2.Available memory and Free memory ---> Pls use swapinf command output.
Pls modify the script for the above requirement in single script.
Regards,
Suresh.