[HPADM] RE: [SUMMARY] Tool for monitoring CPU / Mem/ IO utilization

From: Srinivas Sreekumar (SRINIVAS_SK@infosys.com)
Date: Thu Jul 15 2004 - 00:53:29 EDT


Thanks to all.
Everyone who replied suggested Glance Plus Pak (a combination of
GlancePLUS and MEasureware) .
Few other suggestions were :
Teamquest which runs on both HP and SUN , LUND's SOS product , Perfview
of HP.
 
Attached is a mail from Richard which gives a script to create a
summary report from measureware files.
 
 

Best Regards,
Srinivas Sreekumar
Infosys Technologies Ltd.
Pune
Ph : 91-20-22971591
M : 98225-09326

        -----Original Message-----
        From: hpux-admin-owner@DutchWorks.nl
[mailto:hpux-admin-owner@DutchWorks.nl] On Behalf Of Srinivas Sreekumar
        Sent: Wednesday, July 14, 2004 6:25 PM
        To: hpux-admin@dutchworks.nl
        Subject: [HPADM] Tool for monitoring CPU / Mem/ IO utilization
        
        
        Hi Admins,
         
        We are looking for a good tool (either a full functional
licensed one or a freeware) , which can provide me with CPU / memory /
IO utilization . It should be able to store the history also so that I
can generate a report based on that data.
         
        Best Regards,
        Srinivas Sreekumar
        Infosys Technologies Ltd.
        Pune
        Ph : 91-20-22971591
        M : 98225-09326
        
        

                 


attached mail follows:


Here is a script that I use. It uses measureware files to create a summary
report. Set up an email list called sys_rpt in /etc/mail/aliases -or- change
sendto= to your email address -or- just modify to write a file.

=========== start ==========
#!/usr/bin/sh
#
# * sysreport - script to produce weekly system usage report
# * USAGE: sysreport
#
# THIS SHOULD ONLY BE RUN BY A CRON JOB TO INSURE
# CONSISTANT COLLECTION AND REPORTING!
#
# * END
#
# CHANGE HISTORY
# 07/31/01 Rich Wright
# Original Script
#
#
program=$(basename $0)
rptname=$(echo $program | cut -f1 -d'.')
host=$(hostname)
sendto=sys_rpt
tmp=/tmp/${program}.$$
tmpx=/tmp/${program}x.$$
tmpmet=/tmp/${program}.met.$$
tmprpt=/tmp/${program}.rpt.$$
ymd=$(date +%Y%m%d)
hms=$(date +%H%M%S)
today=$(date +%c)
savedir=/var/sys/${program}.${ymd}.${hms}
#
# Initialize temporary metrics definition file
# stopping after "DATA TYPE GLOBAL" line
#
cat /var/opt/perf/reptall | \
        sed -n \
        -e 's/SUMMARY=.*/SUMMARY=30/' \
        -e '1,/^DATA TYPE GLOBAL/p' > $tmpmet
#
# Append list of Glogal metrics to be reported.
#
cat >> $tmpmet << __EOD__
DATE
TIME
GBL_CPU_TOTAL_UTIL
GBL_DISK_PHYS_IO_RATE
GBL_MEM_UTIL
GBL_NFS_CALL_RATE
GBL_NET_PACKET_RATE
GBL_ACTIVE_PROC
__EOD__

# uncomment following lines for testing
# sendto=test_mail
#
# Put Heading on report
#
echo "ReportName=SystemStatus\n$(date)" > $tmp
echo " System Status report for $host server\n\n" >> $tmp
#
echo "\n\nSystem Usage Metrics report\n\n" >> $tmp
#
# System metrics report
#
/opt/perf/bin/extract -xp -G -r $tmpmet -f $tmprpt -b last-7 > /dev/null
2>&1
cat $tmprpt | sed 's/|/ | /g' >> $tmp
#
# Now send report to "sendto" via email
#
cat $tmp | ux2dos - > ${rptname}.txt

mailx -m -s "${rptname} for ${host} as of ${today}" $sendto 1>/dev/null <<
__EOF
__
$(uuencode ${rptname}.txt ${rptname}.txt)

This report displays best when using Word or Notepad

Below is information explaining how the metrics shown in the
attached report are calculated.

GBL_CPU_TOTAL_UTIL

Percentage of time the CPU was not idle during the interval.
This is calculated as

  GBL_CPU_TOTAL_UTIL =
    GBL_CPU_USER_MODE_UTIL +
    GBL_CPU_SYS_MODE_UTIL
On a system with multiple CPUs, this metric is normalized. That is,
the CPU used over all processors is divided by the number of processors
online. This represents the usage of the total processing capacity
available.
  GBL_CPU_TOTAL_UTIL +
   GBL_CPU_IDLE_UTIL = 100%
This metric varies widely on most systems, depending on the workload.
A consistently high CPU utilization can indicate a CPU bottleneck,
especially when other indicators such as GBL_RUN_QUEUE and
GBL_ACTIVE_PROC are also high. High CPU utilization can also occur on
systems that are bottlenecked on memory, because the CPU spends more
time paging and swapping.

GBL_DISK_PHYS_IO_RATE

The number of physical IOs per second during the interval.
Only local disks are counted in this measurement. NFS devices (and DUX
devices on HPUX 9.0) are excluded. This includes all types of physical
IOs to disk, including virtual memory IO and raw IO.
This is calculated as

  GBL_DISK_PHYS_IO_RATE =
    GBL_DISK_FS_IO_RATE +
    GBL_DISK_VM_IO_RATE +
    GBL_DISK_SYSTEM_IO_RATE +
    GBL_DISK_RAW_IO_RATE

GBL_MEM_UTIL

The percentage of physical memory in use during the interval. This
includes system memory (occupied by the kernel), buffer cache and user
memory.
This calculation is done using the byte values for physical memory and
used memory, and is therefore more accurate than comparing the reported
kilobyte values for physical memory and used memory.

GBL_NFS_CALL_RATE

The number of NFS calls per second the system made as either a NFS
client or NFS server during the interval.
Each computer can operate as both a NFS server, and as an NFS client.
This metric includes both successful and unsuccessful calls.
Unsuccessful calls are those that cannot be completed due to resource
limitations or LAN packet errors.
NFS calls include create, remove, rename, link, symlink, mkdir, rmdir,
statfs, getattr, setattr, lookup, read, readdir, readlink, write,
writecache, null and root operations.

GBL_NET_PACKET_RATE

The number of successful packets per second (both inbound and outbound)
for all network interfaces during the interval. Successful packets are
those that have been processed without errors or collisions.

GBL_ACTIVE_PROC

An active process is one that exists and consumes some CPU time.
GBL_ACTIVE_PROC is the sum of the alive-process-time/interval-time
ratios of every process that is active (uses any CPU time) during an
interval.
The following diagram of a four second interval during which two
processes exist on the system should be used to understand the above
definition. Note the difference between active processes, which consume
CPU time, and alive processes which merely exist on the system.

     ----------- Seconds -----------
       1 2 3 4
Proc
---- ---- ---- ---- ----
A live live live live

B live/CPU live/CPU live dead

Process A is alive for the entire four second interval but consumes no
CPU. A's contribution to GBL_ALIVE_PROC is 4*1/4. A contributes 0*1/4
to GBL_ACTIVE_PROC. B's contribution to GBL_ALIVE_PROC is 3*1/4. B
contributes 2*1/4 to GBL_ACTIVE_PROC. Thus, for this interval,
GBL_ACTIVE_PROC equals 0.5 and GBL_ALIVE_PROC equals 1.75.
Because a process may be alive but not active, GBL_ACTIVE_PROC will
always be less than or equal to GBL_ALIVE_PROC.
This metric is a good overall indicator of the workload of the system.
An unusually large number of active processes could indicate a CPU
bottleneck.
To determine if the CPU is a bottleneck, compare this metric with
GBL_CPU_TOTAL_UTIL and GBL_RUN_QUEUE. If GBL_CPU_TOTAL_UTIL is near
100 percent and GBL_RUN_QUEUE is greater than one, there is a
bottleneck.
__EOF__

rm $tmp
rm ${rptname}.txt
rm $tmpmet
rm $tmprpt
exit
=========== end ========

Thanks,

Richard Wright

-----Original Message-----
From: hpux-admin-owner@DutchWorks.nl [mailto:hpux-admin-owner@DutchWorks.nl]
On Behalf Of Srinivas Sreekumar
Sent: Wednesday, July 14, 2004 7:55 AM
To: hpux-admin@dutchworks.nl
Subject: [HPADM] Tool for monitoring CPU / Mem/ IO utilization

Hi Admins,
 
We are looking for a good tool (either a full functional licensed one or a
freeware) , which can provide me with CPU / memory / IO utilization . It
should be able to store the history also so that I can generate a report
based on that data.
 
Best Regards,
Srinivas Sreekumar
Infosys Technologies Ltd.
Pune
Ph : 91-20-22971591
M : 98225-09326
 

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:41 EDT