From blair at orcaware.com Thu Apr 1 15:48:09 2004 From: blair at orcaware.com (Blair Zajac) Date: Thu, 1 Apr 2004 15:48:09 -0800 Subject: [Orca-checkins] r293 - trunk/orca/data_gatherers/aix Message-ID: <200404012348.i31Nm9tc009003@orcaware.com> Author: blair Date: Thu Apr 1 15:47:50 2004 New Revision: 293 Added: trunk/orca/data_gatherers/aix/ trunk/orca/data_gatherers/aix/orca-aix-stat.pl (contents, props changed) Log: Add an aix data_gatherers directory and an AIX data collector. * data_gatherers/aix: New directory. * data_gatherers/aix/orca-aix-stat.pl: Initial import of orca-aix-stat.pl submitted by Rajesh Verma . Added: trunk/orca/data_gatherers/aix/orca-aix-stat.pl ============================================================================== --- (empty file) +++ trunk/orca/data_gatherers/aix/orca-aix-stat.pl Thu Apr 1 15:47:50 2004 @@ -0,0 +1,554 @@ +#!/usr/bin/perl +# +# Version 1.7 + +# Description: +# Collect general perfromance statistics formatted for +# interpretaion by Orca. + +# Usage: +# The following variables may be set: +# +# OUT_ROOT root directory for datafiles (eg /opt/log/performance) +# INTERVAL the number of seconds between checks (eg 300 = 5 min) +# DURATION numer of hours to run (eg 1 = 1 hr) +# +# This script runs various standard system utilities to collect +# system performance statistics and writes them out to datafile named +# HOSTNAME/stats.YYYY-MM-DD-HHmm under the OUT_ROOT directory. +# +# It runs for the the numbers specified by DURATION collecting data +# every INTERVAL number of seconds. After DURATION, the script +# closes and compresses it's datafile via /usr/bin/compress and then +# exits. If DURATION=24 and INTERVAL=300 (recommended) then the +# following cron entry would collect continuos stats for a system: +# +# 0 0 * * * //orca-aix-stat.pl +# +# 2003-09-10 - RV - Modified for AIX 4.3/5.x.. by Rajesh Verma +# (rajeshverma at aixdude.com) +# v1.7 - RV - ignores /proc now +# 2001-04-16 - JDK - Genesis... by Jason D. Kelleher +# 2001-05-02 - JDK - Updates to make data aggregation easier. +# Added #open connections, pagestotl. +# 2001-07-06 - JDK - added command-line args & data checks +# 2001-07-09 - JDK - added signal handler, column checks, & umask +# 2001-07-10 - JDK - now autodetects interfaces via netstat -i +# v1.5 +# +# $HeadURL$ +# $LastChangedDate$ +# $LastChangedBy$ +# $LastChangedRevision$ + +# Note: Execution speed is more important than cleanliness here. + +# Explicitly set PATH to prevent odd problems if run manually. +$ENV{PATH} = '/usr/bin:/etc:/usr/sbin:/usr/ucb:/sbin'; + +$Usage_Message = ' +Usage: orca-aix-stat.pl [-r out_root] [-i interval] [-d duration] [-h] + +-r out_root set root output directory, default: /opt/log/performance +-i interval number of seconds between checks, default: 300 +-d duration number of hours to run, default: 24 +-h this message + +'; +############################ +# These are the packages you need to install +# 1. perl +# 2. openssh - if using ssh to the collector server +# 3. openssl +# 4. zlib +# 5. rsync - To copy file to the collector server +# 6. gzip - to zip the files +# 7. rpm.rte - to install rpm tools +# +# This the site you can file everything +# http://www-1.ibm.com/servers/aix/products/aixos/linux/download.html +# http://www.bullfreeware.com +# +# +# Good Luck, Rajesh Verma (rajeshverma at yahoo.com) +############################## + +# Parse the command line arguments +while ( $#ARGV >= 0 ) { + + if ( $ARGV[0] eq "-r" ) { + shift @ARGV; + $OUT_ROOT = shift @ARGV; + } + elsif ( $ARGV[0] eq "-i" ) { + shift @ARGV; + $INTERVAL = shift @ARGV; + } + elsif ( $ARGV[0] eq "-d" ) { + shift @ARGV; + $DURATION = shift @ARGV; + } + elsif ( $ARGV[0] eq "-h" ) { + print $Usage_Message; + exit 0; + } + elsif ( $ARGV[0] =~ /^-/ ) { + die "Invalid flag: $ARGV[0]\n$Usage_Message"; + } + else { + die "Invalid argument: $ARGV[0]\n$Usage_Message"; + } +} + +## BEGIN set defaults + +$OUT_ROOT ||= '/home/orca/orcallator'; # root directory for datafiles +$INTERVAL ||= 300; # seconds between checks +$DURATION ||= 24; # number of hours to run + +## END set defaults + +## Derived variables. +$iterations = $DURATION * 60 * 60 / $INTERVAL; # Number of checks. +chomp( $HOST = `uname -n` ); +$out_dir = "${OUT_ROOT}/${HOST}"; +( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) = + localtime(time); +$stat_file = + sprintf( "%s/percol-%.2d-%.2d-%.2d-%1d%.2d", $out_dir, $year + 1900, $mon + 1, + $mday, $hour, $min ); + +# Base all timestamps on start time. +$start_time = time(); +$timestamp = 0; + +## Autodetect network interfaces +#open IN, "ifconfig -a|"; +open IN, "netstat -ni|"; +while () { + + # if ( /^(\S+):/ ) { + if (/^(\w+).*link/) { + push @net_interfaces, $1; + } +} +close IN; + +# Grab some base system info prior to collecting stats. +open IN, "lsattr -El sys0 -a realmem |"; +while () { + if (/^realmem (\d+) /) { + $pagestotl = $1 * 1024 / 4096; # Grab realmem in KB and convert to pages. + $mem_totl = $1 * 1024; # Grab realmem in KB and convert to Bytes. + + # this gets used down in the vmstat section + } +} +close IN; + +## Make sure we can write output. +umask 0022; # make sure the file can be harvested +unless ( -d $out_dir ) { + system( "mkdir", "-p", "$out_dir" ); +} +open OUT, ">$stat_file" or die "ERROR: Could not open $stat_file: $!"; +my $oldfh = select OUT; +$| = 1; +select $oldfh; + +# Set signal handlers to close and compress the output +# file just in case. +$SIG{HUP} = \&exit_nicely; +$SIG{INT} = \&exit_nicely; +$SIG{QUIT} = \&exit_nicely; +$SIG{TERM} = \&exit_nicely; + +# Set gloabals used for printing (or not) headers. +$need_header = 1; +$prev_header_cnt = 0; +$prev_info_cnt = 0; + +while ( $iterations-- > 0 ) { + + $timestamp = $timestamp ? time() : $start_time; + ( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) = + localtime(time); + $locltime = sprintf( "%.2d:%.2d:%.2d", $hour, $min, $sec ); + + ## Get runq data + ## Get runq data + $uptime = 0; + open IN, "uptime |"; + while () { + if (/load average:\s+(\S+),\s+(\S+),\s+(\S+)/) { + $load_info = join "\t", $1, $2, $3; + } + @upt = split(/ +/,); + $uptd = $upt[3]; + $nusr = $upt[6]; + $up_day = $uptd * 24 * 60 * 60; + if (/days,\s+(\S+):(\S+), /) { + $up_hrs = $1 * 60 * 60; + $up_min = $2 * 60; + } + $uptime = $up_day + $up_hrs + $up_min; + } + close IN; + $load_header = "1runq\t5runq\t15runq"; + $up_header = "uptime\tnusr"; + $up_info = "$uptime\t$nusr"; + + if ( scalar( split ' ', $load_header ) != scalar( split ' ', $load_info ) ) + { + $load_header = ''; + $load_info = ''; + $need_header = 1; + print STDERR "WARNING: load header does not match load info.\n"; + } + if ( scalar( split ' ', $up_header ) != scalar( split ' ', $up_info ) ) + { + $up_header = ''; + $up_info = ''; + $need_header = 1; + print STDERR "WARNING: UP header does not match load info.\n"; + } + + + ## Get number of system processes + $num_proc = -1; # Don't count the header. + open IN, "ps -ek |"; + while () { + $num_proc++; + } + close IN; + $proc_info = $num_proc; + $proc_header = '#proc'; + + if ( scalar( split ' ', $proc_header ) != scalar( split ' ', $proc_info ) ) + { + $proc_header = ''; + $proc_info = ''; + $need_header = 1; + print STDERR "WARNING: #proc header does not match #proc info.\n"; + } + + ## Get pstat data for pages + $sw_used = 0; + $sw_free = 0; + open IN, "pstat -s |tail -3 |"; + while () { + @swp = split(/ +/,); + if (/\d/) { + $sw_used = $swp[1]; + $sw_free = $swp[2]; + $swap_used = $sw_used * 4096; + $swap_free = $sw_free * 4096; + } + } + close IN; + $swap_info = "$swap_used\t$swap_free"; + $swap_header = "\tswap_used\tswap_free"; + + if ( scalar( split ' ', $swap_header ) != + scalar( split ' ', $swap_info ) ) + { + print STDERR "WARNING: pstat header does not match pstat info.\n"; + $swap_header = ''; + $swap_info = ''; + $need_header = 1; + } + + + + ## Get vmstat data + open IN, "vmstat 1 2|"; + while () { + chomp; + if (/^[\s\d]+$/) { + + # overwrite first line on 2nd pass + ( + $vmstat_r, $vmstat_b, $vmstat_avm, $vmstat_fre, + $vmstat_re, $vmstat_pi, $vmstat_po, $vmstat_fr, + $vmstat_sr, $vmstat_cy, $vmstat_inf, $vmstat_syf, + $vmstat_csf, $vmstat_us, $vmstat_sy, $vmstat_id, + $vmstat_wa ) + = split; + $vmstat_info = join "\t", $vmstat_r, $vmstat_b, $vmstat_avm, + $vmstat_fre, $pagestotl, $vmstat_pi, $vmstat_po, $vmstat_fr, + $vmstat_sr, $vmstat_us, $vmstat_sy, $vmstat_wa, $vmstat_id; + } + } + close IN; + $vmstat_header = +"runque\twaiting\tpagesactive\tpagesfree\tpagestotl\tPagesI/s\tPagesO/s\tPagesF/s\tscanrate\tusr%\tsys%\twio%\tidle%"; + + if ( scalar( split ' ', $vmstat_header ) != + scalar( split ' ', $vmstat_info ) ) + { + print STDERR "WARNING: vmstat header does not match vmstat info.\n"; + $vmstat_header = ''; + $vmstat_info = ''; + $need_header = 1; + } + + ## Get filesystem data + $fs_header = ''; + $fs_info = ''; + open IN, "df -k -v |"; + while () { + chomp; + + if (m%^/dev%) { + ( $mnt_dev, $blocks, $used, $free, $pct_used, $iused, $ifree, + $ipct_used, $mnt ) = split; + + # Recalculate percents because df rounds. + $fs_info .= "\t" + . sprintf( "%s\t%s\t%s\t%.5f\t%d\t%s\t%s\t%.5f", $blocks, $used, + $free, ( $used / $blocks ) * 100, ( $iused + $ifree ), $iused, + $ifree, ( $iused / ( $iused + $ifree ) ) * 100 ); + $fs_header .= "\t" . join "\t", "mntC_$mnt", "mntU_$mnt", + "mntA_$mnt", "mntP_$mnt", "mntc_$mnt", "mntu_$mnt", "mnta_$mnt", + "mntp_$mnt"; + } + } + close IN; + + if ( scalar( split ' ', $fs_header ) != scalar( split ' ', $fs_info ) ) { + print STDERR + "WARNING: filesystem header does not match filesystem info.\n"; + $fs_header = ''; + $fs_info = ''; + $need_header = 1; + } + + ## Get iostat data + $disk_t = 0; + $disk_rK = 0; + $disk_wK = 0; + undef %disks; + open IN, "iostat -d 1 2|"; + + while () { + if (/^(\S+)\s+\S+\s+\S+\s+(\S+)\s+(\d+)\s+(\d+)/) { + my $disk = $1; + my $tps = $2; + my $rK = $3; + my $wK = $4; + if ( not $disks{$disk} ) { + $disks{$disk}++; # Get rK & wK from first pass. + $disk_rK += $rK; + $disk_wK += $wK; + } + else { + $disk_t += $tps; # Get trans per sec from second pass. + } + } + } + close IN; + $iostat_header = "disk_t/s\tdisk_rK/s\tdisk_wK/s"; + $iostat_info = "${disk_t}\t${disk_rK}\t${disk_wK}"; + + if ( scalar( split ' ', $iostat_header ) != + scalar( split ' ', $iostat_info ) ) + { + print STDERR "WARNING: iostat header does not match iostat info.\n"; + $iostat_header = ''; + $iostat_info = ''; + $need_header = 1; + } + + ## Get packet data + $packet_header = ''; + $packet_info = ''; + + #foreach $interface ( split(/\s+/, $NET_INTERFACES) ) { + foreach $interface (@net_interfaces) { + $packet_header .= +"\t${interface}Ipkt/s\t${interface}IErr/s\t${interface}Opkt/s\t${interface}OErr/s\t${interface}Coll/s\t"; + open IN, "netstat -n -I $interface 1|"; + + while () { + if (/^\s*(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+/) { + $packet_info .= "\t" . join "\t", $1, $2, $3, $4, $5; + last; + } + } + close IN; + } + + if ( scalar( split ' ', $packet_header ) != + scalar( split ' ', $packet_info ) ) + { + print STDERR "WARNING: packet header does not match packet info.\n"; + $packet_header = ''; + $packet_info = ''; + $need_header = 1; + } + + ## Get TCP Connection data + $tcp_estb = 0; + open IN, "netstat -an |"; + while () { + if (/^tcp.+ESTABLISHED$/) { + $tcp_estb++; + } + } + close IN; + $tcp_info = $tcp_estb; + $tcp_header = 'tcp_estb'; + + if ( scalar( split ' ', $tcp_estb_header ) != + scalar( split ' ', $tcp_estb_info ) ) + { + print STDERR "WARNING: tcp_estb header does not match tcp_estb info.\n"; + $tcp_estb_header = ''; + $tcp_estb_info = ''; + $need_header = 1; + } + + ## Get TSM Database space usage + $tsmdb = 0; + open IN, "dsmadmc -id=view -password=view 'query db' |tail -r -n 5 |"; + while () { + @fld = split(/ +/,); + if (/\d/) { + $tsmdb = $fld[8]; + } + } + close IN; + $tsm_info = $tsmdb; + $tsm_header = "tsmdb\t"; + + if ( scalar( split ' ', $tsm_header ) != + scalar( split ' ', $tsm_info ) ) + { + print STDERR "WARNING: tsmdb header does not match tsmdb info.\n"; + $tsm_header = ''; + $tsm_info = ''; + $need_header = 1; + } + + ## Get Memory Usage breakup using SVMON + $mem_work = 0; + $mem_pres = 0; + $mem_clnt = 0; + open IN, "svmon -G |tail -2 |"; + while () { + @memp = split(/ +/,); + if (/use\s+(\d+) /) { + $m_work = $memp[2]; + $m_pres = $memp[3]; + $m_clnt = $memp[4]; + $mem_work = $m_work * 4096; + $mem_pres = $m_pres * 4096; + $mem_clnt = $m_clnt * 4096; + } + } + close IN; + $mem_info = "$mem_work\t$mem_pres\t$mem_clnt\t$mem_totl"; + $mem_header = "mem_work\tmem_pres\tmem_clnt\tmem_totl"; + + if ( scalar( split ' ', $mem_header ) != + scalar( split ' ', $mem_info ) ) + { + print STDERR "WARNING: memory header does not match memory info.\n"; + $mem_header = ''; + $mem_info = ''; + $need_header = 1; + } + + ## Get TSM Tape Drive usage + $rmt = 0; + $rmt5 = 5; + open IN, "dsmadmc -id=view -password=view 'query mount' |grep matches |"; + while () { + @fld = split(/ +/,); + if (/\d/) { + $rmt = $fld[1]; + } + } + close IN; + $tsm_rmt_header = "rmt5\trmt\t"; + $tsm_rmt_info = "$rmt5\t$rmt"; + + if ( scalar( split ' ', $tsm_rmt_header ) != + scalar( split ' ', $tsm_rmt_info ) ) + { + print STDERR "WARNING: TSM RMT header does not match TSM RMT info.\n"; + $tsm_rmt_header = ''; + $tsm_rmt_info = ''; + $need_header = 1; + } + + ## Get TSM Recovery Log space usage + $tsmdb = 0; + open IN, "dsmadmc -id=view -password=view 'query log' |tail -r -n 4 |"; + while () { + @fld = split(/ +/,); + if (/\d/) { + $tsmlog = $fld[8]; + } + } + close IN; + $tsm_log_info = $tsmlog; + $tsm_log_header = 'tsmlog'; + + if ( scalar( split ' ', $tsm_log_header ) != + scalar( split ' ', $tsm_log_info ) ) + { + print STDERR "WARNING: TSM Log header does not match TSM Log info.\n"; + $tsm_log_header = ''; + $tsm_log_info = ''; + $need_header = 1; + } + + ## Join header and info then verify column counts. + $out_header = join "\t", "timestamp", "locltime", $load_header, $up_header, + $proc_header, $vmstat_header, $fs_header, $iostat_header, $packet_header, + $tcp_header, $tsm_header, $swap_header, $mem_header, $tsm_rmt_header; + $out_header =~ tr/ \t/\t/s; # translate whitespace to single tabs + + $out_info = join "\t", $timestamp, $locltime, $load_info, $up_info, $proc_info, + $vmstat_info, $fs_info, $iostat_info, $packet_info, $tcp_info, $tsm_info, + $swap_info, $mem_info, $tsm_rmt_info; + $out_info =~ tr/ \t/\t/s; # translate whitespace to single tabs + + $header_cnt = split ' ', $out_header; + $info_cnt = split ' ', $out_info; + if ( $header_cnt != $info_cnt ) { + print STDERR + "ERROR: header columns do not equal data columns. Exiting.\n"; + &exit_nicely; + } + elsif ( $header_cnt != $prev_header_cnt or $info_cnt != $prev_info_cnt ) { + $need_header = 1; + } + $prev_header_cnt = $header_cnt; + $prev_info_cnt = $info_cnt; + + ## Write output + if ($need_header) { + print OUT $out_header, "\n"; + $need_header = 0; + } + print OUT $out_info, "\n"; + + sleep $INTERVAL - ( time() - $timestamp ); + +} +close OUT; + + at args = ( "/usr/bin/gzip", "-f", "$stat_file" ); +system(@args); + +exit 0; + +# This subroutine is called by the signal handler. +sub exit_nicely { + close OUT; + @args = ( "/usr/bin/gzip", "-f", "$stat_file" ); + system(@args); + exit 0; +} From blair at orcaware.com Sat Apr 3 16:07:46 2004 From: blair at orcaware.com (Blair Zajac) Date: Sat, 3 Apr 2004 16:07:46 -0800 Subject: [Orca-checkins] r294 - in trunk/orca/data_gatherers: aix hp Message-ID: <200404040007.i3407kUi011362@orcaware.com> Author: blair Date: Sat Apr 3 16:07:15 2004 New Revision: 294 Added: trunk/orca/data_gatherers/aix/orca-aixtsm-stat.pl (contents, props changed) trunk/orca/data_gatherers/aix/orcallatorAIX.cfg (contents, props changed) trunk/orca/data_gatherers/aix/orcallatorTSM.cfg (contents, props changed) trunk/orca/data_gatherers/hp/ trunk/orca/data_gatherers/hp/hporcallator.cfg (contents, props changed) trunk/orca/data_gatherers/hp/orca-hp-stat.pl (contents, props changed) Log: Add an hp data_gatherers directory, a new HP data gatherer and an additional AIX data gatherer. * data_gatherers/aix/orca-aixtsm-stat.pl, * data_gatherers/aix/orcallatorAIX.cfg, * data_gatherers/aix/orcallatorTSM.cfg: Initial import of another AIX data measurement tool and Orca configuration files. Submitted by Rajesh Verma . * data_gatherers/hp: New directory. * data_gatherers/hp/orca-hp-stat.pl, * data_gatherers/hp/hporcallator.cfg: Initial import of an HP data measurement tool and Orca configuration file. Submitted by Rajesh Verma . Added: trunk/orca/data_gatherers/aix/orca-aixtsm-stat.pl ============================================================================== --- (empty file) +++ trunk/orca/data_gatherers/aix/orca-aixtsm-stat.pl Sat Apr 3 16:07:15 2004 @@ -0,0 +1,630 @@ +#!/usr/bin/perl +# +# Version 1.7 + +# Description: +# Collect general perfromance statistics formatted for +# interpretaion by Orca. + +# Usage: +# The following variables may be set: +# +# OUT_ROOT root directory for datafiles (eg /opt/log/performance) +# INTERVAL the number of seconds between checks (eg 300 = 5 min) +# DURATION numer of hours to run (eg 1 = 1 hr) +# +# This script runs various standard system utilities to collect +# system performance statistics and writes them out to datafile named +# HOSTNAME/stats.YYYY-MM-DD-HHmm under the OUT_ROOT directory. +# +# It runs for the the numbers specified by DURATION collecting data +# every INTERVAL number of seconds. After DURATION, the script +# closes and compresses it's datafile via /usr/bin/compress and then +# exits. If DURATION=24 and INTERVAL=300 (recommended) then the +# following cron entry would collect continuos stats for a system: +# +# 0 0 * * * //orca-aix-stat.pl +# +# 2003-09-10 - RV - Modified for AIX 4.3/5.x.. by Rajesh Verma +# (rajeshverma at aixdude.com) +# v1.7 - RV - ignores /proc now +# 2001-04-16 - JDK - Genesis... by Jason D. Kelleher +# 2001-05-02 - JDK - Updates to make data aggregation easier. +# Added #open connections, pagestotl. +# 2001-07-06 - JDK - added command-line args & data checks +# 2001-07-09 - JDK - added signal handler, column checks, & umask +# 2001-07-10 - JDK - now autodetects interfaces via netstat -i +# v1.5 +# +# $HeadURL$ +# $LastChangedDate$ +# $LastChangedBy$ +# $LastChangedRevision$ + +# Note: Execution speed is more important than cleanliness here. + +# Explicitly set PATH to prevent odd problems if run manually. +$ENV{PATH} = '/usr/bin:/etc:/usr/sbin:/usr/ucb:/sbin'; + +$Usage_Message = ' +Usage: orca-aix-stat.pl [-r out_root] [-i interval] [-d duration] [-h] + +-r out_root set root output directory, default: /opt/log/performance +-i interval number of seconds between checks, default: 300 +-d duration number of hours to run, default: 24 +-h this message + +'; +############################ +# These are the packages you need to install +# 1. perl +# 2. openssh - if using ssh to the collector server +# 3. openssl +# 4. zlib +# 5. rsync - To copy file to the collector server +# 6. gzip - to zip the files +# 7. rpm.rte - to install rpm tools +# +# This the site you can file everything +# http://www-1.ibm.com/servers/aix/products/aixos/linux/download.html +# http://www.bullfreeware.com +# +# +# Good Luck, Rajesh Verma (rajeshverma at yahoo.com) +############################## + +# Parse the command line arguments +while ( $#ARGV >= 0 ) { + + if ( $ARGV[0] eq "-r" ) { + shift @ARGV; + $OUT_ROOT = shift @ARGV; + } + elsif ( $ARGV[0] eq "-i" ) { + shift @ARGV; + $INTERVAL = shift @ARGV; + } + elsif ( $ARGV[0] eq "-d" ) { + shift @ARGV; + $DURATION = shift @ARGV; + } + elsif ( $ARGV[0] eq "-h" ) { + print $Usage_Message; + exit 0; + } + elsif ( $ARGV[0] =~ /^-/ ) { + die "Invalid flag: $ARGV[0]\n$Usage_Message"; + } + else { + die "Invalid argument: $ARGV[0]\n$Usage_Message"; + } +} + +## BEGIN set defaults + +$OUT_ROOT ||= '/home/orca/orcallator'; # root directory for datafiles +$INTERVAL ||= 300; # seconds between checks +$DURATION ||= 24; # number of hours to run + +## END set defaults + +## Derived variables. +$iterations = $DURATION * 60 * 60 / $INTERVAL; # Number of checks. +chomp( $HOST = `uname -n` ); +$out_dir = "${OUT_ROOT}/${HOST}"; +( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) = + localtime(time); +$stat_file = + sprintf( "%s/percol-%.2d-%.2d-%.2d-%1d%.2d", $out_dir, $year + 1900, $mon + 1, + $mday, $hour, $min ); + +# Base all timestamps on start time. +$start_time = time(); +$timestamp = 0; + +## Autodetect network interfaces +#open IN, "ifconfig -a|"; +open IN, "netstat -ni|"; +while () { + + # if ( /^(\S+):/ ) { + if (/^(\w+).*link/) { + push @net_interfaces, $1; + } +} +close IN; + +# Grab some base system info prior to collecting stats. +open IN, "lsattr -El sys0 -a realmem |"; +while () { + if (/^realmem (\d+) /) { + $pagestotl = $1 * 1024 / 4096; # Grab realmem in KB and convert to pages. + $mem_totl = $1 * 1024; # Grab realmem in KB and convert to Bytes. + + # this gets used down in the vmstat section + } +} +close IN; + +## Make sure we can write output. +umask 0022; # make sure the file can be harvested +unless ( -d $out_dir ) { + system( "mkdir", "-p", "$out_dir" ); +} +open OUT, ">$stat_file" or die "ERROR: Could not open $stat_file: $!"; +my $oldfh = select OUT; +$| = 1; +select $oldfh; + +# Set signal handlers to close and compress the output +# file just in case. +$SIG{HUP} = \&exit_nicely; +$SIG{INT} = \&exit_nicely; +$SIG{QUIT} = \&exit_nicely; +$SIG{TERM} = \&exit_nicely; + +# Set gloabals used for printing (or not) headers. +$need_header = 1; +$prev_header_cnt = 0; +$prev_info_cnt = 0; + +while ( $iterations-- > 0 ) { + + $timestamp = $timestamp ? time() : $start_time; + ( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) = + localtime(time); + $locltime = sprintf( "%.2d:%.2d:%.2d", $hour, $min, $sec ); + + ## Get runq data + ## Get runq data + $uptime = 0; + open IN, "uptime |"; + while () { + if (/load average:\s+(\S+),\s+(\S+),\s+(\S+)/) { + $load_info = join "\t", $1, $2, $3; + } + @upt = split(/ +/,); + $uptd = $upt[3]; + $nusr = $upt[6]; + $up_day = $uptd * 24 * 60 * 60; + if (/days,\s+(\S+):(\S+), /) { + $up_hrs = $1 * 60 * 60; + $up_min = $2 * 60; + } + $uptime = $up_day + $up_hrs + $up_min; + } + close IN; + $load_header = "1runq\t5runq\t15runq"; + $up_header = "uptime\tnusr"; + $up_info = "$uptime\t$nusr"; + + if ( scalar( split ' ', $load_header ) != scalar( split ' ', $load_info ) ) + { + $load_header = ''; + $load_info = ''; + $need_header = 1; + print STDERR "WARNING: load header does not match load info.\n"; + } + if ( scalar( split ' ', $up_header ) != scalar( split ' ', $up_info ) ) + { + $up_header = ''; + $up_info = ''; + $need_header = 1; + print STDERR "WARNING: UP header does not match load info.\n"; + } + + + ## Get number of system processes + $num_proc = -1; # Don't count the header. + open IN, "ps -ek |"; + while () { + $num_proc++; + } + close IN; + $proc_info = $num_proc; + $proc_header = '#proc'; + + if ( scalar( split ' ', $proc_header ) != scalar( split ' ', $proc_info ) ) + { + $proc_header = ''; + $proc_info = ''; + $need_header = 1; + print STDERR "WARNING: #proc header does not match #proc info.\n"; + } + + ## Get pstat data for pages + $sw_used = 0; + $sw_free = 0; + open IN, "pstat -s |tail -3 |"; + while () { + @swp = split(/ +/,); + if (/\d/) { + $sw_used = $swp[1]; + $sw_free = $swp[2]; + $swap_used = $sw_used * 4096; + $swap_free = $sw_free * 4096; + } + } + close IN; + $swap_info = "$swap_used\t$swap_free"; + $swap_header = "\tswap_used\tswap_free"; + + if ( scalar( split ' ', $swap_header ) != + scalar( split ' ', $swap_info ) ) + { + print STDERR "WARNING: pstat header does not match pstat info.\n"; + $swap_header = ''; + $swap_info = ''; + $need_header = 1; + } + + + + ## Get vmstat data + open IN, "vmstat 1 2|"; + while () { + chomp; + if (/^[\s\d]+$/) { + + # overwrite first line on 2nd pass + ( + $vmstat_r, $vmstat_b, $vmstat_avm, $vmstat_fre, + $vmstat_re, $vmstat_pi, $vmstat_po, $vmstat_fr, + $vmstat_sr, $vmstat_cy, $vmstat_inf, $vmstat_syf, + $vmstat_csf, $vmstat_us, $vmstat_sy, $vmstat_id, + $vmstat_wa ) + = split; + $vmstat_info = join "\t", $vmstat_r, $vmstat_b, $vmstat_avm, + $vmstat_fre, $pagestotl, $vmstat_pi, $vmstat_po, $vmstat_fr, + $vmstat_sr, $vmstat_us, $vmstat_sy, $vmstat_wa, $vmstat_id; + } + } + close IN; + $vmstat_header = +"runque\twaiting\tpagesactive\tpagesfree\tpagestotl\tPagesI/s\tPagesO/s\tPagesF/s\tscanrate\tusr%\tsys%\twio%\tidle%"; + + if ( scalar( split ' ', $vmstat_header ) != + scalar( split ' ', $vmstat_info ) ) + { + print STDERR "WARNING: vmstat header does not match vmstat info.\n"; + $vmstat_header = ''; + $vmstat_info = ''; + $need_header = 1; + } + + ## Get filesystem data + $fs_header = ''; + $fs_info = ''; + open IN, "df -k -v |"; + while () { + chomp; + + if (m%^/dev%) { + ( $mnt_dev, $blocks, $used, $free, $pct_used, $iused, $ifree, + $ipct_used, $mnt ) = split; + + # Recalculate percents because df rounds. + $fs_info .= "\t" + . sprintf( "%s\t%s\t%s\t%.5f\t%d\t%s\t%s\t%.5f", $blocks, $used, + $free, ( $used / $blocks ) * 100, ( $iused + $ifree ), $iused, + $ifree, ( $iused / ( $iused + $ifree ) ) * 100 ); + $fs_header .= "\t" . join "\t", "mntC_$mnt", "mntU_$mnt", + "mntA_$mnt", "mntP_$mnt", "mntc_$mnt", "mntu_$mnt", "mnta_$mnt", + "mntp_$mnt"; + } + } + close IN; + + if ( scalar( split ' ', $fs_header ) != scalar( split ' ', $fs_info ) ) { + print STDERR + "WARNING: filesystem header does not match filesystem info.\n"; + $fs_header = ''; + $fs_info = ''; + $need_header = 1; + } + + ## Get iostat data + $disk_t = 0; + $disk_rK = 0; + $disk_wK = 0; + undef %disks; + open IN, "iostat -d 1 2|"; + + while () { + if (/^(\S+)\s+\S+\s+\S+\s+(\S+)\s+(\d+)\s+(\d+)/) { + my $disk = $1; + my $tps = $2; + my $rK = $3; + my $wK = $4; + if ( not $disks{$disk} ) { + $disks{$disk}++; # Get rK & wK from first pass. + $disk_rK += $rK; + $disk_wK += $wK; + } + else { + $disk_t += $tps; # Get trans per sec from second pass. + } + } + } + close IN; + $iostat_header = "disk_t/s\tdisk_rK/s\tdisk_wK/s"; + $iostat_info = "${disk_t}\t${disk_rK}\t${disk_wK}"; + + if ( scalar( split ' ', $iostat_header ) != + scalar( split ' ', $iostat_info ) ) + { + print STDERR "WARNING: iostat header does not match iostat info.\n"; + $iostat_header = ''; + $iostat_info = ''; + $need_header = 1; + } + + ## Get packet data + $packet_header = ''; + $packet_info = ''; + + #foreach $interface ( split(/\s+/, $NET_INTERFACES) ) { + foreach $interface (@net_interfaces) { + $packet_header .= +"\t${interface}Ipkt/s\t${interface}IErr/s\t${interface}Opkt/s\t${interface}OErr/s\t${interface}Coll/s\t"; + open IN, "netstat -n -I $interface 1|"; + + while () { + if (/^\s*(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+/) { + $packet_info .= "\t" . join "\t", $1, $2, $3, $4, $5; + last; + } + } + close IN; + } + + if ( scalar( split ' ', $packet_header ) != + scalar( split ' ', $packet_info ) ) + { + print STDERR "WARNING: packet header does not match packet info.\n"; + $packet_header = ''; + $packet_info = ''; + $need_header = 1; + } + + ## Get TCP Connection data + $tcp_estb = 0; + open IN, "netstat -an |"; + while () { + if (/^tcp.+ESTABLISHED$/) { + $tcp_estb++; + } + } + close IN; + $tcp_info = $tcp_estb; + $tcp_header = 'tcp_estb'; + + if ( scalar( split ' ', $tcp_estb_header ) != + scalar( split ' ', $tcp_estb_info ) ) + { + print STDERR "WARNING: tcp_estb header does not match tcp_estb info.\n"; + $tcp_estb_header = ''; + $tcp_estb_info = ''; + $need_header = 1; + } + + ## Get TSM Database space usage + $tsmdb = 0; + open IN, "dsmadmc -id=view -password=view 'query db' |tail -r -n 5 |"; + while () { + @fld = split(/ +/,); + if (/\d/) { + $tsmdb = $fld[8]; + } + } + close IN; + $tsm_info = $tsmdb; + $tsm_header = "tsmdb\t"; + + if ( scalar( split ' ', $tsm_header ) != + scalar( split ' ', $tsm_info ) ) + { + print STDERR "WARNING: tsmdb header does not match tsmdb info.\n"; + $tsm_header = ''; + $tsm_info = ''; + $need_header = 1; + } + + ## Get Memory Usage breakup using SVMON + $mem_work = 0; + $mem_pres = 0; + $mem_clnt = 0; + open IN, "svmon -G |tail -2 |"; + while () { + @memp = split(/ +/,); + if (/use\s+(\d+) /) { + $m_work = $memp[2]; + $m_pres = $memp[3]; + $m_clnt = $memp[4]; + $mem_work = $m_work * 4096; + $mem_pres = $m_pres * 4096; + $mem_clnt = $m_clnt * 4096; + } + } + close IN; + $mem_info = "$mem_work\t$mem_pres\t$mem_clnt\t$mem_totl"; + $mem_header = "mem_work\tmem_pres\tmem_clnt\tmem_totl"; + + if ( scalar( split ' ', $mem_header ) != + scalar( split ' ', $mem_info ) ) + { + print STDERR "WARNING: memory header does not match memory info.\n"; + $mem_header = ''; + $mem_info = ''; + $need_header = 1; + } + + ## Get TSM Tape Drive usage + $rmt = 0; + $rmt5 = 5; + open IN, "dsmadmc -id=view -password=view 'query mount' |grep matches |"; + while () { + @fld = split(/ +/,); + if (/\d/) { + $rmt = $fld[1]; + } + } + close IN; + $tsm_rmt_header = "rmt5\trmt\t"; + $tsm_rmt_info = "$rmt5\t$rmt"; + + if ( scalar( split ' ', $tsm_rmt_header ) != + scalar( split ' ', $tsm_rmt_info ) ) + { + print STDERR "WARNING: TSM RMT header does not match TSM RMT info.\n"; + $tsm_rmt_header = ''; + $tsm_rmt_info = ''; + $need_header = 1; + } + + ## Get TSM Recovery Log space usage + $tsmdb = 0; + open IN, "dsmadmc -id=view -password=view 'query log' |tail -r -n 4 |"; + while () { + @fld = split(/ +/,); + if (/\d/) { + $tsmlog = $fld[8]; + } + } + close IN; + $tsm_log_info = $tsmlog; + $tsm_log_header = 'tsmlog'; + + if ( scalar( split ' ', $tsm_log_header ) != + scalar( split ' ', $tsm_log_info ) ) + { + print STDERR "WARNING: TSM Log header does not match TSM Log info.\n"; + $tsm_log_header = ''; + $tsm_log_info = ''; + $need_header = 1; + } + + ## Get TSM Tape usage + $tsmpvt = 0; + open IN, "dsmadmc -id=view -password=view 'query libvol' | grep 'Private' | wc -l |"; + while () { + chomp; + @fld = split(/ +/,); + if (/\d/) { + $tsmpvt = $fld[1]; + } + } + close IN; + + $tsmscr = 0; + open IN, "dsmadmc -id=view -password=view 'query libvol' | grep 'Scratch' | wc -l |"; + while () { + chomp; + @fld = split(/ +/,); + if (/\d/) { + $tsmscr = $fld[1]; + } + } + close IN; + + $tsmvlt = 0; + open IN, "dsmadmc -id=view -password=view 'query drmedia' | grep 'Vault' | wc -l |"; + while () { + chomp; + @fld = split(/ +/,); + if (/\d/) { + $tsmvlt = $fld[1]; + } + } + + $tsm_tape_info = join "\t", $tsmpvt, $tsmscr, $tsmvlt; + $tsm_tape_header = join "\t", tsmpvt, tsmscr, tsmvlt; + + if ( scalar( split ' ', $tsm_tape_header ) != + scalar( split ' ', $tsm_tape_info ) ) + { + print STDERR "WARNING: TSM Tape header does not match TSM Tape info.\n"; + $tsm_tape_header = ''; + $tsm_tape_info = ''; + $need_header = 1; + } + + ## Get TSM Disk Storage Pool usage + $tsmphcy = 0; + $tsmphcn = 0; + open IN, "dsmadmc -id=view -password=view 'query stgpool' |"; + while () { + @fld = split(/ +/,); + if (/\d/) { + if ( $fld[0] eq "PHCYDISKPO-" ) { + $tsmphcy = $fld[3]; + } + elsif ( $fld[0] eq "PHCNDISKPO-" ) { + $tsmphcn = $fld[3]; + } + } + } + close IN; + + $tsm_stg_info = join "\t", $tsmphcy, $tsmphcn; + $tsm_stg_header = join "\t", tsmphcy, tsmphcn; + + if ( scalar( split ' ', $tsm_stg_header ) != + scalar( split ' ', $tsm_stg_info ) ) + { + print STDERR "WARNING: TSM Storage Pool header does not match TSM Storage Pool info.\n"; + $tsm_stg_header = ''; + $tsm_stg_info = ''; + $need_header = 1; + } + + ## Join header and info then verify column counts. + $out_header = join "\t", "timestamp", "locltime", $load_header, $up_header, + $proc_header, $vmstat_header, $fs_header, $iostat_header, $packet_header, + $tcp_header, $tsm_header, $swap_header, $mem_header, $tsm_rmt_header, + $tsm_log_header, $tsm_tape_header, $tsm_stg_header; + $out_header =~ tr/ \t/\t/s; # translate whitespace to single tabs + + $out_info = join "\t", $timestamp, $locltime, $load_info, $up_info, $proc_info, + $vmstat_info, $fs_info, $iostat_info, $packet_info, $tcp_info, $tsm_info, + $swap_info, $mem_info, $tsm_rmt_info, $tsm_log_info, $tsm_tape_info, + $tsm_stg_info; + $out_info =~ tr/ \t/\t/s; # translate whitespace to single tabs + + $header_cnt = split ' ', $out_header; + $info_cnt = split ' ', $out_info; + if ( $header_cnt != $info_cnt ) { + print STDERR + "ERROR: header columns do not equal data columns. Exiting.\n"; + &exit_nicely; + } + elsif ( $header_cnt != $prev_header_cnt or $info_cnt != $prev_info_cnt ) { + $need_header = 1; + } + $prev_header_cnt = $header_cnt; + $prev_info_cnt = $info_cnt; + + ## Write output + if ($need_header) { + print OUT $out_header, "\n"; + $need_header = 0; + } + print OUT $out_info, "\n"; + + sleep $INTERVAL - ( time() - $timestamp ); + +} +close OUT; + + at args = ( "/usr/local/bin/gzip", "-f", "$stat_file" ); +system(@args); + +exit 0; + +# This subroutine is called by the signal handler. +sub exit_nicely { + close OUT; + @args = ( "/usr/local/bin/gzip", "-f", "$stat_file" ); + system(@args); + exit 0; +} Added: trunk/orca/data_gatherers/aix/orcallatorAIX.cfg ============================================================================== --- (empty file) +++ trunk/orca/data_gatherers/aix/orcallatorAIX.cfg Sat Apr 3 16:07:15 2004 @@ -0,0 +1,825 @@ +# Orca configuration file for orcallator files. + +# $HeadURL$ +# $LastChangedDate$ +# $LastChangedBy$ +# $LastChangedRevision$ + +# Require at least this version of Orca. +require Orca 0.265 + +# base_dir is prepended to the paths find_files, html_dir, rrd_dir, +# and state_file only if the path does not match the regular +# expression ^\\?\.{0,2}/, which matches /, ./, ../, and \./. +base_dir /opt/orca/var/orca/orca-aix + +# rrd_dir specifies the location of the generated RRD data files. If +# rrd_dir is a relative path, then it is made relative to base_dir if +# base_dir is set. +rrd_dir . + +# state_file specifies the location of the state file that remembers +# the modification time of each source data file. If state_file is a +# relative path, then it is made relative to base_dir is base_dir is +# set. +state_file orca.state + +# html_dir specifies the top of the HTML tree created by Orca. +html_dir /opt/orca/html/orcallator + +# By default create .meta tag files for all PNGs or GIFs so that the +# web browser will automatically reload them. +expire_images 1 + +# Find files at the following times: +# 0:10 to pick up new orcallator files for the new day. +# 1:00 to pick up late comer orcallator files for the new day. +# 6:00 to pick up new files before the working day. +# 12:00 to pick up new files during the working day. +# 19:00 to pick up new files after the working day. +find_times 0:10 1:00 6:00 12:00 19:00 + +# This defines the email address of people to warn when a file that is +# being updated constantly stops being updated. For mathematical +# expressions use the word `interval' to get the interval number for +# the data source. +#warn_email rajesh.verma at palmettohealth.org +late_interval interval + 30 + +# These parameters specify which plots to generate. +generate_hourly_plot 1 +generate_daily_plot 1 +generate_weekly_plot 1 +generate_monthly_plot 1 +generate_quarterly_plot 1 +generate_yearly_plot 1 + +# This sets the HTML markup that is placed at the very top of every +# web page and is primarly used to display the site's logo. +html_page_header + + + +# This sets the text that is placed in the pages' +# element and just after the html_page_header HTML markup text is +# placed on the page. +html_top_title Palmetto Health IBM-AIX Host Status + +# This sets the HTML markup that is placed at the bottom of every web +# page. +html_page_footer + + These plots brought to you by your Unix System Administrator. + + +# This defines where the find the source data files and the format of +# those files. Notes about the fields: +# find_files +# You'll notice that all but the first () has the form (?:...). +# This tells Perl to match the expression but not save the matched +# text in the $1, $2, variables. Orca uses the matched text to +# generate a subgroup name, which is used to place files into +# different subgroups. Here, only the hostname should be used to +# generate a subgroup name, hence all the (?:...) for matching +# anything else. +# interval +# The interval here must match the interval used by orcallator to +# record data. Do not change this, as it has an effect on the +# generated RRD data files. + +group orcallator { +find_files /opt/orca/var/orca/orca-aix/(.*)/(?:(?:orcallator)|(?:percol))-\d{4}-\d{2}-\d{2}(?:-\d{3,})?(?:\.(?:Z|gz|bz2))? +column_description first_line +date_source column_name timestamp +interval 300 +filename_compare sub { + my ($ay, $am, $ad) = $a =~ /-(\d{4})-(\d\d)-(\d\d)/; + my ($by, $bm, $bd) = $b =~ /-(\d{4})-(\d\d)-(\d\d)/; + if (my $c = (( $ay <=> $by) || + ( $am <=> $bm) || + (($ad >> 3) <=> ($bd >> 3)))) { + return 2*$c; + } + $ad <=> $bd; + } +} + +plot { +title %g System Overview +source orcallator +data state_c / 2 +data state_D / 2 +data state_N / 2 +data state_t / 2 +data state_n / 2 +data state_s / 2 +data state_r / 2 +data state_k / 2 +data state_m / 2 +data state_d / 2 +data state_i / 2 +line_type line3 +summary_format %8.2lf %S +legend CPU power +legend Disk +legend Network +legend TCP/IP stack +legend NFS RPC client +legend Swap space +legend RAM demand +legend Kernel memory +legend Kernel contention +legend DNLC +legend Inode cache +y_legend Severity level +data_min 0 +plot_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#system_overview +} + + +plot { +title %g Average # Processes in Run Queue (Load Average) +source orcallator +data 1runq +data 5runq +data 15runq +legend 1 minute average +legend 5 minute average +legend 15 minute average +y_legend Number Processes +data_min 0 +data_max 1000 +href http://www.orcaware.com/orca/docs/orcallator.html#processes_in_run_queue +} + +plot { +title %g CPU Usage +source orcallator +data usr% +data sys% +data wio% +data idle% +line_type area +line_type stack +line_type stack +line_type stack +legend User +legend System +legend Wait IO +legend Idle +y_legend Percent +data_min 0 +data_max 100 +plot_min 0 +plot_max 100 +rigid_min_max 1 +href http://www.orcaware.com/orca/docs/orcallator.html#cpu_usage +} + +plot { +title %g Processes in Run Queue/Waiting/Swapped +source orcallator +data runque +data waiting +line_type area +line_type stack +legend processes in run queue +legend processes waiting for IO +y_legend Number Processes +data_min 0 +} + +plot { +title %g Memory Free +source orcallator +data 4096 * pagestotl - 4096 * pagesfree +data 4096 * pagesfree +line_type area +line_type stack +legend Used Physical memory +legend Free physical memory +y_legend Bytes/s +base 1024 +data_min 0 +plot_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#memory_free +} + +plot { +title %g Memory Usage Breakup in Bytes +source orcallator +data mem_work +data mem_pres +data mem_clnt +line_type area +line_type stack +line_type stack +legend Working Segment +legend Presistent Segment +legend Client Segment +y_legend Number Of Bytes +data_min 0 +plot_min 0 +color 00ff00 +color ff0000 +color 0000ff +href http://www.orcaware.com/orca/docs/orcallator.html#page_usage +} + +plot { +title %g Available Swap Space in Bytes +source orcallator +data swap_used +data swap_free +line_type area +line_type stack +legend Used swap space +legend Free swap space +y_legend Bytes +base 1024 +data_min 0 +data_min 1000000000 +href http://www.orcaware.com/orca/docs/orcallator.html#available_swap_space +} + +plot { +title %g Memory Page Scan Rate +source orcallator +data scanrate +line_type area +legend Page scan rate +y_legend Pages/s +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#page_scan_rate +} + +plot { +plot_width 580 +title %g Disk Space Percent Usage +source orcallator +data mntP_(.*) +line_type line2 +legend $1 +y_legend Percent Used +data_min 0 +data_max 100 +plot_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#disk_space_percent_usage +} + +plot { +title %g Disk Inode Percent Usage +source orcallator +data mntp_(.*) +line_type line2 +legend $1 +y_legend Percent Used +data_min 0 +data_max 100 +plot_min 0 +plot_max 100 +href http://www.orcaware.com/orca/docs/orcallator.html#disk_inode_percent_usage +} + +plot { +title %g Disk System Wide Reads/Writes Per Second +source orcallator +data 1024 * disk_rK/s +data 1024 * disk_wK/s +line_type area +line_type line1 +legend Data Read/s +legend Data Write/s +y_legend Bytes/s +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#disk_system_wide_reads_writes_per_second +} + +plot { +title %g Disk System Wide Transfer Rate +source orcallator +data disk_t/s +line_type area +legend Number of transfer/s +y_legend Bytes/s +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#disk_system_wide_transfer_rate +} + +plot { +title %g Number of Users +source orcallator +data nusr +line_type area +legend Number of Users/s +y_legend Users +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#disk_system_wide_transfer_rate +} + +plot { +title %g System Uptime +source orcallator +data uptime /86400 +line_type area +legend Number of Day/s +y_legend Days +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#system_uptime +} + +plot { +title %g TCP Number Open Connections +source orcallator +data tcp_estb +line_type area +legend # open connections +y_legend Number Open TCP Connections +data_min 0 +data_max 50000 +href http://www.orcaware.com/orca/docs/orcallator.html#TCP_number_open_connections +} + +plot { +title %g New Process Spawn Rate +source orcallator +data #proc/s +data #proc/p5s +line_type area +line_type line1 +legend 5 min average +legend Peak 5 second +y_legend New processes/s +data_min 0 +data_max 100000 +href http://www.orcaware.com/orca/docs/orcallator.html#new_process_spawn_rate +} + +plot { +title %g Number of System & Web Server Processes +source orcallator +data #proc +data #httpds +line_type line1 +line_type area +legend System total +legend Number web servers +y_legend Number Processes +data_min 0 +data_max 10000 +color 0000ff +color 00ff00 +href http://www.orcaware.com/orca/docs/orcallator.html#number_system_processes +} + +plot { +title %g Number of Web Server Processes +source orcallator +data #httpds +line_type area +legend Number web servers +y_legend Number Processes +data_min 0 +data_max 10000 +href http://www.orcaware.com/orca/docs/orcallator.html#number_web_server_processes +} + +plot { +title %g Web Server Hit Rate +source orcallator +data httpop/s +data http/p5s +line_type area +line_type line1 +legend 5 min average hits/s +legend Peak 5 second hits/s +y_legend Hits/s +data_min 0 +color 00ff00 +color 0000ff +href http://www.orcaware.com/orca/docs/orcallator.html#web_server_hit_rate +} + +plot { +title %g Web Server File Size +source orcallator +data %to1KB +data %to10KB +data %to100KB +data %to1MB +data %over1MB +line_type area +line_type stack +line_type stack +line_type stack +line_type stack +legend 0 - 1 KB +legend 1 - 10 KB +legend 10 - 100 KB +legend 100 - 1000 KB +legend Greater than 1 MB +y_legend Percent +data_min 0 +data_max 100 +plot_min 0 +plot_max 100 +rigid_min_max 1 +href http://www.orcaware.com/orca/docs/orcallator.html#web_server_file_size +} + +plot { +title %g Web Server Data Transfer Rate +source orcallator +data httpb/s +line_type area +legend Bytes/s +y_legend Bytes/s +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#web_server_data_transfer_rate +} + +plot { +title %g Web Server HTTP Error Rate +source orcallator +data htErr/s +line_type area +legend HTTP errors/s +y_legend Errors/s +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#web_server_error_rate +} + +# Interface bits per second for 10 Mbit interfaces. +#plot { +#title %g Interface Bits Per Second: $1 +#source orcallator +#data 1024 * 8 * ((?:(?:elxl)|(?:le)|(?:qe))\d+)InKB/s +#data 1024 * 8 * $1OuKB/s +#line_type area +#line_type line1 +#legend Input +#legend Output +#y_legend Bits/s +#data_min 0 +#data_max 10000000 +#href http://www.orcaware.com/orca/docs/orcallator.html#interface_bits_per_second +#} +# +## Interface bits per second for 100 Mbit interfaces. +#plot { +#title %g Interface Bits Per Second: $1 +#source orcallator +#data 1024 * 8 * ((?:(?:be)|(?:dmfe)|(?:eri)|(?:hme)|(?:qfe)|(?:znb))\d+)InKB/s +#data 1024 * 8 * $1OuKB/s +#line_type area +#line_type line1 +#legend Input +#legend Output +#y_legend Bits/s +#data_min 0 +#data_max 100000000 +#href http://www.orcaware.com/orca/docs/orcallator.html#interface_bits_per_second +#} +# +## Interface bits per second for 1 Gbit interfaces. +#plot { +#title %g Interface Bits Per Second: $1 +#source orcallator +#data 1024 * 8 * ((?:(?:ce)|(?:v?ge)|(?:skge))\d+)InKB/s +#data 1024 * 8 * $1OuKB/s +#line_type area +#line_type line1 +#legend Input +#legend Output +#y_legend Bits/s +#data_min 0 +#data_max 1000000000 +#href http://www.orcaware.com/orca/docs/orcallator.html#interface_bits_per_second +#} + +#plot { +#title %g Interface Packets Per Second: $1 +#source orcallator +#data (.*\d+)Ipkt/s +#data $1Opkt/s +#line_type area +#line_type stack +#legend Input +#legend Output +#y_legend Packets/s +#data_min 5000 +#data_max 1000000000 +#flush_regexps 1 +#href http://www.orcaware.com/orca/docs/orcallator.html#interface_packets_per_second +#} + +#plot { +#title %g Interface Errors Per Second: $1 +#source orcallator +#data (.*\d+)IErr/s +#data $1OErr/s +#line_type area +#line_type stack +#legend Input +#legend Output +#y_legend Errors/s +#data_min 0 +#data_max 1000000000 +#flush_regexps 1 +#href http://www.orcaware.com/orca/docs/orcallator.html#interface_errors_per_second +#} +# +#plot { +#title %g Interface Deferred Packet Rate +#source orcallator +#data (.*\d+)Defr/s +#line_type area +#legend $1 +#y_legend Defers/s +#data_min 0 +#flush_regexps 1 +#href http://www.orcaware.com/orca/docs/orcallator.html#interface_deferred_packet_rate +#} + +#plot { +#title %g Interface Collisions: $1 +#source orcallator +#data (.*\d+)Coll% +#line_type area +#legend $1 +#y_legend Percent +#data_min 0 +#data_max 200 +#flush_regexps 1 +#href http://www.orcaware.com/orca/docs/orcallator.html#interface_collisions +#} + +#plot { +#title %g Interface Nocanput Rate +#source orcallator +#data (.*\d+)NoCP/s +#line_type area +#legend $1 +#y_legend Nocanput/s +#data_min 0 +#flush_regexps 1 +#href http://www.orcaware.com/orca/docs/orcallator.html#interface_nocanput_rate +#} +# +#plot { +#title %g TCP Bits Per Second +#source orcallator +#data 1024 * 8 * tcp_InKB/s +#data 1024 * 8 * tcp_OuKB/s +#line_type area +#line_type line1 +#legend Input +#legend Output +#y_legend Bits/s +#data_min 0 +#data_max 1000000000 +#href http://www.orcaware.com/orca/docs/orcallator.html#TCP_bits_per_second +#} +# +#plot { +#title %g TCP Segments Per Second +#source orcallator +#data tcp_Iseg/s +#data tcp_Oseg/s +#line_type area +#line_type line1 +#legend Input +#legend Output +#y_legend Segments/s +#data_min 0 +#data_max 20000 +#href http://www.orcaware.com/orca/docs/orcallator.html#TCP_segments_per_second +#} + +#plot { +#title %g TCP Retransmission & Duplicate Received Percentage +#source orcallator +#data tcp_Ret% +#data tcp_Dup% +#line_type area +#line_type line1 +#legend Retransmission +#legend Duplicate received +#y_legend Percent +#data_min 0 +#data_max 200 +#href http://www.orcaware.com/orca/docs/orcallator.html#TCP_retransmission_duplicate_received_percentage +#} +# +#plot { +#title %g TCP New Connection Rate +#source orcallator +#data tcp_Icn/s +#data tcp_Ocn/s +#line_type area +#line_type line1 +#legend Input - passive +#legend Output - active +#y_legend New Connections/s +#data_min 0 +#data_max 10000 +#href http://www.orcaware.com/orca/docs/orcallator.html#TCP_new_connection_rate +#} +# + +#plot { +#title %g TCP Reset Rate +#source orcallator +#data tcp_Rst/s +#line_type area +#legend Number TCP resets/s +#y_legend Resets/s +#data_min 0 +#href http://www.orcaware.com/orca/docs/orcallator.html#TCP_reset_rate +#} +# +#plot { +#title %g TCP Attempt Fail Rate +#source orcallator +#data tcp_Atf/s +#line_type area +#legend TCP attempt fails/s +#y_legend TCP Attempt Fails/s +#data_min 0 +#href http://www.orcaware.com/orca/docs/orcallator.html#TCP_attempt_fail_rate +#} +# +#plot { +#title %g TCP Listen Drop Rate +#source orcallator +#data tcp_Ldrp/s +#data tcp_LdQ0/s +#data tcp_HOdp/s +#legend TCP listen drops +#legend TCP listen drop Q0 +#legend TCP half open drops +#y_legend TCP Listen Drops/s +#data_min 0 +#href http://www.orcaware.com/orca/docs/orcallator.html#TCP_listen_drop_rate +#} + +#plot { +#title %g Sleeps on Mutex Rate +#source orcallator +#data smtx +#data smtx/cpu +#line_type area +#line_type line1 +#legend Sleeps on mutex +#legend Sleeps on mutex/cpu +#y_legend Sleeps on Mutex/s +#data_min 0 +#href http://www.orcaware.com/orca/docs/orcallator.html#sleeps_mutex_rate +#} +# +#plot { +#title %g NFS Server Call Rate +#source orcallator +#data nfss_calls +#data v2reads +#data v2writes +#data v3reads +#data v3writes +#data nfss_bad +#data_type counter +#line_type area +#line_type area +#line_type stack +#line_type stack +#line_type stack +#line_type stack +#legend NFS server calls/s +#y_legend NFS Server Calls/s +#data_min 0 +#href http://www.orcaware.com/orca/docs/orcallator.html#NFS_server_call_rate +#} +# +#plot { +#title %g NFS Server Call Distribution +#source orcallator +#data v2reads +#data v2writes +#data v3reads +#data v3writes +#data_type counter +#line_type area +#line_type stack +#line_type stack +#line_type stack +#line_type stack +#y_legend NFS Server Calls/s +#data_min 0 +#href http://www.orcaware.com/orca/docs/orcallator.html#NFS_server_call_distribution +#} +# +#plot { +#title %g NFS Client Call Rate +#source orcallator +#data nfs_call/s +#line_type area +#legend NFS client calls/s +#y_legend NFS Client Calls/s +#data_min 0 +#href http://www.orcaware.com/orca/docs/orcallator.html#NFS_client_call_rate +#} +# +#plot { +#title %g NFS Timeouts & Bad Transmits Rate +#source orcallator +#data nfs_timo/s +#data nfs_badx/s +#line_type area +#line_type line1 +#legend NFS timeouts +#legend Bad transmits +#y_legend Count/s +#data_min 0 +#href http://www.orcaware.com/orca/docs/orcallator.html#NFS_timeouts_bad_transmits_rate +#} +# +##plot { +##title %g Disk Run Percent +##source orcallator +##data disk_runp_((?:c\d+t\d+d\d+)|(?:c\d+d\d+)|(?:[ms]d\d+)) +##line_type line2 +##legend $1 +##y_legend Run Percent +##data_min 0 +#data_max 100 +#plot_min 0 +#href http://www.orcaware.com/orca/docs/orcallator.html#disk_run_percent +#} + +#plot { +#title %g Cache Hit Percentages +#source orcallator +#data dnlc_hit% +#data inod_hit% +#line_type area +#line_type line1 +#legend DNLC +#legend Inode cache +#y_legend Percent +#data_min 0 +#data_max 100 +#href http://www.orcaware.com/orca/docs/orcallator.html#cache_hit_percentages +#} +# +#plot { +#title %g Cache Reference Rate +#source orcallator +#data dnlc_ref/s +#data inod_ref/s +#line_type area +#line_type line1 +#legend DNLC +#legend Inode cache +#y_legend References/s +#data_min 0 +#href http://www.orcaware.com/orca/docs/orcallator.html#cache_reference_rate +#} +# +#plot { +#title %g Cache Inode Steal Rate +#source orcallator +#data inod_stl/s +#line_type area +#legend Inode w/page steals/s +#y_legend Steals/s +#data_min 0 +#href http://www.orcaware.com/orca/docs/orcallator.html#inode_steal_rate +#} +# +# +#plot { +#title %g Memory Page Residence Time +#source orcallator +#data page_rstim +#line_type area +#legend Page residence time +#y_legend Seconds +#data_min 0 +#href http://www.orcaware.com/orca/docs/orcallator.html#page_residence_time +#} + +plot { +title %g Memory Pages Locked & IO +source orcallator +data pageslock +data pagesio +line_type area +line_type line1 +legend Locked +legend IO +y_legend Number Of Pages +data_min 0 +plot_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#pages_locked_IO +} + Added: trunk/orca/data_gatherers/aix/orcallatorTSM.cfg ============================================================================== --- (empty file) +++ trunk/orca/data_gatherers/aix/orcallatorTSM.cfg Sat Apr 3 16:07:15 2004 @@ -0,0 +1,193 @@ +# Orca configuration file for orcallator files. + +# $HeadURL$ +# $LastChangedDate$ +# $LastChangedBy$ +# $LastChangedRevision$ + +# Require at least this version of Orca. +require Orca 0.265 + +# base_dir is prepended to the paths find_files, html_dir, rrd_dir, +# and state_file only if the path does not match the regular +# expression ^\\?\.{0,2}/, which matches /, ./, ../, and \./. +base_dir /opt/orcaTSM/var/orca/orcallator + +# rrd_dir specifies the location of the generated RRD data files. If +# rrd_dir is a relative path, then it is made relative to base_dir if +# base_dir is set. +rrd_dir . + +# state_file specifies the location of the state file that remembers +# the modification time of each source data file. If state_file is a +# relative path, then it is made relative to base_dir is base_dir is +# set. +state_file orca.state + +# html_dir specifies the top of the HTML tree created by Orca. +html_dir /opt/orcaTSM/html/orcallator + +# By default create .meta tag files for all PNGs or GIFs so that the +# web browser will automatically reload them. +expire_images 1 + +# Find files at the following times: +# 0:10 to pick up new orcallator files for the new day. +# 1:00 to pick up late comer orcallator files for the new day. +# 6:00 to pick up new files before the working day. +# 12:00 to pick up new files during the working day. +# 19:00 to pick up new files after the working day. +find_times 0:10 1:00 6:00 12:00 19:00 + +# This defines the email address of people to warn when a file that is +# being updated constantly stops being updated. For mathematical +# expressions use the word `interval' to get the interval number for +# the data source. +#warn_email rajesh.verma at palmettohealth.org +late_interval interval + 30 + +# These parameters specify which plots to generate. +generate_hourly_plot 1 +generate_daily_plot 1 +generate_weekly_plot 1 +generate_monthly_plot 1 +generate_quarterly_plot 1 +generate_yearly_plot 1 + +# This sets the HTML markup that is placed at the very top of every +# web page and is primarly used to display the site's logo. +html_page_header + + + +# This sets the text that is placed in the pages' +# element and just after the html_page_header HTML markup text is +# placed on the page. +html_top_title Palmetto Health IBM-TSM Host Status + +# This sets the HTML markup that is placed at the bottom of every web +# page. +html_page_footer + + These plots brought to you by your Unix System Administrator. + + +# This defines where the find the source data files and the format of +# those files. Notes about the fields: +# find_files +# You'll notice that all but the first () has the form (?:...). +# This tells Perl to match the expression but not save the matched +# text in the $1, $2, variables. Orca uses the matched text to +# generate a subgroup name, which is used to place files into +# different subgroups. Here, only the hostname should be used to +# generate a subgroup name, hence all the (?:...) for matching +# anything else. +# interval +# The interval here must match the interval used by orcallator to +# record data. Do not change this, as it has an effect on the +# generated RRD data files. + +group orcallator { +find_files /opt/orcaTSM/var/orca/orcallator/(.*)/(?:(?:orcallator)|(?:percol))-\d{4}-\d{2}-\d{2}(?:-\d{3,})?(?:\.(?:Z|gz|bz2))? +#find_files /opt/orcaTSM/var/orca/orcallator/(.*)/(?:(?:orcallator)|(?:percol))-\d{4}-\d{2}-\d{2}-\d{3}?(?:\.(?:Z|gz|bz2))? +column_description first_line +date_source column_name timestamp +interval 300 +filename_compare sub { + my ($ay, $am, $ad) = $a =~ /-(\d{4})-(\d\d)-(\d\d)/; + my ($by, $bm, $bd) = $b =~ /-(\d{4})-(\d\d)-(\d\d)/; + if (my $c = (( $ay <=> $by) || + ( $am <=> $bm) || + (($ad >> 3) <=> ($bd >> 3)))) { + return 2*$c; + } + $ad <=> $bd; + } +} + +plot { +title %g TSM Tape Drive Usage +source orcallator +data rmt +data rmt5 +line_type area +line_type line2 +legend Number of Tape Drive Requests +legend Number of Physical Tape Drives +y_legend Tape Drives +data_min 0 +plot_min 0 +color 00ff00 +color ff0000 +href http://www.orcaware.com/orca/docs/orcallator.html#tsm_db_space_percent_usage +} + +plot { +title %g TSM Database Space Percent Usage +source orcallator +data tsmdb +line_type area +legend TSM Database +y_legend Percent Used +data_min 0 +data_max 100 +plot_min 0 +plot_max 100 +href http://www.orcaware.com/orca/docs/orcallator.html#tsm_db_space_percent_usage +} + +plot { +title %g TSM Recovery Log Space Percent Usage +source orcallator +data tsmlog +line_type area +legend TSM Recovery Log +y_legend Percent Used +data_min 0 +data_max 100 +plot_min 0 +plot_max 100 +href http://www.orcaware.com/orca/docs/orcallator.html#tsm_db_space_percent_usage +} + +plot { +title %g TSM Tape Usage +source orcallator +data tsmvlt +data tsmpvt +#data tsmvlt + tsmpvt +data tsmscr +data tsmvlt + tsmpvt + tsmscr +line_type area +line_type stack +#line_type line1 +line_type stack +line_type line1 +legend In Use in Vault +legend In Use in Library +#legend Total in Use +legend Scratch in Library +legend Total Tapes +y_legend Number of Tapes +data_min 0 +plot_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#cpu_usage +} + +plot { +title %g TSM Storage Pool Percent Usage +source orcallator +data tsmphcy +data tsmphcn +line_type line2 +line_type line2 +legend TSM Colocate=Yes Storage Pool +legend TSM Colocate=No Storage Pool +y_legend Percent Used +data_min 0 +data_max 100 +plot_min 0 +plot_max 100 +href http://www.orcaware.com/orca/docs/orcallator.html#tsm_db_space_percent_usage +} + Added: trunk/orca/data_gatherers/hp/hporcallator.cfg ============================================================================== --- (empty file) +++ trunk/orca/data_gatherers/hp/hporcallator.cfg Sat Apr 3 16:07:15 2004 @@ -0,0 +1,827 @@ +# Orca configuration file for orcallator files. + +# $HeadURL$ +# $LastChangedDate$ +# $LastChangedBy$ +# $LastChangedRevision$ + +# Require at least this version of Orca. +require Orca 0.265 + +# base_dir is prepended to the paths find_files, html_dir, rrd_dir, +# and state_file only if the path does not match the regular +# expression ^\\?\.{0,2}/, which matches /, ./, ../, and \./. +base_dir /opt/orcaHP/var/orca/orcallator + +# rrd_dir specifies the location of the generated RRD data files. If +# rrd_dir is a relative path, then it is made relative to base_dir if +# base_dir is set. +rrd_dir . + +# state_file specifies the location of the state file that remembers +# the modification time of each source data file. If state_file is a +# relative path, then it is made relative to base_dir is base_dir is +# set. +state_file orca.state + +# html_dir specifies the top of the HTML tree created by Orca. +html_dir /opt/orcaHP/html/orcallator + +# By default create .meta tag files for all PNGs or GIFs so that the +# web browser will automatically reload them. +expire_images 1 + +# Find files at the following times: +# 0:10 to pick up new orcallator files for the new day. +# 1:00 to pick up late comer orcallator files for the new day. +# 6:00 to pick up new files before the working day. +# 12:00 to pick up new files during the working day. +# 19:00 to pick up new files after the working day. +find_times 0:10 1:00 6:00 12:00 19:00 + +# This defines the email address of people to warn when a file that is +# being updated constantly stops being updated. For mathematical +# expressions use the word `interval' to get the interval number for +# the data source. +warn_email rajesh.verma at palmettohealth.org +late_interval interval + 30 + +# These parameters specify which plots to generate. +generate_hourly_plot 1 +generate_daily_plot 1 +generate_weekly_plot 1 +generate_monthly_plot 1 +generate_quarterly_plot 1 +generate_yearly_plot 1 + +# This sets the HTML markup that is placed at the very top of every +# web page and is primarly used to display the site's logo. +html_page_header + + + +# This sets the text that is placed in the pages' +# element and just after the html_page_header HTML markup text is +# placed on the page. +html_top_title Palmetto Health HP-UX Host Status + +# This sets the HTML markup that is placed at the bottom of every web +# page. +html_page_footer + + These plots brought to you by your Unix System Administrator. + + +# This defines where the find the source data files and the format of +# those files. Notes about the fields: +# find_files +# You'll notice that all but the first () has the form (?:...). +# This tells Perl to match the expression but not save the matched +# text in the $1, $2, variables. Orca uses the matched text to +# generate a subgroup name, which is used to place files into +# different subgroups. Here, only the hostname should be used to +# generate a subgroup name, hence all the (?:...) for matching +# anything else. +# interval +# The interval here must match the interval used by orcallator to +# record data. Do not change this, as it has an effect on the +# generated RRD data files. + +group orcallator { +find_files /opt/orcaHP/var/orca/orcallator/(.*)/(?:(?:orcallator)|(?:percol))-\d{4}-\d{2}-\d{2}(?:-\d{3,})?(?:\.(?:Z|gz|bz2))? +column_description first_line +date_source column_name timestamp +interval 300 +filename_compare sub { + my ($ay, $am, $ad) = $a =~ /-(\d{4})-(\d\d)-(\d\d)/; + my ($by, $bm, $bd) = $b =~ /-(\d{4})-(\d\d)-(\d\d)/; + if (my $c = (( $ay <=> $by) || + ( $am <=> $bm) || + (($ad >> 3) <=> ($bd >> 3)))) { + return 2*$c; + } + $ad <=> $bd; + } +} + +plot { +title %g System Overview +source orcallator +data state_c / 2 +data state_D / 2 +data state_N / 2 +data state_t / 2 +data state_n / 2 +data state_s / 2 +data state_r / 2 +data state_k / 2 +data state_m / 2 +data state_d / 2 +data state_i / 2 +line_type line3 +summary_format %8.2lf %S +legend CPU power +legend Disk +legend Network +legend TCP/IP stack +legend NFS RPC client +legend Swap space +legend RAM demand +legend Kernel memory +legend Kernel contention +legend DNLC +legend Inode cache +y_legend Severity level +data_min 0 +plot_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#system_overview +} + +plot { +title %g System Uptime +source orcallator +data uptime +legend Uptime +y_legend Days +data_min 0 +data_max 1000 +href http://www.orcaware.com/orca/docs/orcallator.html#system_uptime +} + +plot { +title %g Average # Processes in Run Queue (Load Average) +source orcallator +data 1runq +data 5runq +data 15runq +legend 1 minute average +legend 5 minute average +legend 15 minute average +y_legend Number Processes +data_min 0 +data_max 1000 +href http://www.orcaware.com/orca/docs/orcallator.html#processes_in_run_queue +} + +plot { +title %g CPU Usage +source orcallator +data usr% +data sys% +data wio% +data idle% +line_type area +line_type stack +line_type stack +line_type stack +legend User +legend System +legend Wait IO +legend Idle +y_legend Percent +data_min 0 +data_max 100 +plot_min 0 +plot_max 100 +rigid_min_max 1 +href http://www.orcaware.com/orca/docs/orcallator.html#cpu_usage +} + +#plot { +#title %g Processes in Run Queue/Waiting/Swapped +#source orcallator +#data #runque +#data waiting +#line_type area +#line_type stack +#legend processes in run queue +#legend processes waiting for IO +#y_legend Number Processes +#data_min 0 +#} + +plot { +title %g Memory Free +source orcallator +data 4096 * free_pages +line_type area +legend Free physical memory +y_legend Bytes +base 1024 +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#memory_free +} + +plot { +title %g Memory Usage Breakup +source orcallator +data mem_work +data mem_pres +data mem_clnt +data mem_work + mem_pres + mem_clnt +line_type area +line_type stack +line_type stack +line_type line2 +legend Working Segment +legend Presistent Segment +legend Clinet Segment +legend Total Memory Used +y_legend Number Of Pages +data_min 0 +plot_min 0 +color 00ff00 +color ff0000 +color 0000ff +href http://www.orcaware.com/orca/docs/orcallator.html#page_usage +} + +plot { +title %g Available Swap Space in Bytes +source orcallator +data swap_used +data swap_free +data swap_free + swap_free +line_type area +line_type stack +line_type stack +legend Available swap space +legend Available swap space +legend Available swap space +y_legend Bytes +base 1024 +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#available_swap_space +} + + +plot { +title %g Disk Space Percent Usage +source orcallator +data mntP_(.*) +line_type line2 +legend $1 +y_legend Percent Used +data_min 0 +data_max 100 +plot_min 0 +plot_max 100 +href http://www.orcaware.com/orca/docs/orcallator.html#disk_space_percent_usage +} + +plot { +title %g Disk Inode Percent Usage +source orcallator +data mntp_(.*) +line_type line2 +legend $1 +y_legend Percent Used +data_min 0 +data_max 100 +plot_min 0 +plot_max 100 +href http://www.orcaware.com/orca/docs/orcallator.html#disk_inode_percent_usage +} + +plot { +title %g Disk System Wide Reads/Writes Per Second +source orcallator +data 1024 * disk_rK/s +data 1024 * disk_wK/s +line_type area +line_type line1 +legend Data Read/s +legend Data Write/s +y_legend Bytes/s +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#disk_system_wide_reads_writes_per_second +} + +plot { +title %g Disk System Wide Transfer Rate +source orcallator +data disk_t/s +line_type area +legend Number of transfer/s +y_legend Bytes/s +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#disk_system_wide_transfer_rate +} + +plot { +title %g TSM Database Space Percent Usage +source orcallator +data tsmdb +line_type stack +legend TSM Database +y_legend Percent Used +data_min 0 +data_max 100 +plot_min 0 +plot_max 100 +href http://www.orcaware.com/orca/docs/orcallator.html#tsm_db_space_percent_usage +} + +plot { +title %g New Process Spawn Rate +source orcallator +data #proc/s +data #proc/p5s +line_type area +line_type line1 +legend 5 min average +legend Peak 5 second +y_legend New processes/s +data_min 0 +data_max 100000 +href http://www.orcaware.com/orca/docs/orcallator.html#new_process_spawn_rate +} + +plot { +title %g Number of System & Web Server Processes +source orcallator +data #proc +data #httpds +line_type line1 +line_type area +legend System total +legend Number web servers +y_legend Number Processes +data_min 0 +data_max 10000 +color 0000ff +color 00ff00 +href http://www.orcaware.com/orca/docs/orcallator.html#number_system_processes +} + +plot { +title %g Number of Web Server Processes +source orcallator +data #httpds +line_type area +legend Number web servers +y_legend Number Processes +data_min 0 +data_max 10000 +href http://www.orcaware.com/orca/docs/orcallator.html#number_web_server_processes +} + +plot { +title %g Web Server Hit Rate +source orcallator +data httpop/s +data http/p5s +line_type area +line_type line1 +legend 5 min average hits/s +legend Peak 5 second hits/s +y_legend Hits/s +data_min 0 +color 00ff00 +color 0000ff +href http://www.orcaware.com/orca/docs/orcallator.html#web_server_hit_rate +} + +plot { +title %g Web Server File Size +source orcallator +data %to1KB +data %to10KB +data %to100KB +data %to1MB +data %over1MB +line_type area +line_type stack +line_type stack +line_type stack +line_type stack +legend 0 - 1 KB +legend 1 - 10 KB +legend 10 - 100 KB +legend 100 - 1000 KB +legend Greater than 1 MB +y_legend Percent +data_min 0 +data_max 100 +plot_min 0 +plot_max 100 +rigid_min_max 1 +href http://www.orcaware.com/orca/docs/orcallator.html#web_server_file_size +} + +plot { +title %g Web Server Data Transfer Rate +source orcallator +data httpb/s +line_type area +legend Bytes/s +y_legend Bytes/s +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#web_server_data_transfer_rate +} + +plot { +title %g Web Server HTTP Error Rate +source orcallator +data htErr/s +line_type area +legend HTTP errors/s +y_legend Errors/s +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#web_server_error_rate +} + +# Interface bits per second for 10 Mbit interfaces. +plot { +title %g Interface Bits Per Second: $1 +source orcallator +data 1024 * 8 * ((?:(?:elxl)|(?:le)|(?:qe))\d+)InKB/s +data 1024 * 8 * $1OuKB/s +line_type area +line_type line1 +legend Input +legend Output +y_legend Bits/s +data_min 0 +data_max 10000000 +href http://www.orcaware.com/orca/docs/orcallator.html#interface_bits_per_second +} + +# Interface bits per second for 100 Mbit interfaces. +plot { +title %g Interface Bits Per Second: $1 +source orcallator +data 1024 * 8 * ((?:(?:be)|(?:dmfe)|(?:eri)|(?:hme)|(?:qfe)|(?:znb))\d+)InKB/s +data 1024 * 8 * $1OuKB/s +line_type area +line_type line1 +legend Input +legend Output +y_legend Bits/s +data_min 0 +data_max 100000000 +href http://www.orcaware.com/orca/docs/orcallator.html#interface_bits_per_second +} + +# Interface bits per second for 1 Gbit interfaces. +plot { +title %g Interface Bits Per Second: $1 +source orcallator +data 1024 * 8 * ((?:(?:ce)|(?:v?ge)|(?:skge))\d+)InKB/s +data 1024 * 8 * $1OuKB/s +line_type area +line_type line1 +legend Input +legend Output +y_legend Bits/s +data_min 0 +data_max 1000000000 +href http://www.orcaware.com/orca/docs/orcallator.html#interface_bits_per_second +} + +plot { +title %g Interface Packets Per Second: $1 +source orcallator +data (.*\d+)Ipkt/s +data $1Opkt/s +line_type area +line_type line1 +legend Input +legend Output +y_legend Packets/s +data_min 0 +data_max 100000 +flush_regexps 1 +href http://www.orcaware.com/orca/docs/orcallator.html#interface_packets_per_second +} + +plot { +title %g Interface Errors Per Second: $1 +source orcallator +data (.*\d+)IErr/s +data $1OErr/s +line_type area +line_type line1 +legend Input +legend Output +y_legend Errors/s +data_min 0 +flush_regexps 1 +href http://www.orcaware.com/orca/docs/orcallator.html#interface_errors_per_second +} + +plot { +title %g Interface Deferred Packet Rate +source orcallator +data (.*\d+)Defr/s +line_type area +legend $1 +y_legend Defers/s +data_min 0 +flush_regexps 1 +href http://www.orcaware.com/orca/docs/orcallator.html#interface_deferred_packet_rate +} + +plot { +title %g Interface Collisions +source orcallator +data (.*\d+)Coll% +line_type area +legend $1 +y_legend Percent +data_min 0 +data_max 200 +flush_regexps 1 +href http://www.orcaware.com/orca/docs/orcallator.html#interface_collisions +} + +plot { +title %g Interface Nocanput Rate +source orcallator +data (.*\d+)NoCP/s +line_type area +legend $1 +y_legend Nocanput/s +data_min 0 +flush_regexps 1 +href http://www.orcaware.com/orca/docs/orcallator.html#interface_nocanput_rate +} + +plot { +title %g TCP Bits Per Second +source orcallator +data 1024 * 8 * tcp_InKB/s +data 1024 * 8 * tcp_OuKB/s +line_type area +line_type line1 +legend Input +legend Output +y_legend Bits/s +data_min 0 +data_max 1000000000 +href http://www.orcaware.com/orca/docs/orcallator.html#TCP_bits_per_second +} + +plot { +title %g TCP Segments Per Second +source orcallator +data tcp_Iseg/s +data tcp_Oseg/s +line_type area +line_type line1 +legend Input +legend Output +y_legend Segments/s +data_min 0 +data_max 20000 +href http://www.orcaware.com/orca/docs/orcallator.html#TCP_segments_per_second +} + +plot { +title %g TCP Retransmission & Duplicate Received Percentage +source orcallator +data tcp_Ret% +data tcp_Dup% +line_type area +line_type line1 +legend Retransmission +legend Duplicate received +y_legend Percent +data_min 0 +data_max 200 +href http://www.orcaware.com/orca/docs/orcallator.html#TCP_retransmission_duplicate_received_percentage +} + +plot { +title %g TCP New Connection Rate +source orcallator +data tcp_Icn/s +data tcp_Ocn/s +line_type area +line_type line1 +legend Input - passive +legend Output - active +y_legend New Connections/s +data_min 0 +data_max 10000 +href http://www.orcaware.com/orca/docs/orcallator.html#TCP_new_connection_rate +} + +plot { +title %g TCP Number Open Connections +source orcallator +data tcp_estb +line_type area +legend # open connections +y_legend Number Open TCP Connections +data_min 0 +data_max 50000 +href http://www.orcaware.com/orca/docs/orcallator.html#TCP_number_open_connections +} + +plot { +title %g TCP Reset Rate +source orcallator +data tcp_Rst/s +line_type area +legend Number TCP resets/s +y_legend Resets/s +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#TCP_reset_rate +} + +plot { +title %g TCP Attempt Fail Rate +source orcallator +data tcp_Atf/s +line_type area +legend TCP attempt fails/s +y_legend TCP Attempt Fails/s +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#TCP_attempt_fail_rate +} + +plot { +title %g TCP Listen Drop Rate +source orcallator +data tcp_Ldrp/s +data tcp_LdQ0/s +data tcp_HOdp/s +legend TCP listen drops +legend TCP listen drop Q0 +legend TCP half open drops +y_legend TCP Listen Drops/s +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#TCP_listen_drop_rate +} + +plot { +title %g Sleeps on Mutex Rate +source orcallator +data smtx +data smtx/cpu +line_type area +line_type line1 +legend Sleeps on mutex +legend Sleeps on mutex/cpu +y_legend Sleeps on Mutex/s +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#sleeps_mutex_rate +} + +plot { +title %g NFS Server Call Rate +source orcallator +data nfss_calls +data v2reads +data v2writes +data v3reads +data v3writes +data nfss_bad +data_type counter +line_type area +line_type area +line_type stack +line_type stack +line_type stack +line_type stack +legend NFS server calls/s +y_legend NFS Server Calls/s +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#NFS_server_call_rate +} + +plot { +title %g NFS Server Call Distribution +source orcallator +data v2reads +data v2writes +data v3reads +data v3writes +data_type counter +line_type area +line_type stack +line_type stack +line_type stack +line_type stack +y_legend NFS Server Calls/s +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#NFS_server_call_distribution +} + +plot { +title %g NFS Client Call Rate +source orcallator +data nfs_call/s +line_type area +legend NFS client calls/s +y_legend NFS Client Calls/s +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#NFS_client_call_rate +} + +plot { +title %g NFS Timeouts & Bad Transmits Rate +source orcallator +data nfs_timo/s +data nfs_badx/s +line_type area +line_type line1 +legend NFS timeouts +legend Bad transmits +y_legend Count/s +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#NFS_timeouts_bad_transmits_rate +} + +#plot { +#title %g Disk Run Percent +#source orcallator +#data disk_runp_((?:c\d+t\d+d\d+)|(?:c\d+d\d+)|(?:[ms]d\d+)) +#line_type line2 +#legend $1 +#y_legend Run Percent +#data_min 0 +#data_max 100 +#plot_min 0 +#href http://www.orcaware.com/orca/docs/orcallator.html#disk_run_percent +#} + +plot { +title %g Cache Hit Percentages +source orcallator +data dnlc_hit% +data inod_hit% +line_type area +line_type line1 +legend DNLC +legend Inode cache +y_legend Percent +data_min 0 +data_max 100 +href http://www.orcaware.com/orca/docs/orcallator.html#cache_hit_percentages +} + +plot { +title %g Cache Reference Rate +source orcallator +data dnlc_ref/s +data inod_ref/s +line_type area +line_type line1 +legend DNLC +legend Inode cache +y_legend References/s +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#cache_reference_rate +} + +plot { +title %g Cache Inode Steal Rate +source orcallator +data inod_stl/s +line_type area +legend Inode w/page steals/s +y_legend Steals/s +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#inode_steal_rate +} + + +plot { +title %g Memory Page Scan Rate +source orcallator +data scanrate +line_type area +legend Page scan rate +y_legend Pages/s +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#page_scan_rate +} + +plot { +title %g Memory Page Residence Time +source orcallator +data page_rstim +line_type area +legend Page residence time +y_legend Seconds +data_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#page_residence_time +} + +plot { +title %g Memory Pages Locked & IO +source orcallator +data pageslock +data pagesio +line_type area +line_type line1 +legend Locked +legend IO +y_legend Number Of Pages +data_min 0 +plot_min 0 +href http://www.orcaware.com/orca/docs/orcallator.html#pages_locked_IO +} + Added: trunk/orca/data_gatherers/hp/orca-hp-stat.pl ============================================================================== --- (empty file) +++ trunk/orca/data_gatherers/hp/orca-hp-stat.pl Sat Apr 3 16:07:15 2004 @@ -0,0 +1,442 @@ +#!/usr/contrib/bin/perl +# +# Version 1.5 + +# Description: +# Collect general perfromance statistics formatted for +# interpretaion by Orca. + +# Usage: +# The following variables may be set: +# +# OUT_ROOT root directory for datafiles (eg /opt/log/performance) +# INTERVAL the number of seconds between checks (eg 300 = 5 min) +# DURATION numer of hours to run (eg 1 = 1 hr) +# +# This script runs various standard system utilities to collect +# system performance statistics and writes them out to datafile named +# HOSTNAME/stats.YYYY-MM-DD-HHmm under the OUT_ROOT directory. +# +# It runs for the the numbers specified by DURATION collecting data +# every INTERVAL number of seconds. After DURATION, the script +# closes and compresses it's datafile via /usr/bin/compress and then +# exits. If DURATION=24 and INTERVAL=300 (recommended) then the +# following cron entry would collect continuos stats for a system: +# +# 0 0 * * * //orca-hp-stat.pl +# +# 2003-09-10 - RV - Modifies for HP ... Rajesh Verma(rajeshverma at aixdude.com) +# ver 1.0 +# 2001-04-16 - JDK - Genesis... by Jason D. Kelleher +# 2001-05-02 - JDK - Updates to make data aggregation easier. +# Added #open connections, pagestotl. +# 2001-07-06 - JDK - added command-line args & data checks +# 2001-07-09 - JDK - added signal handler, column checks, & umask +# 2001-07-10 - JDK - now autodetects interfaces via netstat -i +# v1.5 +# +# $HeadURL$ +# $LastChangedDate$ +# $LastChangedBy$ +# $LastChangedRevision$ + +# Note: Execution speed is more important than cleanliness here. +# +# +# There are some script which are used for gettting data and there are +# +# phymem -- for getting physical memory +# Copy this script in the path /usr/local/bin +# +##################BEGIN OF FILE################## +#/* Programma to determine statistics about the physical and virtual +# memory of a HP workstation, independant of HP-UX version. +#Shows some of the fields on std out. +# +#Program: phymem +#Author: Eef Hartman +#Version: 1.1 +#Last change: 97/01/06 +#Compiled: 97/10/17 09:17:31 +# +#Based on code, posted in the HPadmin mailing list. +# +#To compile: cc -o phys_mem phys_mem.c +# + #*/ +# +#static char SCCSid[] = "@(#)phys_mem 1.1"; +# +##include +# +#void main() { +#struct pst_static stat_buf; +#struct pst_dynamic dyn_buf; +# +#pstat(PSTAT_STATIC,&stat_buf,sizeof(stat_buf),0,0); +#pstat(PSTAT_DYNAMIC,&dyn_buf,sizeof(dyn_buf),0,0); +# +#printf("Physical %ld \n",(stat_buf.physical_memory/256)*1000); +# +#return; } +# +############END OF FILE################# +#Other script is to get the df output correctly. +#File Name : hpdf PATH: /usr/local/bin +# +###########SOF############## +#Thanks to Mark.Deiss at acs-gsg.com, bdf output on HP-UX may appear on 2 lines +#bdf -l | sed -e '/^[^ ][^ ]*$/{ +#N +#s/[ ]*\n[ ]*/ / +#}' +#####################EOF##################### +# +# +# +# Explicitly set PATH to prevent odd problems if run manually. +$ENV{PATH} = '/usr/bin:/etc:/usr/sbin:/usr/ucb:/sbin'; + +$Usage_Message = ' +Usage: orca-hp-stat.pl [-r out_root] [-i interval] [-d duration] [-h] + +-r out_root set root output directory, default: /opt/log/performance +-i interval number of seconds between checks, default: 300 +-d duration number of hours to run, default: 24 +-h this message + +'; + +# Parse the command line arguments +while ( $#ARGV >= 0 ) { + + if ( $ARGV[0] eq "-r" ) { + shift @ARGV; + $OUT_ROOT = shift @ARGV; + } + elsif ( $ARGV[0] eq "-i" ) { + shift @ARGV; + $INTERVAL = shift @ARGV; + } + elsif ( $ARGV[0] eq "-d" ) { + shift @ARGV; + $DURATION = shift @ARGV; + } + elsif ( $ARGV[0] eq "-h" ) { + print $Usage_Message; + exit 0; + } + elsif ( $ARGV[0] =~ /^-/ ) { + die "Invalid flag: $ARGV[0]\n$Usage_Message"; + } + else { + die "Invalid argument: $ARGV[0]\n$Usage_Message"; + } +} + +## BEGIN set defaults + +$OUT_ROOT ||= '/home/orca/orcallator'; # root directory for datafiles +$INTERVAL ||= 300; # seconds between checks +$DURATION ||= 24; # number of hours to run + +## END set defaults + +## Derived variables. +$iterations = $DURATION * 60 * 60 / $INTERVAL; # Number of checks. +chomp( $HOST = `uname -n` ); +$out_dir = "${OUT_ROOT}/${HOST}"; +( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) = + localtime(time); +$stat_file = + sprintf( "%s/percol-%.2d-%.2d-%.2d-%1d%.2d", $out_dir, $year + 1900, $mon + 1, + $mday, $hour, $min ); + +# Base all timestamps on start time. +$start_time = time(); +$timestamp = 0; + +## Autodetect network interfaces +#open IN, "ifconfig -a|"; +open IN, "netstat -i|"; +while () { + + # if ( /^(\S+):/ ) { + if (/^(\w+).*link/) { + push @net_interfaces, $1; + } +} +close IN; + +# Grab some base system info prior to collecting stats. +open IN, "/usr/local/bin/phymem|"; +while () { + if (/Physical (\d+) /) { + $pagestotl = + $1 * 1024 / 4096; # Grab realmem in KB and convert to pages. + + ## this gets used down in the vmstat section + } +} +close IN; + +## Make sure we can write output. +umask 0022; # make sure the file can be harvested +unless ( -d $out_dir ) { + system( "mkdir", "-p", "$out_dir" ); +} +open OUT, ">$stat_file" or die "ERROR: Could not open $stat_file: $!"; +my $oldfh = select OUT; +$| = 1; +select $oldfh; + +# Set signal handlers to close and compress the output +# file just in case. +$SIG{HUP} = \&exit_nicely; +$SIG{INT} = \&exit_nicely; +$SIG{QUIT} = \&exit_nicely; +$SIG{TERM} = \&exit_nicely; + +# Set gloabals used for printing (or not) headers. +$need_header = 1; +$prev_header_cnt = 0; +$prev_info_cnt = 0; + +while ( $iterations-- > 0 ) { + + $timestamp = $timestamp ? time() : $start_time; + ( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) = + localtime(time); + $locltime = sprintf( "%.2d:%.2d:%.2d", $hour, $min, $sec ); + + ## Get runq data + open IN, "uptime |"; + while () { + if (/load average:\s+(\S+),\s+(\S+),\s+(\S+)/) { + $load_info = join "\t", $1, $2, $3; + } + } + close IN; + $load_header = "1runq\t5runq\t15runq"; + + if ( scalar( split ' ', $load_header ) != scalar( split ' ', $load_info ) ) + { + $load_header = ''; + $load_info = ''; + $need_header = 1; + print STDERR "WARNING: load header does not match load info.\n"; + } + + ## Get number of system processes + $num_proc = -1; # Don't count the header. + open IN, "ps -e |"; + while () { + $num_proc++; + } + close IN; + $proc_info = $num_proc; + $proc_header = '#proc'; + + if ( scalar( split ' ', $proc_header ) != scalar( split ' ', $proc_info ) ) + { + $proc_header = ''; + $proc_info = ''; + $need_header = 1; + print STDERR "WARNING: #proc header does not match #proc info.\n"; + } + + ## Get vmstat data + open IN, "vmstat 1 2|"; + while () { + chomp; + if (/^[\s\d]+$/) { + + # overwrite first line on 2nd pass + ( + $vmstat_r, $vmstat_b, $vmstat_wa, $vmstat_avm, $vmstat_fre, + $vmstat_re, $vmstat_at, $vmstat_pi, $vmstat_po, $vmstat_fr, + $vmstat_cy, $vmstat_sr, $vmstat_inf, $vmstat_syf, + $vmstat_csf, $vmstat_us, $vmstat_sy, $vmstat_id + ) + = split; + $vmstat_info = join "\t", $vmstat_avm, $vmstat_fre, $pagestotl, + $vmstat_pi, $vmstat_po, $vmstat_fr, $vmstat_sr, $vmstat_us, + $vmstat_sy, $vmstat_wa, $vmstat_id; + } + } + close IN; + $vmstat_header = +"pagesactive\tpagesfree\tpagestotl\tPagesI/s\tPagesO/s\tPagesF/s\tscanrate\tusr%\tsys%\twio%\tidle%"; + + if ( scalar( split ' ', $vmstat_header ) != + scalar( split ' ', $vmstat_info ) ) + { + print STDERR "WARNING: vmstat header does not match vmstat info.\n"; + $vmstat_header = ''; + $vmstat_info = ''; + $need_header = 1; + } + + ## Get filesystem data + $fs_header = ''; + $fs_info = ''; + open IN, "/usr/local/bin/hpdf |"; + while () { + chomp; + + if (m%^/%) { + ( $mnt_dev, $blocks, $used, $free, $pct_used, $iused, $ifree, + $ipct_used, $mnt ) = split; + + # Recalculate percents because df rounds. + $fs_info .= "\t" + . sprintf( "%s\t%s\t%s\t%.5f\t%d\t%s\t%s\t%.5f", $blocks, $used, + $free, ( $used / $blocks ) * 100, ( $iused + $ifree ), $iused, + $ifree, ( $iused / ( $iused + $ifree ) ) * 100 ); + $fs_header .= "\t" . join "\t", "mntC_$mnt", "mntU_$mnt", + "mntA_$mnt", "mntP_$mnt", "mntc_$mnt", "mntu_$mnt", "mnta_$mnt", + "mntp_$mnt"; + } + } + close IN; + + if ( scalar( split ' ', $fs_header ) != scalar( split ' ', $fs_info ) ) { + print STDERR + "WARNING: filesystem header does not match filesystem info.\n"; + $fs_header = ''; + $fs_info = ''; + $need_header = 1; + } + + ## Get iostat data + $disk_t = 0; + $disk_rK = 0; + $disk_wK = 0; + undef %disks; + open IN, "iostat 1 2|"; + + while () { + if (/^(\S+)\s+\S+\s+\S+\s+(\S+)\s+(\d+)\s+(\d+)/) { + my $disk = $1; + my $tps = $2; + my $rK = $3; + my $wK = $4; + if ( not $disks{$disk} ) { + $disks{$disk}++; # Get rK & wK from first pass. + $disk_rK += $rK; + $disk_wK += $wK; + } + else { + $disk_t += $tps; # Get trans per sec from second pass. + } + } + } + close IN; + $iostat_header = "disk_t/s\tdisk_rK/s\tdisk_wK/s\t"; + $iostat_info = "${disk_t}\t${disk_rK}\t${disk_wK}"; + + if ( scalar( split ' ', $iostat_header ) != + scalar( split ' ', $iostat_info ) ) + { + print STDERR "WARNING: iostat header does not match iostat info.\n"; + $iostat_header = ''; + $iostat_info = ''; + $need_header = 1; + } + + ## Get packet data + $packet_header = ''; + $packet_info = ''; + + #foreach $interface ( split(/\s+/, $NET_INTERFACES) ) { + foreach $interface (@net_interfaces) { + $packet_header .= +"${interface}Ipkt/s\t${interface}IErr/s\t${interface}Opkt/s\t${interface}OErr/s\t${interface}Coll/s\t"; + open IN, "netstat -I $interface 1|"; + + while () { + if (/^\s*(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+/) { + $packet_info .= "\t" . join "\t", $1, $2, $3, $4, $5; + last; + } + } + close IN; + } + + if ( scalar( split ' ', $packet_header ) != + scalar( split ' ', $packet_info ) ) + { + print STDERR "WARNING: packet header does not match packet info.\n"; + $packet_header = ''; + $packet_info = ''; + $need_header = 1; + } + + ## Get TCP Connection data + $tcp_estb = 0; + open IN, "netstat -a |"; + while () { + if (/^tcp.+ESTABLISHED$/) { + $tcp_estb++; + } + } + close IN; + $tcp_info = $tcp_estb; + $tcp_header = 'tcp_estb'; + + if ( scalar( split ' ', $tcp_estb_header ) != + scalar( split ' ', $tcp_estb_info ) ) + { + print STDERR "WARNING: tcp_estb header does not match tcp_estb info.\n"; + $tcp_estb_header = ''; + $tcp_estb_info = ''; + $need_header = 1; + } + + ## Join header and info then verify column counts. + $out_header = join "\t", "timestamp", "locltime", $load_header, + $proc_header, $vmstat_header, $fs_header, $iostat_header, $packet_header, + $tcp_header; + $out_header =~ tr/ \t/\t/s; # translate whitespace to single tabs + + $out_info = join "\t", $timestamp, $locltime, $load_info, $proc_info, + $vmstat_info, $fs_info, $iostat_info, $packet_info, $tcp_info; + $out_info =~ tr/ \t/\t/s; # translate whitespace to single tabs + + $header_cnt = split ' ', $out_header; + $info_cnt = split ' ', $out_info; + if ( $header_cnt != $info_cnt ) { + print STDERR + "ERROR: header columns do not equal data columns. Exiting.\n"; + &exit_nicely; + } + elsif ( $header_cnt != $prev_header_cnt or $info_cnt != $prev_info_cnt ) { + $need_header = 1; + } + $prev_header_cnt = $header_cnt; + $prev_info_cnt = $info_cnt; + + ## Write output + if ($need_header) { + print OUT $out_header, "\n"; + $need_header = 0; + } + print OUT $out_info, "\n"; + + sleep $INTERVAL - ( time() - $timestamp ); + +} +close OUT; + + at args = ( "gzip", "-f", "$stat_file" ); +system(@args); + +exit 0; + +# This subroutine is called by the signal handler. +sub exit_nicely { + close OUT; + @args = ( "gzip", "-f", "$stat_file" ); + system(@args); + exit 0; +} From blair at orcaware.com Tue Apr 6 21:31:35 2004 From: blair at orcaware.com (Blair Zajac) Date: Tue, 6 Apr 2004 21:31:35 -0700 Subject: [Orca-checkins] r295 - in trunk/orca: . data_gatherers data_gatherers/aix data_gatherers/hp Message-ID: <200404070431.i374VZqI011153@orcaware.com> Author: blair Date: Tue Apr 6 21:31:03 2004 New Revision: 295 Added: trunk/orca/data_gatherers/aix/Makefile.in trunk/orca/data_gatherers/aix/orca-aix-stat.pl.in - copied, changed from r294, trunk/orca/data_gatherers/aix/orca-aix-stat.pl trunk/orca/data_gatherers/aix/orca-aixtsm-stat.pl.in - copied, changed from r294, trunk/orca/data_gatherers/aix/orca-aixtsm-stat.pl trunk/orca/data_gatherers/hp/Makefile.in trunk/orca/data_gatherers/hp/orca-hp-stat.pl.in - copied, changed from r294, trunk/orca/data_gatherers/hp/orca-hp-stat.pl Removed: trunk/orca/data_gatherers/aix/orca-aix-stat.pl trunk/orca/data_gatherers/aix/orca-aixtsm-stat.pl trunk/orca/data_gatherers/hp/orca-hp-stat.pl Modified: trunk/orca/configure.in trunk/orca/data_gatherers/Makefile.in Log: Integrate the new AIX and HP data gatherers into the Orca build and install system. * configure.in: Take two new command line options, --disable-aixallator and --disable-hpallator, which disable building the AIX and the HP data gathering tools. * data_gatherers/Makefile.in: Descend into the aix and hp directories if instructed to. * data_gatherers/aix/Makefile.in: New file to build the AIX data gatherers. * data_gatherers/hp/Makefile.in: New file to build the HP data gatherer. * data_gatherers/aix/orca-aix-stat.pl.in: Renamed from data_gatherers/aix/orca-aix-stat.pl. * data_gatherers/aix/orca-aixtsm-stat.pl.in: Renamed from data_gatherers/aix/orca-aixtsm-stat.pl. * data_gatherers/hp/orca-hp-stat.pl.in: Renamed from data_gatherers/hp/orca-hp-stat.pl. * data_gatherers/aix/orca-aix-stat.pl.in: * data_gatherers/aix/orca-aixtsm-stat.pl.in: * data_gatherers/hp/orca-hp-stat.pl.in: Enable configure to perform variable substitutions on this file. Use the COMPRESSOR variable determined by configure instead of a hardwired path to gzip. Modified: trunk/orca/configure.in ============================================================================== --- trunk/orca/configure.in (original) +++ trunk/orca/configure.in Tue Apr 6 21:31:03 2004 @@ -217,6 +217,36 @@ ) AC_SUBST(INSTALL_LIB_RRDTOOL) +BUILD_AIXALLATOR=yes +AIXALLATOR_SUBDIR=aix +AC_ARG_ENABLE(aixallator, + AC_HELP_STRING([--disable-aixallator], + [Do not enable building and installing aixallator]), + [ + if test "$enableval" = no; then + BUILD_AIXALLATOR=no + AIXALLATOR_SUBDIR= + fi + ] +) +AC_SUBST(BUILD_AIXALLATOR) +AC_SUBST(AIXALLATOR_SUBDIR) + +BUILD_HPALLATOR=yes +HPALLATOR_SUBDIR=hp +AC_ARG_ENABLE(hpallator, + AC_HELP_STRING([--disable-hpallator], + [Do not enable building and installing hpallator]), + [ + if test "$enableval" = no; then + BUILD_HPALLATOR=no + HPALLATOR_SUBDIR= + fi + ] +) +AC_SUBST(BUILD_HPALLATOR) +AC_SUBST(HPALLATOR_SUBDIR) + BUILD_ORCALLATOR=yes ORCALLATOR_SUBDIR=orcallator AC_ARG_ENABLE(orcallator, @@ -529,6 +559,17 @@ # Generate the Makefiles and shell scripts with the # variable substitutions. #-------------------------------------------------------------------- +if test "$BUILD_AIXALLATOR" = yes; then + OUTPUT_AIXALLATOR="data_gatherers/aix/Makefile + data_gatherers/aix/orca-aix-stat.pl + data_gatherers/aix/orca-aixtsm-stat.pl" +fi + +if test "$BUILD_HPALLATOR" = yes; then + OUTPUT_HPALLATOR="data_gatherers/hp/Makefile + data_gatherers/hp/orca-hp-stat.pl" +fi + if test "$BUILD_ORCALLATOR" = yes; then OUTPUT_ORCALLATOR="data_gatherers/orcallator/Makefile data_gatherers/orcallator/orcallator.cfg @@ -564,6 +605,8 @@ contrib/rotate_orca_graphs/Makefile contrib/rotate_orca_graphs/rotate_orca_graphs.sh data_gatherers/Makefile + $OUTPUT_HPALLATOR + $OUTPUT_AIXALLATOR $OUTPUT_ORCALLATOR $OUTPUT_ORCA_SERVICES $OUTPUT_PROCALLATOR Modified: trunk/orca/data_gatherers/Makefile.in ============================================================================== --- trunk/orca/data_gatherers/Makefile.in (original) +++ trunk/orca/data_gatherers/Makefile.in Tue Apr 6 21:31:03 2004 @@ -1,10 +1,14 @@ @SET_MAKE@ +AIXALLATOR_SUBDIR = @AIXALLATOR_SUBDIR@ +HPALLATOR_SUBDIR = @HPALLATOR_SUBDIR@ ORCALLATOR_SUBDIR = @ORCALLATOR_SUBDIR@ ORCA_SERVICES_SUBDIR = @ORCA_SERVICES_SUBDIR@ PROCALLATOR_SUBDIR = @PROCALLATOR_SUBDIR@ -SUBDIRS = $(ORCALLATOR_SUBDIR) \ +SUBDIRS = $(AIXALLATOR_SUBDIR) \ + $(HPALLATOR_SUBDIR) \ + $(ORCALLATOR_SUBDIR) \ $(ORCA_SERVICES_SUBDIR) \ $(PROCALLATOR_SUBDIR) Added: trunk/orca/data_gatherers/aix/Makefile.in ============================================================================== --- (empty file) +++ trunk/orca/data_gatherers/aix/Makefile.in Tue Apr 6 21:31:03 2004 @@ -0,0 +1,66 @@ + at SET_MAKE@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +INSTALL = @INSTALL@ +MKDIR = @MKDIR@ +PERL_HEAD = @PERL_HEAD@ +RRD_DIR = @RRD_DIR@ +VAR_DIR = @VAR_DIR@ +RAW_ORCALLATOR_DIR = $(VAR_DIR)/orcallator + +BIN_PERL_SCRIPTS = orca-aix-stat orca-aixtsm-stat +LIBEXEC_PERL_SCRIPTS = +NOINST_PERL_SCRIPTS = +PERL_SCRIPTS = $(BIN_PERL_SCRIPTS) \ + $(LIBEXEC_PERL_SCRIPTS) \ + $(NOINST_PERL_SCRIPTS) + +BIN_SHELL_SCRIPTS = +LIBEXEC_SHELL_SCRIPTS = +NOINST_SHELL_SCRIPTS = +SHELL_SCRIPTS = $(BIN_SHELL_SCRIPTS) \ + $(LIBEXEC_SHELL_SCRIPTS) \ + $(NOINST_SHELL_SCRIPTS) + +TARGETS = $(PERL_SCRIPTS) \ + $(SHELL_SCRIPTS) +BIN_TARGETS = $(BIN_PERL_SCRIPTS) \ + $(BIN_SHELL_SCRIPTS) +LIBEXEC_TARGETS = $(LIBEXEC_PERL_SCRIPTS) \ + $(LIBEXEC_SHELL_SCRIPTS) + +all: Makefile $(TARGETS) + +install: all + $(MKDIR) $(bindir) + @for file in $(BIN_TARGETS); do \ + echo $(INSTALL) $$file $(bindir); \ + $(INSTALL) $$file $(bindir); \ + done + +clean: + $(RM) $(TARGETS) + +distclean: clean + $(RM) *.sh orca-aix-stat.pl orca-aixtsm-stat.pl Makefile + +.SUFFIXES: .pl .sh + +.pl: $(PERL_HEAD) + cat $(PERL_HEAD) $< > $@ + chmod 0755 $@ + +.sh: + cp $< $@ + chmod 0755 $@ + +Makefile: Makefile.in + cd ../.. && CONFIG_FILES=data_gatherers/aix/Makefile ./config.status + +orca-aix-stat.pl: orca-aix-stat.pl.in + cd ../.. && CONFIG_FILES=data_gatherers/aix/orca-aix-stat.pl ./config.status + +orca-aixtsm-stat.pl: orca-aixtsm-stat.pl.in + cd ../.. && CONFIG_FILES=data_gatherers/aix/orca-aixtsm-stat.pl ./config.status Copied: trunk/orca/data_gatherers/aix/orca-aix-stat.pl.in (from r294, trunk/orca/data_gatherers/aix/orca-aix-stat.pl) ============================================================================== --- trunk/orca/data_gatherers/aix/orca-aix-stat.pl (original) +++ trunk/orca/data_gatherers/aix/orca-aix-stat.pl.in Tue Apr 6 21:31:03 2004 @@ -41,6 +41,8 @@ # $LastChangedBy$ # $LastChangedRevision$ +my $COMPRESS = '@COMPRESSOR@'; + # Note: Execution speed is more important than cleanliness here. # Explicitly set PATH to prevent odd problems if run manually. @@ -540,7 +542,7 @@ } close OUT; - at args = ( "/usr/bin/gzip", "-f", "$stat_file" ); + at args = ($COMPRESS, "-f", $stat_file); system(@args); exit 0; @@ -548,7 +550,7 @@ # This subroutine is called by the signal handler. sub exit_nicely { close OUT; - @args = ( "/usr/bin/gzip", "-f", "$stat_file" ); + @args = ($COMPRESS, "-f", $stat_file); system(@args); exit 0; } Copied: trunk/orca/data_gatherers/aix/orca-aixtsm-stat.pl.in (from r294, trunk/orca/data_gatherers/aix/orca-aixtsm-stat.pl) ============================================================================== --- trunk/orca/data_gatherers/aix/orca-aixtsm-stat.pl (original) +++ trunk/orca/data_gatherers/aix/orca-aixtsm-stat.pl.in Tue Apr 6 21:31:03 2004 @@ -41,6 +41,8 @@ # $LastChangedBy$ # $LastChangedRevision$ +my $COMPRESS = '@COMPRESSOR@'; + # Note: Execution speed is more important than cleanliness here. # Explicitly set PATH to prevent odd problems if run manually. @@ -616,7 +618,7 @@ } close OUT; - at args = ( "/usr/local/bin/gzip", "-f", "$stat_file" ); + at args = ($COMPRESS, "-f", $stat_file); system(@args); exit 0; @@ -624,7 +626,7 @@ # This subroutine is called by the signal handler. sub exit_nicely { close OUT; - @args = ( "/usr/local/bin/gzip", "-f", "$stat_file" ); + @args = ($COMPRESS, "-f", $stat_file); system(@args); exit 0; } Added: trunk/orca/data_gatherers/hp/Makefile.in ============================================================================== --- (empty file) +++ trunk/orca/data_gatherers/hp/Makefile.in Tue Apr 6 21:31:03 2004 @@ -0,0 +1,63 @@ + at SET_MAKE@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +INSTALL = @INSTALL@ +MKDIR = @MKDIR@ +PERL_HEAD = @PERL_HEAD@ +RRD_DIR = @RRD_DIR@ +VAR_DIR = @VAR_DIR@ +RAW_ORCALLATOR_DIR = $(VAR_DIR)/orcallator + +BIN_PERL_SCRIPTS = orca-hp-stat +LIBEXEC_PERL_SCRIPTS = +NOINST_PERL_SCRIPTS = +PERL_SCRIPTS = $(BIN_PERL_SCRIPTS) \ + $(LIBEXEC_PERL_SCRIPTS) \ + $(NOINST_PERL_SCRIPTS) + +BIN_SHELL_SCRIPTS = +LIBEXEC_SHELL_SCRIPTS = +NOINST_SHELL_SCRIPTS = +SHELL_SCRIPTS = $(BIN_SHELL_SCRIPTS) \ + $(LIBEXEC_SHELL_SCRIPTS) \ + $(NOINST_SHELL_SCRIPTS) + +TARGETS = $(PERL_SCRIPTS) \ + $(SHELL_SCRIPTS) +BIN_TARGETS = $(BIN_PERL_SCRIPTS) \ + $(BIN_SHELL_SCRIPTS) +LIBEXEC_TARGETS = $(LIBEXEC_PERL_SCRIPTS) \ + $(LIBEXEC_SHELL_SCRIPTS) + +all: Makefile $(TARGETS) + +install: all + $(MKDIR) $(bindir) + @for file in $(BIN_TARGETS); do \ + echo $(INSTALL) $$file $(bindir); \ + $(INSTALL) $$file $(bindir); \ + done + +clean: + $(RM) $(TARGETS) + +distclean: clean + $(RM) *.sh orca-hp-stat.pl Makefile + +.SUFFIXES: .pl .sh + +.pl: $(PERL_HEAD) + cat $(PERL_HEAD) $< > $@ + chmod 0755 $@ + +.sh: + cp $< $@ + chmod 0755 $@ + +Makefile: Makefile.in + cd ../.. && CONFIG_FILES=data_gatherers/hp/Makefile ./config.status + +orca-hp-stat.pl: orca-hp-stat.pl.in + cd ../.. && CONFIG_FILES=data_gatherers/hp/orca-hp-stat.pl ./config.status Copied: trunk/orca/data_gatherers/hp/orca-hp-stat.pl.in (from r294, trunk/orca/data_gatherers/hp/orca-hp-stat.pl) ============================================================================== --- trunk/orca/data_gatherers/hp/orca-hp-stat.pl (original) +++ trunk/orca/data_gatherers/hp/orca-hp-stat.pl.in Tue Apr 6 21:31:03 2004 @@ -94,6 +94,9 @@ # # # + +my $COMPRESS = '@COMPRESSOR@'; + # Explicitly set PATH to prevent odd problems if run manually. $ENV{PATH} = '/usr/bin:/etc:/usr/sbin:/usr/ucb:/sbin'; @@ -428,7 +431,7 @@ } close OUT; - at args = ( "gzip", "-f", "$stat_file" ); + at args = ($COMPRESS, "-f", $stat_file); system(@args); exit 0; @@ -436,7 +439,7 @@ # This subroutine is called by the signal handler. sub exit_nicely { close OUT; - @args = ( "gzip", "-f", "$stat_file" ); + @args = ($COMPRESS, "-f", $stat_file); system(@args); exit 0; } From blair at orcaware.com Tue Apr 6 21:40:24 2004 From: blair at orcaware.com (Blair Zajac) Date: Tue, 6 Apr 2004 21:40:24 -0700 Subject: [Orca-checkins] r296 - in trunk/orca/data_gatherers: aix hp Message-ID: <200404070440.i374eOgi011271@orcaware.com> Author: blair Date: Tue Apr 6 21:39:51 2004 New Revision: 296 Modified: trunk/orca/data_gatherers/aix/orca-aix-stat.pl.in trunk/orca/data_gatherers/aix/orca-aixtsm-stat.pl.in trunk/orca/data_gatherers/hp/orca-hp-stat.pl.in Log: * data_gatherers/aix/orca-aix-stat.pl.in, * data_gatherers/aix/orca-aixtsm-stat.pl.in, * data_gatherers/hp/orca-hp-stat.pl.in: Spelling fixes. Modified: trunk/orca/data_gatherers/aix/orca-aix-stat.pl.in ============================================================================== --- trunk/orca/data_gatherers/aix/orca-aix-stat.pl.in (original) +++ trunk/orca/data_gatherers/aix/orca-aix-stat.pl.in Tue Apr 6 21:39:51 2004 @@ -3,15 +3,15 @@ # Version 1.7 # Description: -# Collect general perfromance statistics formatted for -# interpretaion by Orca. +# Collect general performance statistics formatted for +# interpretation by Orca. # Usage: # The following variables may be set: # -# OUT_ROOT root directory for datafiles (eg /opt/log/performance) +# OUT_ROOT root directory for data files (eg /opt/log/performance) # INTERVAL the number of seconds between checks (eg 300 = 5 min) -# DURATION numer of hours to run (eg 1 = 1 hr) +# DURATION number of hours to run (eg 1 = 1 hr) # # This script runs various standard system utilities to collect # system performance statistics and writes them out to datafile named @@ -21,7 +21,7 @@ # every INTERVAL number of seconds. After DURATION, the script # closes and compresses it's datafile via /usr/bin/compress and then # exits. If DURATION=24 and INTERVAL=300 (recommended) then the -# following cron entry would collect continuos stats for a system: +# following cron entry would collect continuous stats for a system: # # 0 0 * * * //orca-aix-stat.pl # @@ -33,7 +33,7 @@ # Added #open connections, pagestotl. # 2001-07-06 - JDK - added command-line args & data checks # 2001-07-09 - JDK - added signal handler, column checks, & umask -# 2001-07-10 - JDK - now autodetects interfaces via netstat -i +# 2001-07-10 - JDK - now auto detects interfaces via netstat -i # v1.5 # # $HeadURL$ @@ -104,7 +104,7 @@ ## BEGIN set defaults -$OUT_ROOT ||= '/home/orca/orcallator'; # root directory for datafiles +$OUT_ROOT ||= '/home/orca/orcallator'; # root directory for data files $INTERVAL ||= 300; # seconds between checks $DURATION ||= 24; # number of hours to run @@ -124,7 +124,7 @@ $start_time = time(); $timestamp = 0; -## Autodetect network interfaces +## Auto detect network interfaces #open IN, "ifconfig -a|"; open IN, "netstat -ni|"; while () { @@ -165,7 +165,7 @@ $SIG{QUIT} = \&exit_nicely; $SIG{TERM} = \&exit_nicely; -# Set gloabals used for printing (or not) headers. +# Set globals used for printing (or not) headers. $need_header = 1; $prev_header_cnt = 0; $prev_info_cnt = 0; Modified: trunk/orca/data_gatherers/aix/orca-aixtsm-stat.pl.in ============================================================================== --- trunk/orca/data_gatherers/aix/orca-aixtsm-stat.pl.in (original) +++ trunk/orca/data_gatherers/aix/orca-aixtsm-stat.pl.in Tue Apr 6 21:39:51 2004 @@ -3,15 +3,15 @@ # Version 1.7 # Description: -# Collect general perfromance statistics formatted for -# interpretaion by Orca. +# Collect general performance statistics formatted for +# interpretation by Orca. # Usage: # The following variables may be set: # -# OUT_ROOT root directory for datafiles (eg /opt/log/performance) +# OUT_ROOT root directory for data files (eg /opt/log/performance) # INTERVAL the number of seconds between checks (eg 300 = 5 min) -# DURATION numer of hours to run (eg 1 = 1 hr) +# DURATION number of hours to run (eg 1 = 1 hr) # # This script runs various standard system utilities to collect # system performance statistics and writes them out to datafile named @@ -21,7 +21,7 @@ # every INTERVAL number of seconds. After DURATION, the script # closes and compresses it's datafile via /usr/bin/compress and then # exits. If DURATION=24 and INTERVAL=300 (recommended) then the -# following cron entry would collect continuos stats for a system: +# following cron entry would collect continuous stats for a system: # # 0 0 * * * //orca-aix-stat.pl # @@ -33,7 +33,7 @@ # Added #open connections, pagestotl. # 2001-07-06 - JDK - added command-line args & data checks # 2001-07-09 - JDK - added signal handler, column checks, & umask -# 2001-07-10 - JDK - now autodetects interfaces via netstat -i +# 2001-07-10 - JDK - now auto detects interfaces via netstat -i # v1.5 # # $HeadURL$ @@ -104,7 +104,7 @@ ## BEGIN set defaults -$OUT_ROOT ||= '/home/orca/orcallator'; # root directory for datafiles +$OUT_ROOT ||= '/home/orca/orcallator'; # root directory for data files $INTERVAL ||= 300; # seconds between checks $DURATION ||= 24; # number of hours to run @@ -124,7 +124,7 @@ $start_time = time(); $timestamp = 0; -## Autodetect network interfaces +## Auto detect network interfaces #open IN, "ifconfig -a|"; open IN, "netstat -ni|"; while () { @@ -165,7 +165,7 @@ $SIG{QUIT} = \&exit_nicely; $SIG{TERM} = \&exit_nicely; -# Set gloabals used for printing (or not) headers. +# Set globals used for printing (or not) headers. $need_header = 1; $prev_header_cnt = 0; $prev_info_cnt = 0; Modified: trunk/orca/data_gatherers/hp/orca-hp-stat.pl.in ============================================================================== --- trunk/orca/data_gatherers/hp/orca-hp-stat.pl.in (original) +++ trunk/orca/data_gatherers/hp/orca-hp-stat.pl.in Tue Apr 6 21:39:51 2004 @@ -3,15 +3,15 @@ # Version 1.5 # Description: -# Collect general perfromance statistics formatted for -# interpretaion by Orca. +# Collect general performance statistics formatted for +# interpretation by Orca. # Usage: # The following variables may be set: # -# OUT_ROOT root directory for datafiles (eg /opt/log/performance) +# OUT_ROOT root directory for data files (eg /opt/log/performance) # INTERVAL the number of seconds between checks (eg 300 = 5 min) -# DURATION numer of hours to run (eg 1 = 1 hr) +# DURATION number of hours to run (eg 1 = 1 hr) # # This script runs various standard system utilities to collect # system performance statistics and writes them out to datafile named @@ -21,7 +21,7 @@ # every INTERVAL number of seconds. After DURATION, the script # closes and compresses it's datafile via /usr/bin/compress and then # exits. If DURATION=24 and INTERVAL=300 (recommended) then the -# following cron entry would collect continuos stats for a system: +# following cron entry would collect continuous stats for a system: # # 0 0 * * * //orca-hp-stat.pl # @@ -32,7 +32,7 @@ # Added #open connections, pagestotl. # 2001-07-06 - JDK - added command-line args & data checks # 2001-07-09 - JDK - added signal handler, column checks, & umask -# 2001-07-10 - JDK - now autodetects interfaces via netstat -i +# 2001-07-10 - JDK - now auto detects interfaces via netstat -i # v1.5 # # $HeadURL$ @@ -43,14 +43,14 @@ # Note: Execution speed is more important than cleanliness here. # # -# There are some script which are used for gettting data and there are +# There are some script which are used for getting data and there are # # phymem -- for getting physical memory # Copy this script in the path /usr/local/bin # ##################BEGIN OF FILE################## -#/* Programma to determine statistics about the physical and virtual -# memory of a HP workstation, independant of HP-UX version. +#/* Program to determine statistics about the physical and virtual +# memory of a HP workstation, independent of HP-UX version. #Shows some of the fields on std out. # #Program: phymem @@ -139,7 +139,7 @@ ## BEGIN set defaults -$OUT_ROOT ||= '/home/orca/orcallator'; # root directory for datafiles +$OUT_ROOT ||= '/home/orca/orcallator'; # root directory for dateless $INTERVAL ||= 300; # seconds between checks $DURATION ||= 24; # number of hours to run @@ -200,7 +200,7 @@ $SIG{QUIT} = \&exit_nicely; $SIG{TERM} = \&exit_nicely; -# Set gloabals used for printing (or not) headers. +# Set globals used for printing (or not) headers. $need_header = 1; $prev_header_cnt = 0; $prev_info_cnt = 0; From blair at orcaware.com Wed Apr 7 22:05:21 2004 From: blair at orcaware.com (Blair Zajac) Date: Wed, 7 Apr 2004 22:05:21 -0700 Subject: [Orca-checkins] r298 - in trunk/orca: lib/Orca orca Message-ID: <200404080505.i3855Ljo031918@orcaware.com> Author: blair Date: Wed Apr 7 22:04:48 2004 New Revision: 298 Modified: trunk/orca/lib/Orca/Config.pm trunk/orca/lib/Orca/Constants.pm trunk/orca/lib/Orca/DataFile.pm trunk/orca/lib/Orca/HTMLFile.pm trunk/orca/lib/Orca/ImageFile.pm trunk/orca/lib/Orca/NewState.pm trunk/orca/lib/Orca/OldState.pm trunk/orca/lib/Orca/OpenFileHash.pm trunk/orca/lib/Orca/RRDFile.pm trunk/orca/lib/Orca/SourceFile.pm trunk/orca/lib/Orca/SourceFileIDs.pm trunk/orca/lib/Orca/Utils.pm trunk/orca/orca/orca.pl.in trunk/orca/orca/upgrade_installation.pl Log: * lib/Orca/Config.pm, * lib/Orca/Constants.pm, * lib/Orca/DataFile.pm, * lib/Orca/HTMLFile.pm, * lib/Orca/ImageFile.pm, * lib/Orca/NewState.pm, * lib/Orca/OldState.pm, * lib/Orca/OpenFileHash.pm, * lib/Orca/RRDFile.pm, * lib/Orca/SourceFileIDs.pm, * lib/Orca/SourceFile.pm, * lib/Orca/Utils.pm, * orca/orca.pl.in, * orca/upgrade_installation.pl: Extend copyright range. Modified: trunk/orca/lib/Orca/Config.pm ============================================================================== --- trunk/orca/lib/Orca/Config.pm (original) +++ trunk/orca/lib/Orca/Config.pm Wed Apr 7 22:04:48 2004 @@ -1,7 +1,7 @@ # Orca::Config: Manage configuration parameters for Orca. # # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. -# Copyright (C) 1999-2002 Blair Zajac. +# Copyright (C) 1999-2004 Blair Zajac. package Orca::Config; Modified: trunk/orca/lib/Orca/Constants.pm ============================================================================== --- trunk/orca/lib/Orca/Constants.pm (original) +++ trunk/orca/lib/Orca/Constants.pm Wed Apr 7 22:04:48 2004 @@ -1,7 +1,7 @@ # Orca::Constants.pm: Global constants for Orca. # # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. -# Copyright (C) 1999-2002 Blair Zajac. +# Copyright (C) 1999-2004 Blair Zajac. package Orca::Constants; Modified: trunk/orca/lib/Orca/DataFile.pm ============================================================================== --- trunk/orca/lib/Orca/DataFile.pm (original) +++ trunk/orca/lib/Orca/DataFile.pm Wed Apr 7 22:04:48 2004 @@ -1,7 +1,7 @@ # Orca::DataFile: Base class for managing source data, RRD and image files. # # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. -# Copyright (C) 1999-2002 Blair Zajac. +# Copyright (C) 1999-2004 Blair Zajac. package Orca::DataFile; Modified: trunk/orca/lib/Orca/HTMLFile.pm ============================================================================== --- trunk/orca/lib/Orca/HTMLFile.pm (original) +++ trunk/orca/lib/Orca/HTMLFile.pm Wed Apr 7 22:04:48 2004 @@ -1,7 +1,7 @@ # Orca::HTMLFile: Manage the creation of HTML files. # # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. -# Copyright (C) 1999-2002 Blair Zajac. +# Copyright (C) 1999-2004 Blair Zajac. package Orca::HTMLFile; Modified: trunk/orca/lib/Orca/ImageFile.pm ============================================================================== --- trunk/orca/lib/Orca/ImageFile.pm (original) +++ trunk/orca/lib/Orca/ImageFile.pm Wed Apr 7 22:04:48 2004 @@ -1,7 +1,7 @@ # Orca::ImageFile: Manage the creation of PNG or GIF plot files. # # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. -# Copyright (C) 1999-2002 Blair Zajac. +# Copyright (C) 1999-2004 Blair Zajac. package Orca::ImageFile; Modified: trunk/orca/lib/Orca/NewState.pm ============================================================================== --- trunk/orca/lib/Orca/NewState.pm (original) +++ trunk/orca/lib/Orca/NewState.pm Wed Apr 7 22:04:48 2004 @@ -1,7 +1,7 @@ # Orca::NewState: Keep state information between invocations of Orca. # # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. -# Copyright (C) 1999-2002 Blair Zajac. +# Copyright (C) 1999-2004 Blair Zajac. package Orca::NewState; Modified: trunk/orca/lib/Orca/OldState.pm ============================================================================== --- trunk/orca/lib/Orca/OldState.pm (original) +++ trunk/orca/lib/Orca/OldState.pm Wed Apr 7 22:04:48 2004 @@ -1,7 +1,7 @@ # Orca::OldState: Keep state information between invocations of Orca. # # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. -# Copyright (C) 1999-2002 Blair Zajac. +# Copyright (C) 1999-2004 Blair Zajac. package Orca::OldState; Modified: trunk/orca/lib/Orca/OpenFileHash.pm ============================================================================== --- trunk/orca/lib/Orca/OpenFileHash.pm (original) +++ trunk/orca/lib/Orca/OpenFileHash.pm Wed Apr 7 22:04:48 2004 @@ -1,7 +1,7 @@ # Orca::OpenFileHash: Cache open file descriptors for the whole program. # # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. -# Copyright (C) 1999-2002 Blair Zajac. +# Copyright (C) 1999-2004 Blair Zajac. package Orca::OpenFileHash; Modified: trunk/orca/lib/Orca/RRDFile.pm ============================================================================== --- trunk/orca/lib/Orca/RRDFile.pm (original) +++ trunk/orca/lib/Orca/RRDFile.pm Wed Apr 7 22:04:48 2004 @@ -1,7 +1,7 @@ # Orca::RRDFile: Manage RRD file creation and updating. # # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. -# Copyright (C) 1999-2002 Blair Zajac. +# Copyright (C) 1999-2004 Blair Zajac. package Orca::RRDFile; Modified: trunk/orca/lib/Orca/SourceFile.pm ============================================================================== --- trunk/orca/lib/Orca/SourceFile.pm (original) +++ trunk/orca/lib/Orca/SourceFile.pm Wed Apr 7 22:04:48 2004 @@ -1,7 +1,7 @@ # Orca::SourceFile: Manage the watching and loading of source data files. # # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. -# Copyright (C) 1999-2002 Blair Zajac. +# Copyright (C) 1999-2004 Blair Zajac. package Orca::SourceFile; Modified: trunk/orca/lib/Orca/SourceFileIDs.pm ============================================================================== --- trunk/orca/lib/Orca/SourceFileIDs.pm (original) +++ trunk/orca/lib/Orca/SourceFileIDs.pm Wed Apr 7 22:04:48 2004 @@ -3,7 +3,7 @@ # copies of all the filenames used by Orca. # # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. -# Copyright (C) 1999-2002 Blair Zajac. +# Copyright (C) 1999-2004 Blair Zajac. package Orca::SourceFileIDs; Modified: trunk/orca/lib/Orca/Utils.pm ============================================================================== --- trunk/orca/lib/Orca/Utils.pm (original) +++ trunk/orca/lib/Orca/Utils.pm Wed Apr 7 22:04:48 2004 @@ -1,7 +1,7 @@ # Orca::Utils: Small utility subroutines. # # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. -# Copyright (C) 1999-2002 Blair Zajac. +# Copyright (C) 1999-2004 Blair Zajac. package Orca::Utils; Modified: trunk/orca/orca/orca.pl.in ============================================================================== --- trunk/orca/orca/orca.pl.in (original) +++ trunk/orca/orca/orca.pl.in Wed Apr 7 22:04:48 2004 @@ -1,7 +1,7 @@ # Orca: display arbitrary data from files onto web pages using RRDtool. # # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. -# Copyright (C) 1999-2002 Blair Zajac. +# Copyright (C) 1999-2004 Blair Zajac. require 5.005_03; Modified: trunk/orca/orca/upgrade_installation.pl ============================================================================== --- trunk/orca/orca/upgrade_installation.pl (original) +++ trunk/orca/orca/upgrade_installation.pl Wed Apr 7 22:04:48 2004 @@ -5,7 +5,7 @@ # 2) Rename all files with * in them to _times_. # # Copyright (C) 1999 Blair Zajac and GeoCities, Inc. -# Copyright (C) 1999-2002 Blair Zajac. +# Copyright (C) 1999-2004 Blair Zajac. use strict; use File::Find; From blair at orcaware.com Wed Apr 7 22:39:41 2004 From: blair at orcaware.com (Blair Zajac) Date: Wed, 7 Apr 2004 22:39:41 -0700 Subject: [Orca-checkins] r299 - in trunk/orca: contrib/rotate_orca_graphs data_gatherers/orca_services data_gatherers/orcallator data_gatherers/procallator lib/Orca orca Message-ID: <200404080539.i385dfJH032447@orcaware.com> Author: blair Date: Wed Apr 7 22:39:11 2004 New Revision: 299 Modified: trunk/orca/contrib/rotate_orca_graphs/rotate_orca_graphs.sh.in (contents, props changed) trunk/orca/data_gatherers/orca_services/S99orca_services.sh.in (contents, props changed) trunk/orca/data_gatherers/orca_services/orca_services.cfg.in (contents, props changed) trunk/orca/data_gatherers/orca_services/orca_services.pl.in (contents, props changed) trunk/orca/data_gatherers/orca_services/orca_services_running.pl.in (contents, props changed) trunk/orca/data_gatherers/orca_services/restart_orca_services.sh.in (contents, props changed) trunk/orca/data_gatherers/orca_services/start_orca_services.sh.in (contents, props changed) trunk/orca/data_gatherers/orca_services/stop_orca_services.sh.in (contents, props changed) trunk/orca/data_gatherers/orcallator/S99orcallator.sh.in (contents, props changed) trunk/orca/data_gatherers/orcallator/orcallator.cfg.in (contents, props changed) trunk/orca/data_gatherers/orcallator/orcallator_column.pl (contents, props changed) trunk/orca/data_gatherers/orcallator/orcallator_running.pl.in (contents, props changed) trunk/orca/data_gatherers/orcallator/restart_orcallator.sh.in (contents, props changed) trunk/orca/data_gatherers/orcallator/start_orcallator.sh.in (contents, props changed) trunk/orca/data_gatherers/orcallator/stop_orcallator.sh.in (contents, props changed) trunk/orca/data_gatherers/procallator/S99procallator.sh.in (contents, props changed) trunk/orca/data_gatherers/procallator/procallator.cfg.in (contents, props changed) trunk/orca/data_gatherers/procallator/procallator.pl.in (contents, props changed) trunk/orca/lib/Orca/Config.pm (contents, props changed) trunk/orca/lib/Orca/Constants.pm (contents, props changed) trunk/orca/lib/Orca/DataFile.pm (contents, props changed) trunk/orca/lib/Orca/HTMLFile.pm (contents, props changed) trunk/orca/lib/Orca/ImageFile.pm (contents, props changed) trunk/orca/lib/Orca/NewState.pm (contents, props changed) trunk/orca/lib/Orca/OldState.pm (contents, props changed) trunk/orca/lib/Orca/OpenFileHash.pm (contents, props changed) trunk/orca/lib/Orca/RRDFile.pm (contents, props changed) trunk/orca/lib/Orca/SourceFile.pm (contents, props changed) trunk/orca/lib/Orca/SourceFileIDs.pm (contents, props changed) trunk/orca/lib/Orca/Utils.pm (contents, props changed) trunk/orca/orca/orca.pl.in (contents, props changed) trunk/orca/orca/upgrade_installation.pl (contents, props changed) Log: * contrib/rotate_orca_graphs/rotate_orca_graphs.sh.in, * data_gatherers/orcallator/orcallator.cfg.in, * data_gatherers/orcallator/orcallator_column.pl, * data_gatherers/orcallator/orcallator_running.pl.in, * data_gatherers/orcallator/restart_orcallator.sh.in, * data_gatherers/orcallator/S99orcallator.sh.in, * data_gatherers/orcallator/start_orcallator.sh.in, * data_gatherers/orcallator/stop_orcallator.sh.in, * data_gatherers/orca_services/orca_services.cfg.in, * data_gatherers/orca_services/orca_services.pl.in, * data_gatherers/orca_services/orca_services_running.pl.in, * data_gatherers/orca_services/restart_orca_services.sh.in, * data_gatherers/orca_services/S99orca_services.sh.in, * data_gatherers/orca_services/start_orca_services.sh.in, * data_gatherers/orca_services/stop_orca_services.sh.in, * data_gatherers/procallator/procallator.cfg.in, * data_gatherers/procallator/procallator.pl.in, * data_gatherers/procallator/S99procallator.sh.in, * lib/Orca/Config.pm, * lib/Orca/Constants.pm, * lib/Orca/DataFile.pm, * lib/Orca/HTMLFile.pm, * lib/Orca/ImageFile.pm, * lib/Orca/NewState.pm, * lib/Orca/OldState.pm, * lib/Orca/OpenFileHash.pm, * lib/Orca/RRDFile.pm, * lib/Orca/SourceFileIDs.pm, * lib/Orca/SourceFile.pm, * lib/Orca/Utils.pm, * orca/orca.pl.in, * orca/upgrade_installation.pl: Set 'svn:keywords' to 'HeadURL LastChangedBy LastChangedDate LastChangedRevision' and use them. Modified: trunk/orca/contrib/rotate_orca_graphs/rotate_orca_graphs.sh.in ============================================================================== --- trunk/orca/contrib/rotate_orca_graphs/rotate_orca_graphs.sh.in (original) +++ trunk/orca/contrib/rotate_orca_graphs/rotate_orca_graphs.sh.in Wed Apr 7 22:39:11 2004 @@ -8,6 +8,11 @@ # 1) Set the ARCHIVE_DIR to the location of the archive directory. # 2) Set up a cron job that runs this script: # 59 23 * * * create_orca_daily_graphs.sh +# +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ # Set this directory to archive the daily plots in. ARCHIVE_DIR= Modified: trunk/orca/data_gatherers/orca_services/S99orca_services.sh.in ============================================================================== --- trunk/orca/data_gatherers/orca_services/S99orca_services.sh.in (original) +++ trunk/orca/data_gatherers/orca_services/S99orca_services.sh.in Wed Apr 7 22:39:11 2004 @@ -1,5 +1,10 @@ #!/bin/sh +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ + prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@ Modified: trunk/orca/data_gatherers/orca_services/orca_services.cfg.in ============================================================================== --- trunk/orca/data_gatherers/orca_services/orca_services.cfg.in (original) +++ trunk/orca/data_gatherers/orca_services/orca_services.cfg.in Wed Apr 7 22:39:11 2004 @@ -1,5 +1,10 @@ # Orca configuration file for orca_services files. +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ + # Require at least this version of Orca. require 0.27 Modified: trunk/orca/data_gatherers/orca_services/orca_services.pl.in ============================================================================== --- trunk/orca/data_gatherers/orca_services/orca_services.pl.in (original) +++ trunk/orca/data_gatherers/orca_services/orca_services.pl.in Wed Apr 7 22:39:11 2004 @@ -9,6 +9,11 @@ ## for later processing. ## +## $HeadURL$ +## $LastChangedRevision$ +## $LastChangedDate$ +## $LastChangedBy$ + ## ## Author: Carlos Canau ## With: Jose Carlos Pereira Modified: trunk/orca/data_gatherers/orca_services/orca_services_running.pl.in ============================================================================== --- trunk/orca/data_gatherers/orca_services/orca_services_running.pl.in (original) +++ trunk/orca/data_gatherers/orca_services/orca_services_running.pl.in Wed Apr 7 22:39:11 2004 @@ -1,7 +1,12 @@ # orca_services_running: warn if orca_services files are not up to date. # -# Copyright (C) 2000 Carlos Canau and KPNQwest Portugal +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ +# # Copyright (C) 1998, 1999 Blair Zajac and Yahoo!, Inc. +# Copyright (C) 2000 Carlos Canau and KPNQwest Portugal use strict; use POSIX qw(strftime); Modified: trunk/orca/data_gatherers/orca_services/restart_orca_services.sh.in ============================================================================== --- trunk/orca/data_gatherers/orca_services/restart_orca_services.sh.in (original) +++ trunk/orca/data_gatherers/orca_services/restart_orca_services.sh.in Wed Apr 7 22:39:11 2004 @@ -1,6 +1,12 @@ #!/bin/sh # This stops and restarts orca_services. + +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ + prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@ Modified: trunk/orca/data_gatherers/orca_services/start_orca_services.sh.in ============================================================================== --- trunk/orca/data_gatherers/orca_services/start_orca_services.sh.in (original) +++ trunk/orca/data_gatherers/orca_services/start_orca_services.sh.in Wed Apr 7 22:39:11 2004 @@ -3,6 +3,11 @@ # This script runs orca_services with the proper options for your # site. +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ + prefix=@prefix@ exec_prefix=@exec_prefix@ libexecdir=@libexecdir@ Modified: trunk/orca/data_gatherers/orca_services/stop_orca_services.sh.in ============================================================================== --- trunk/orca/data_gatherers/orca_services/stop_orca_services.sh.in (original) +++ trunk/orca/data_gatherers/orca_services/stop_orca_services.sh.in Wed Apr 7 22:39:11 2004 @@ -1,5 +1,10 @@ #!/bin/sh +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ + AWK=@AWK@ # This utility function checks if the specified variable has non-zero Modified: trunk/orca/data_gatherers/orcallator/S99orcallator.sh.in ============================================================================== --- trunk/orca/data_gatherers/orcallator/S99orcallator.sh.in (original) +++ trunk/orca/data_gatherers/orcallator/S99orcallator.sh.in Wed Apr 7 22:39:11 2004 @@ -1,5 +1,10 @@ #!/bin/sh +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ + prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@ Modified: trunk/orca/data_gatherers/orcallator/orcallator.cfg.in ============================================================================== --- trunk/orca/data_gatherers/orcallator/orcallator.cfg.in (original) +++ trunk/orca/data_gatherers/orcallator/orcallator.cfg.in Wed Apr 7 22:39:11 2004 @@ -1,5 +1,10 @@ # Orca configuration file for orcallator files. +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ + # Require at least this version of Orca. require Orca 0.265 Modified: trunk/orca/data_gatherers/orcallator/orcallator_column.pl ============================================================================== --- trunk/orca/data_gatherers/orcallator/orcallator_column.pl (original) +++ trunk/orca/data_gatherers/orcallator/orcallator_column.pl Wed Apr 7 22:39:11 2004 @@ -1,5 +1,10 @@ # orcallator_column: display selected columns from orcallator output. # +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ +# # Copyright (C) 1998-1999 Blair Zajac and Yahoo!/GeoCities, Inc. # Copyright (C) 1999-2002 Blair Zajac. Modified: trunk/orca/data_gatherers/orcallator/orcallator_running.pl.in ============================================================================== --- trunk/orca/data_gatherers/orcallator/orcallator_running.pl.in (original) +++ trunk/orca/data_gatherers/orcallator/orcallator_running.pl.in Wed Apr 7 22:39:11 2004 @@ -1,5 +1,10 @@ # orcallator_running: warn if orcallator files are not up to date. # +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ +# # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. # Copyright (C) 1999-2002 Blair Zajac. Modified: trunk/orca/data_gatherers/orcallator/restart_orcallator.sh.in ============================================================================== --- trunk/orca/data_gatherers/orcallator/restart_orcallator.sh.in (original) +++ trunk/orca/data_gatherers/orcallator/restart_orcallator.sh.in Wed Apr 7 22:39:11 2004 @@ -1,6 +1,12 @@ #!/bin/sh # This stops and restarts orcallator.se. + +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ + prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@ Modified: trunk/orca/data_gatherers/orcallator/start_orcallator.sh.in ============================================================================== --- trunk/orca/data_gatherers/orcallator/start_orcallator.sh.in (original) +++ trunk/orca/data_gatherers/orcallator/start_orcallator.sh.in Wed Apr 7 22:39:11 2004 @@ -2,6 +2,11 @@ # This script runs orcallator.se with the proper options for your site. +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ + prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ Modified: trunk/orca/data_gatherers/orcallator/stop_orcallator.sh.in ============================================================================== --- trunk/orca/data_gatherers/orcallator/stop_orcallator.sh.in (original) +++ trunk/orca/data_gatherers/orcallator/stop_orcallator.sh.in Wed Apr 7 22:39:11 2004 @@ -1,5 +1,10 @@ #!/bin/sh +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ + AWK=@AWK@ # This utility function checks if the specified variable has non-zero Modified: trunk/orca/data_gatherers/procallator/S99procallator.sh.in ============================================================================== --- trunk/orca/data_gatherers/procallator/S99procallator.sh.in (original) +++ trunk/orca/data_gatherers/procallator/S99procallator.sh.in Wed Apr 7 22:39:11 2004 @@ -6,6 +6,11 @@ # # description: Procallator is a data measurement tool that measures # many system statistics. +# +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ prefix=@prefix@ exec_prefix=@exec_prefix@ Modified: trunk/orca/data_gatherers/procallator/procallator.cfg.in ============================================================================== --- trunk/orca/data_gatherers/procallator/procallator.cfg.in (original) +++ trunk/orca/data_gatherers/procallator/procallator.cfg.in Wed Apr 7 22:39:11 2004 @@ -1,5 +1,10 @@ # Orca configuration file for procallator files. +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ + # Require at least this version of Orca. require Orca 0.265 Modified: trunk/orca/data_gatherers/procallator/procallator.pl.in ============================================================================== --- trunk/orca/data_gatherers/procallator/procallator.pl.in (original) +++ trunk/orca/data_gatherers/procallator/procallator.pl.in Wed Apr 7 22:39:11 2004 @@ -1,8 +1,11 @@ # Collector for /proc statistics for use with Linux 2.2 and 2.4 kernels. # -# Copyright (C) 2001 Guilherme Carvalho Chehab. All Rights Reserved. +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ # -# Config variables +# Copyright (C) 2001 Guilherme Carvalho Chehab. All Rights Reserved. use Sys::Hostname; Modified: trunk/orca/lib/Orca/Config.pm ============================================================================== --- trunk/orca/lib/Orca/Config.pm (original) +++ trunk/orca/lib/Orca/Config.pm Wed Apr 7 22:39:11 2004 @@ -1,5 +1,10 @@ # Orca::Config: Manage configuration parameters for Orca. # +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ +# # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. # Copyright (C) 1999-2004 Blair Zajac. Modified: trunk/orca/lib/Orca/Constants.pm ============================================================================== --- trunk/orca/lib/Orca/Constants.pm (original) +++ trunk/orca/lib/Orca/Constants.pm Wed Apr 7 22:39:11 2004 @@ -1,5 +1,10 @@ # Orca::Constants.pm: Global constants for Orca. # +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ +# # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. # Copyright (C) 1999-2004 Blair Zajac. Modified: trunk/orca/lib/Orca/DataFile.pm ============================================================================== --- trunk/orca/lib/Orca/DataFile.pm (original) +++ trunk/orca/lib/Orca/DataFile.pm Wed Apr 7 22:39:11 2004 @@ -1,5 +1,10 @@ # Orca::DataFile: Base class for managing source data, RRD and image files. # +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ +# # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. # Copyright (C) 1999-2004 Blair Zajac. Modified: trunk/orca/lib/Orca/HTMLFile.pm ============================================================================== --- trunk/orca/lib/Orca/HTMLFile.pm (original) +++ trunk/orca/lib/Orca/HTMLFile.pm Wed Apr 7 22:39:11 2004 @@ -1,5 +1,10 @@ # Orca::HTMLFile: Manage the creation of HTML files. # +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ +# # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. # Copyright (C) 1999-2004 Blair Zajac. Modified: trunk/orca/lib/Orca/ImageFile.pm ============================================================================== --- trunk/orca/lib/Orca/ImageFile.pm (original) +++ trunk/orca/lib/Orca/ImageFile.pm Wed Apr 7 22:39:11 2004 @@ -1,5 +1,10 @@ # Orca::ImageFile: Manage the creation of PNG or GIF plot files. # +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ +# # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. # Copyright (C) 1999-2004 Blair Zajac. Modified: trunk/orca/lib/Orca/NewState.pm ============================================================================== --- trunk/orca/lib/Orca/NewState.pm (original) +++ trunk/orca/lib/Orca/NewState.pm Wed Apr 7 22:39:11 2004 @@ -1,5 +1,10 @@ # Orca::NewState: Keep state information between invocations of Orca. # +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ +# # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. # Copyright (C) 1999-2004 Blair Zajac. Modified: trunk/orca/lib/Orca/OldState.pm ============================================================================== --- trunk/orca/lib/Orca/OldState.pm (original) +++ trunk/orca/lib/Orca/OldState.pm Wed Apr 7 22:39:11 2004 @@ -1,5 +1,10 @@ # Orca::OldState: Keep state information between invocations of Orca. # +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ +# # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. # Copyright (C) 1999-2004 Blair Zajac. Modified: trunk/orca/lib/Orca/OpenFileHash.pm ============================================================================== --- trunk/orca/lib/Orca/OpenFileHash.pm (original) +++ trunk/orca/lib/Orca/OpenFileHash.pm Wed Apr 7 22:39:11 2004 @@ -1,5 +1,10 @@ # Orca::OpenFileHash: Cache open file descriptors for the whole program. # +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ +# # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. # Copyright (C) 1999-2004 Blair Zajac. Modified: trunk/orca/lib/Orca/RRDFile.pm ============================================================================== --- trunk/orca/lib/Orca/RRDFile.pm (original) +++ trunk/orca/lib/Orca/RRDFile.pm Wed Apr 7 22:39:11 2004 @@ -1,5 +1,10 @@ # Orca::RRDFile: Manage RRD file creation and updating. # +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ +# # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. # Copyright (C) 1999-2004 Blair Zajac. Modified: trunk/orca/lib/Orca/SourceFile.pm ============================================================================== --- trunk/orca/lib/Orca/SourceFile.pm (original) +++ trunk/orca/lib/Orca/SourceFile.pm Wed Apr 7 22:39:11 2004 @@ -1,5 +1,10 @@ # Orca::SourceFile: Manage the watching and loading of source data files. # +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ +# # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. # Copyright (C) 1999-2004 Blair Zajac. Modified: trunk/orca/lib/Orca/SourceFileIDs.pm ============================================================================== --- trunk/orca/lib/Orca/SourceFileIDs.pm (original) +++ trunk/orca/lib/Orca/SourceFileIDs.pm Wed Apr 7 22:39:11 2004 @@ -2,6 +2,11 @@ # identifiers. The primary purpose of this module is to keep only two # copies of all the filenames used by Orca. # +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ +# # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. # Copyright (C) 1999-2004 Blair Zajac. Modified: trunk/orca/lib/Orca/Utils.pm ============================================================================== --- trunk/orca/lib/Orca/Utils.pm (original) +++ trunk/orca/lib/Orca/Utils.pm Wed Apr 7 22:39:11 2004 @@ -1,5 +1,10 @@ # Orca::Utils: Small utility subroutines. # +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ +# # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. # Copyright (C) 1999-2004 Blair Zajac. Modified: trunk/orca/orca/orca.pl.in ============================================================================== --- trunk/orca/orca/orca.pl.in (original) +++ trunk/orca/orca/orca.pl.in Wed Apr 7 22:39:11 2004 @@ -1,5 +1,10 @@ # Orca: display arbitrary data from files onto web pages using RRDtool. # +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ +# # Copyright (C) 1998-1999 Blair Zajac and Yahoo!, Inc. # Copyright (C) 1999-2004 Blair Zajac. Modified: trunk/orca/orca/upgrade_installation.pl ============================================================================== --- trunk/orca/orca/upgrade_installation.pl (original) +++ trunk/orca/orca/upgrade_installation.pl Wed Apr 7 22:39:11 2004 @@ -4,6 +4,11 @@ # 1) Migrate from a percollator named installation to orcallator. # 2) Rename all files with * in them to _times_. # +# $HeadURL$ +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ +# # Copyright (C) 1999 Blair Zajac and GeoCities, Inc. # Copyright (C) 1999-2004 Blair Zajac. From blair at orcaware.com Thu Apr 8 21:34:06 2004 From: blair at orcaware.com (Blair Zajac) Date: Thu, 8 Apr 2004 21:34:06 -0700 Subject: [Orca-checkins] r300 - in trunk/orca: . lib/Orca orca Message-ID: <200404090434.i394Y6G3016598@orcaware.com> Author: blair Date: Thu Apr 8 21:33:39 2004 New Revision: 300 Modified: trunk/orca/TODO trunk/orca/lib/Orca/Constants.pm trunk/orca/lib/Orca/RRDFile.pm trunk/orca/orca/orca.pl.in Log: * TODO, * lib/Orca/Constants.pm, * lib/Orca/RRDFile.pm, * orca/orca.pl.in: Replace all tabs with spaces. Modified: trunk/orca/TODO ============================================================================== --- trunk/orca/TODO (original) +++ trunk/orca/TODO Thu Apr 8 21:33:39 2004 @@ -21,7 +21,7 @@ Update procallator to the latest version. Remove the percol listing in find_files in procallator.cfg and - orca_services.cfg. +orca_services.cfg. Update orca_services to 1.7.2 or 2.0. Modified: trunk/orca/lib/Orca/Constants.pm ============================================================================== --- trunk/orca/lib/Orca/Constants.pm (original) +++ trunk/orca/lib/Orca/Constants.pm Thu Apr 8 21:33:39 2004 @@ -16,14 +16,14 @@ @ISA = qw(Exporter); $VERSION = substr q$Revision: 0.01 $, 10; -# ORCA_VERSION This version of Orca. -# ORCA_RRD_VERSION This is the version number used in creating the DS -# names in RRDs. This should be updated any time a -# new version of Orca needs some new content in its -# RRD files. The DS name is a concatentation of the -# string Orca with this string of digits. -# DAY_SECONDS The number of seconds in one day. -# IS_WIN32 If Orca is running on a Windows platform. +# ORCA_VERSION This version of Orca. +# ORCA_RRD_VERSION This is the version number used in creating the DS +# names in RRDs. This should be updated any time a +# new version of Orca needs some new content in its +# RRD files. The DS name is a concatentation of the +# string Orca with this string of digits. +# DAY_SECONDS The number of seconds in one day. +# IS_WIN32 If Orca is running on a Windows platform. use vars qw($ORCA_VERSION $ORCA_RRD_VERSION); push(@EXPORT_OK, qw($ORCA_VERSION $ORCA_RRD_VERSION DAY_SECONDS IS_WIN32)); $ORCA_VERSION = '0.27'; @@ -117,13 +117,13 @@ # These variables are set once at program start depending upon the # command line arguments: -# $opt_daemon Daemonize Orca. -# $opt_generate_gifs Generate GIFs instead of PNGs. -# $opt_log_filename Output log filename. -# $opt_once_only Do only one pass through Orca. -# $opt_no_html Do not generate any HTML files. -# $opt_no_images Do not generate any image files. -# $opt_verbose Be verbose about my running. +# $opt_daemon Daemonize Orca. +# $opt_generate_gifs Generate GIFs instead of PNGs. +# $opt_log_filename Output log filename. +# $opt_once_only Do only one pass through Orca. +# $opt_no_html Do not generate any HTML files. +# $opt_no_images Do not generate any image files. +# $opt_verbose Be verbose about my running. use vars qw($opt_daemon $opt_generate_gifs $opt_log_filename Modified: trunk/orca/lib/Orca/RRDFile.pm ============================================================================== --- trunk/orca/lib/Orca/RRDFile.pm (original) +++ trunk/orca/lib/Orca/RRDFile.pm Thu Apr 8 21:33:39 2004 @@ -14,7 +14,7 @@ use Carp; use RRDs; use Orca::Constants qw($opt_verbose - $ORCA_RRD_VERSION + $ORCA_RRD_VERSION @RRA_PDP_COUNTS @RRA_ROW_COUNTS $INCORRECT_NUMBER_OF_ARGS); Modified: trunk/orca/orca/orca.pl.in ============================================================================== --- trunk/orca/orca/orca.pl.in (original) +++ trunk/orca/orca/orca.pl.in Thu Apr 8 21:33:39 2004 @@ -1615,10 +1615,10 @@ A generic example of a group and its parameters are: group GROUP_NAME1 { - find_files filename1 filename2 ... - column_description column1_name column2_name ... - date_source file_mtime - interval 300 + find_files filename1 filename2 ... + column_description column1_name column2_name ... + date_source file_mtime + interval 300 . . . @@ -1825,15 +1825,15 @@ them. The general format for creating a plot is: plot { - title Plot title - source GROUP_NAME1 - data column_name1 - data 1024 * column_name2 + column_name3 - legend First column - legend Some math - y_legend Counts/sec - data_min 0 - data_max 100 + title Plot title + source GROUP_NAME1 + data column_name1 + data 1024 * column_name2 + column_name3 + legend First column + legend Some math + y_legend Counts/sec + data_min 0 + data_max 100 . . } @@ -1882,8 +1882,8 @@ plot the total number of bits per second, you could do this: plot { - source bytes_per_second - data 8 * ( in_bytes_per_second + out_bytes_per_second ) + source bytes_per_second + data 8 * ( in_bytes_per_second + out_bytes_per_second ) } The second form allows for matching column names that match a regular @@ -1909,25 +1909,25 @@ } plot { - source throughput - data (.*\d)Ipkt/s - data $1Opkt/s + source throughput + data (.*\d)Ipkt/s + data $1Opkt/s . . } plot { - source throughput - data (.*\d)InKB/s - data $1OuKB/s + source throughput + data (.*\d)InKB/s + data $1OuKB/s . . } plot { - source throughput - data (.*\d)IErr/s - data $1OErr/s + source throughput + data (.*\d)IErr/s + data $1OErr/s . . } @@ -2049,12 +2049,12 @@ to column3 and column4. plot { - data column1 - data column2 - data column3 - data column4 - data_type DERIVE - data_type COUNTER + data column1 + data column2 + data column3 + data column4 + data_type DERIVE + data_type COUNTER } @@ -2090,13 +2090,13 @@ I's to U. For example: plot { - data column1 - data column2 - data column3 - data_min U - data_max U - data_min 0 - data_max 100 + data column1 + data column2 + data column3 + data_min U + data_max U + data_min 0 + data_max 100 } If there are no minimum or maximum values specified for a particular @@ -2263,15 +2263,15 @@ multiple plots on the graph: plot { - source things - data some - data other - data things - data something_else - summary_format %.0lf - summary_format %4.1f %s - color 0000ff - color ff0000 + source things + data some + data other + data things + data something_else + summary_format %.0lf + summary_format %4.1f %s + color 0000ff + color ff0000 } If there are no summary format specifiers, then the default format of From blair at orcaware.com Fri Apr 9 08:19:03 2004 From: blair at orcaware.com (Blair Zajac) Date: Fri, 9 Apr 2004 08:19:03 -0700 Subject: [Orca-checkins] r301 - in trunk/orca: . packages/Time-HiRes-1.55 packages/Time-HiRes-1.57 packages/Time-HiRes-1.57/t Message-ID: <200404091519.i39FJ3AI029395@orcaware.com> Author: blair Date: Fri Apr 9 08:18:39 2004 New Revision: 301 Added: trunk/orca/packages/Time-HiRes-1.57/ - copied from r300, trunk/orca/packages/Time-HiRes-1.55/ Removed: trunk/orca/packages/Time-HiRes-1.55/ Modified: trunk/orca/INSTALL trunk/orca/configure.in trunk/orca/packages/Time-HiRes-1.57/Changes trunk/orca/packages/Time-HiRes-1.57/HiRes.pm trunk/orca/packages/Time-HiRes-1.57/HiRes.xs trunk/orca/packages/Time-HiRes-1.57/META.yml trunk/orca/packages/Time-HiRes-1.57/Makefile.PL trunk/orca/packages/Time-HiRes-1.57/t/HiRes.t Log: Upgrade Time::HiRes from 1.55 to 1.57. * INSTALL (Determine which Perl modules need compiling and installing): Update all references to Time::HiRes's version number from 1.55 to 1.57. * configure.in: Bump Time::HiRes's version number to 1.57. * packages/Time-HiRes-1.57: Renamed from packages/Time-HiRes-1.55. Directory contents updated from Time-HiRes-1.57.tar.gz. Modified: trunk/orca/INSTALL ============================================================================== --- trunk/orca/INSTALL (original) +++ trunk/orca/INSTALL Fri Apr 9 08:18:39 2004 @@ -177,7 +177,7 @@ Math::IntervalSearch >= 1.05 >= 1.05 1.05 RRDs >= 1.000461 >= 1.0.46 1.0.46 Storable >= 2.12 >= 2.12 2.12 - Time::HiRes Not required by Orca 1.55 + Time::HiRes Not required by Orca 1.57 All seven of these modules are included with the Orca distribution in the packages directory. When you configure Orca in step 3), @@ -278,10 +278,10 @@ Time::HiRes - http://www.perl.com/CPAN/authors/id/J/JH/JHI/Time-HiRes-1.55.tar.gz + http://www.perl.com/CPAN/authors/id/J/JH/JHI/Time-HiRes-1.57.tar.gz - % gunzip -c Time-HiRes-1.55.tar.gz | tar xvf - - % cd Time-HiRes-1.55 + % gunzip -c Time-HiRes-1.57.tar.gz | tar xvf - + % cd Time-HiRes-1.57 % perl Makefile.PL % make % make test Modified: trunk/orca/configure.in ============================================================================== --- trunk/orca/configure.in (original) +++ trunk/orca/configure.in Fri Apr 9 08:18:39 2004 @@ -41,8 +41,8 @@ RRDTOOL_VER=1.000461 STORABLE_DIR=Storable-2.12 STORABLE_VER=2.12 -TIME_HIRES_DIR=Time-HiRes-1.55 -TIME_HIRES_VER=1.55 +TIME_HIRES_DIR=Time-HiRes-1.57 +TIME_HIRES_VER=1.57 AC_SUBST(COMPRESS_ZLIB_DIR) AC_SUBST(DATA_DUMPER_DIR) Modified: trunk/orca/packages/Time-HiRes-1.57/Changes ============================================================================== --- trunk/orca/packages/Time-HiRes-1.55/Changes (original) +++ trunk/orca/packages/Time-HiRes-1.57/Changes Fri Apr 9 08:18:39 2004 @@ -1,5 +1,16 @@ Revision history for Perl extension Time::HiRes. +1.57 + - Window/Cygwin: if the performance counter drifts by more than + two seconds from the system clock (due to ntp adjustments, + for example), recalibrate our internal counter: from Jan Dubois, + based on [cpan #5933] by Jerry D. Hedden. + +1.56 + - Give a clearer message if the tests timeout (perl change #22253) + - Don't use /tmp or its moral equivalents (perl bug #15036, + perl change #22258) + 1.55 - Windows: ming32 patch from Mike Pomraning (use Perl's Const64() instead of VC-specific i64 suffix) Modified: trunk/orca/packages/Time-HiRes-1.57/HiRes.pm ============================================================================== --- trunk/orca/packages/Time-HiRes-1.55/HiRes.pm (original) +++ trunk/orca/packages/Time-HiRes-1.57/HiRes.pm Fri Apr 9 08:18:39 2004 @@ -15,7 +15,7 @@ d_usleep d_ualarm d_gettimeofday d_getitimer d_setitimer d_nanosleep); -$VERSION = '1.55'; +$VERSION = '1.57'; $XS_VERSION = $VERSION; $VERSION = eval $VERSION; Modified: trunk/orca/packages/Time-HiRes-1.57/HiRes.xs ============================================================================== --- trunk/orca/packages/Time-HiRes-1.55/HiRes.xs (original) +++ trunk/orca/packages/Time-HiRes-1.57/HiRes.xs Fri Apr 9 08:18:39 2004 @@ -181,6 +181,12 @@ #undef gettimeofday #define gettimeofday(tp, not_used) _gettimeofday(aTHX_ tp, not_used) +/* If the performance counter delta drifts more than 2 seconds from the + * system time then we recalibrate to system time. This means we may + * move *backwards* in time! */ + +#define MAX_DIFF Const64(20000000) + static int _gettimeofday(pTHX_ struct timeval *tp, void *not_used) { @@ -190,11 +196,19 @@ FT_t ft; if (MY_CXT.run_count++) { + __int64 diff; + FT_t filtim; + GetSystemTimeAsFileTime(&filtim.ft_val); QueryPerformanceCounter((LARGE_INTEGER*)&ticks); ticks -= MY_CXT.base_ticks; ft.ft_i64 = MY_CXT.base_systime_as_filetime.ft_i64 + Const64(10000000) * (ticks / MY_CXT.tick_frequency) +(Const64(10000000) * (ticks % MY_CXT.tick_frequency)) / MY_CXT.tick_frequency; + diff = ft.ft_i64 - MY_CXT.base_systime_as_filetime.ft_i64; + if (diff < -MAX_DIFF || diff > MAX_DIFF) { + MY_CXT.base_ticks = ticks; + ft.ft_i64 = filtim.ft_i64; + } } else { QueryPerformanceFrequency((LARGE_INTEGER*)&MY_CXT.tick_frequency); Modified: trunk/orca/packages/Time-HiRes-1.57/META.yml ============================================================================== --- trunk/orca/packages/Time-HiRes-1.55/META.yml (original) +++ trunk/orca/packages/Time-HiRes-1.57/META.yml Fri Apr 9 08:18:39 2004 @@ -1,7 +1,7 @@ # http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: Time-HiRes -version: 1.55 +version: 1.57 version_from: HiRes.pm installdirs: perl requires: Modified: trunk/orca/packages/Time-HiRes-1.57/Makefile.PL ============================================================================== --- trunk/orca/packages/Time-HiRes-1.55/Makefile.PL (original) +++ trunk/orca/packages/Time-HiRes-1.57/Makefile.PL Fri Apr 9 08:18:39 2004 @@ -71,19 +71,11 @@ # without changing it, and then I'd always forget to change it before a # release. Sorry, Edward :) -sub TMPDIR { - my $TMPDIR = - (grep(defined $_ && -d $_ && -w _, - ((defined $ENV{'TMPDIR'} ? $ENV{'TMPDIR'} : undef), - qw(/var/tmp /usr/tmp /tmp c:/temp))))[0]; - $TMPDIR || die "Cannot find writable temporary directory.\n"; -} - sub try_compile_and_link { my ($c, %args) = @_; my ($ok) = 0; - my ($tmp) = (($^O eq 'VMS') ? "sys\$scratch:tmp$$" : TMPDIR() . '/' . "tmp$$"); + my ($tmp) = "tmp$$"; local(*TMPC); my $obj_ext = $Config{obj_ext} || ".o"; @@ -388,7 +380,7 @@ 'SUFFIX' => 'gz', }, clean => { FILES => "xdefine" }, - realclean => {FILES=> 'const-c.inc const-xs.inc'}, + realclean => { FILES=> 'const-c.inc const-xs.inc' }, ); if ($ENV{PERL_CORE}) { @@ -453,7 +445,8 @@ print < Author: blair Date: Sat Apr 10 17:00:17 2004 New Revision: 302 Added: trunk/orca/packages/Time-HiRes-1.59/ - copied from r301, trunk/orca/packages/Time-HiRes-1.57/ Removed: trunk/orca/packages/Time-HiRes-1.57/ Modified: trunk/orca/INSTALL trunk/orca/configure.in trunk/orca/packages/Time-HiRes-1.59/Changes trunk/orca/packages/Time-HiRes-1.59/HiRes.pm trunk/orca/packages/Time-HiRes-1.59/HiRes.xs trunk/orca/packages/Time-HiRes-1.59/META.yml Log: Upgrade Time::HiRes from 1.57 to 1.59. * INSTALL (Determine which Perl modules need compiling and installing): Update all references to Time::HiRes's version number from 1.57 to 1.59. * configure.in: Bump Time::HiRes's version number to 1.59. * packages/Time-HiRes-1.59: Renamed from packages/Time-HiRes-1.57. Directory contents updated from Time-HiRes-1.59.tar.gz. Modified: trunk/orca/INSTALL ============================================================================== --- trunk/orca/INSTALL (original) +++ trunk/orca/INSTALL Sat Apr 10 17:00:17 2004 @@ -177,7 +177,7 @@ Math::IntervalSearch >= 1.05 >= 1.05 1.05 RRDs >= 1.000461 >= 1.0.46 1.0.46 Storable >= 2.12 >= 2.12 2.12 - Time::HiRes Not required by Orca 1.57 + Time::HiRes Not required by Orca 1.59 All seven of these modules are included with the Orca distribution in the packages directory. When you configure Orca in step 3), @@ -278,10 +278,10 @@ Time::HiRes - http://www.perl.com/CPAN/authors/id/J/JH/JHI/Time-HiRes-1.57.tar.gz + http://www.perl.com/CPAN/authors/id/J/JH/JHI/Time-HiRes-1.59.tar.gz - % gunzip -c Time-HiRes-1.57.tar.gz | tar xvf - - % cd Time-HiRes-1.57 + % gunzip -c Time-HiRes-1.59.tar.gz | tar xvf - + % cd Time-HiRes-1.59 % perl Makefile.PL % make % make test Modified: trunk/orca/configure.in ============================================================================== --- trunk/orca/configure.in (original) +++ trunk/orca/configure.in Sat Apr 10 17:00:17 2004 @@ -41,8 +41,8 @@ RRDTOOL_VER=1.000461 STORABLE_DIR=Storable-2.12 STORABLE_VER=2.12 -TIME_HIRES_DIR=Time-HiRes-1.57 -TIME_HIRES_VER=1.57 +TIME_HIRES_DIR=Time-HiRes-1.59 +TIME_HIRES_VER=1.59 AC_SUBST(COMPRESS_ZLIB_DIR) AC_SUBST(DATA_DUMPER_DIR) Modified: trunk/orca/packages/Time-HiRes-1.59/Changes ============================================================================== --- trunk/orca/packages/Time-HiRes-1.57/Changes (original) +++ trunk/orca/packages/Time-HiRes-1.59/Changes Sat Apr 10 17:00:17 2004 @@ -1,8 +1,17 @@ Revision history for Perl extension Time::HiRes. +1.59 + - Change the Win32 recalibration limit to 0.5 seconds and tweak + the documentation to blather less about the gory details of the + Win32 implementation and more about the complications in general + of meddling with the system clock. + +1.58 + - Document the 1.57 change better. + 1.57 - - Window/Cygwin: if the performance counter drifts by more than - two seconds from the system clock (due to ntp adjustments, + - Win32/Cygwin/MinGW: if the performance counter drifts by more + than two seconds from the system clock (due to ntp adjustments, for example), recalibrate our internal counter: from Jan Dubois, based on [cpan #5933] by Jerry D. Hedden. Modified: trunk/orca/packages/Time-HiRes-1.59/HiRes.pm ============================================================================== --- trunk/orca/packages/Time-HiRes-1.57/HiRes.pm (original) +++ trunk/orca/packages/Time-HiRes-1.59/HiRes.pm Sat Apr 10 17:00:17 2004 @@ -15,7 +15,7 @@ d_usleep d_ualarm d_gettimeofday d_getitimer d_setitimer d_nanosleep); -$VERSION = '1.57'; +$VERSION = '1.59'; $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -329,8 +329,16 @@ =head1 CAVEATS Notice that the core C maybe rounding rather than truncating. -What this means is that the core C may be reporting the time as one second -later than C and C. +What this means is that the core C may be reporting the time +as one second later than C and C. + +Adjusting the system clock (either manually or by services like ntp) +may cause problems, especially for long running programs that assume +a monotonously increasing time (note that all platforms do not adjust +time as gracefully as UNIX ntp does). For example in Win32 (and derived +platforms like Cygwin and MinGW) the Time::HiRes::time() may temporarily +drift off from the system clock (and the original time()) by up to 0.5 +seconds. Time::HiRes will notice this eventually and recalibrate. =head1 AUTHORS Modified: trunk/orca/packages/Time-HiRes-1.59/HiRes.xs ============================================================================== --- trunk/orca/packages/Time-HiRes-1.57/HiRes.xs (original) +++ trunk/orca/packages/Time-HiRes-1.59/HiRes.xs Sat Apr 10 17:00:17 2004 @@ -181,11 +181,11 @@ #undef gettimeofday #define gettimeofday(tp, not_used) _gettimeofday(aTHX_ tp, not_used) -/* If the performance counter delta drifts more than 2 seconds from the - * system time then we recalibrate to system time. This means we may +/* If the performance counter delta drifts more than 0.5 seconds from the + * system time then we recalibrate to the system time. This means we may * move *backwards* in time! */ -#define MAX_DIFF Const64(20000000) +#define MAX_DIFF Const64(5000000) static int _gettimeofday(pTHX_ struct timeval *tp, void *not_used) Modified: trunk/orca/packages/Time-HiRes-1.59/META.yml ============================================================================== --- trunk/orca/packages/Time-HiRes-1.57/META.yml (original) +++ trunk/orca/packages/Time-HiRes-1.59/META.yml Sat Apr 10 17:00:17 2004 @@ -1,7 +1,7 @@ # http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: Time-HiRes -version: 1.57 +version: 1.59 version_from: HiRes.pm installdirs: perl requires: From blair at orcaware.com Sun Apr 18 18:19:39 2004 From: blair at orcaware.com (Blair Zajac) Date: Sun, 18 Apr 2004 18:19:39 -0700 Subject: [Orca-checkins] r304 - trunk/orca/orca Message-ID: <200404190119.i3J1JdaW016058@orcaware.com> Author: blair Date: Sun Apr 18 18:19:18 2004 New Revision: 304 Modified: trunk/orca/orca/orca.pl.in Log: * orca/orca.pl.in (MAILING LISTS): For all four mailing lists, the sections that lists the home page URL, www and email subscription methods and the archive URL are longer than 80 characters, so reformat them so they fit in an 80 character wide terminal. Modified: trunk/orca/orca/orca.pl.in ============================================================================== --- trunk/orca/orca/orca.pl.in (original) +++ trunk/orca/orca/orca.pl.in Sun Apr 18 18:19:18 2004 @@ -1274,11 +1274,15 @@ moderated mailing list for announcing stable releases of Orca and affiliated data measurement tools used with Orca. - Home http://www.orcaware.com/mailman/listinfo/orca-announce - Subscribe via web http://www.orcaware.com/mailman/listinfo/orca-announce - Subscribe via email orca-announce-request at orcaware.com - with subject "subscribe" - Archive http://www.orcaware.com/pipermail/orca-announce/ + Home Page + http://www.orcaware.com/mailman/listinfo/orca-announce + Subscribe via web + http://www.orcaware.com/mailman/listinfo/orca-announce + Subscribe via email + orca-announce-request at orcaware.com + with subject "subscribe" + Archive + http://www.orcaware.com/pipermail/orca-announce/ B @@ -1287,22 +1291,30 @@ necessary Perl modules, installing and configuring Orca belong here. - Home http://www.orcaware.com/mailman/listinfo/orca-users - Subscribe via web http://www.orcaware.com/mailman/listinfo/orca-users - Subscribe via email orca-users-request at orcaware.com - with subject "subscribe" - Archive http://www.orcaware.com/pipermail/orca-users/ + Home Page + http://www.orcaware.com/mailman/listinfo/orca-users + Subscribe via web + http://www.orcaware.com/mailman/listinfo/orca-users + Subscribe via email + orca-users-request at orcaware.com + with subject "subscribe" + Archive + http://www.orcaware.com/pipermail/orca-users/ B The orca-dev at orcaware.com mailing list is for Orca developers who develop Orca or its affiliated data gathering tools. - Home http://www.orcaware.com/mailman/listinfo/orca-dev - Subscribe via web http://www.orcaware.com/mailman/listinfo/orca-dev - Subscribe via email orca-dev-request at orcaware.com - with subject "subscribe" - Archive http://www.orcaware.com/pipermail/orca-dev/ + Home Page + http://www.orcaware.com/mailman/listinfo/orca-dev + Subscribe via web + http://www.orcaware.com/mailman/listinfo/orca-dev + Subscribe via email + orca-dev-request at orcaware.com + with subject "subscribe" + Archive + http://www.orcaware.com/pipermail/orca-dev/ B @@ -1314,11 +1326,15 @@ intend to follow the Subversion checkins, you should also join the orca-dev at orcaware.com mailing list for discussions. - Home http://www.orcaware.com/mailman/listinfo/orca-checkins - Subscribe via web http://www.orcaware.com/mailman/listinfo/orca-checkins - Subscribe via email orca-checkins-request at orcaware.com - with subject "subscribe" - Archive http://www.orcaware.com/pipermail/orca-checkins/ + Home Page + http://www.orcaware.com/mailman/listinfo/orca-checkins + Subscribe via web + http://www.orcaware.com/mailman/listinfo/orca-checkins + Subscribe via email + orca-checkins-request at orcaware.com + with subject "subscribe" + Archive + http://www.orcaware.com/pipermail/orca-checkins/ =head1 PLOT PREFIXES From blair at orcaware.com Sun Apr 18 18:33:34 2004 From: blair at orcaware.com (Blair Zajac) Date: Sun, 18 Apr 2004 18:33:34 -0700 Subject: [Orca-checkins] r305 - trunk/orca/lib/Orca Message-ID: <200404190133.i3J1XY0Z016648@orcaware.com> Author: blair Date: Sun Apr 18 18:33:17 2004 New Revision: 305 Modified: trunk/orca/lib/Orca/SourceFile.pm Log: * lib/Orca/SourceFile.pm (add_plots): Minor optimization. Use a previously calculated array length. Modified: trunk/orca/lib/Orca/SourceFile.pm ============================================================================== --- trunk/orca/lib/Orca/SourceFile.pm (original) +++ trunk/orca/lib/Orca/SourceFile.pm Sun Apr 18 18:33:17 2004 @@ -349,7 +349,7 @@ my $number_datas = @{$plot->{data}}; my $number_elements = @{$plot->{data}[0]}; my $regexp_element_index = -1; - for (my $j=0; $j<@{$plot->{data}[0]}; ++$j) { + for (my $j=0; $j<$number_elements; ++$j) { if ($plot->{data}[0][$j] =~ m:\(.+\):) { $regexp_element_index = $j; last;