From 86b61608809072250a401803f7595811c8bd70ba Mon Sep 17 00:00:00 2001 From: Stephen L Johnson Date: Tue, 23 Nov 1999 03:58:08 +0000 Subject: [PATCH] Initial revision --- config/spong.conf.solaris | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 config/spong.conf.solaris diff --git a/config/spong.conf.solaris b/config/spong.conf.solaris new file mode 100755 index 0000000..59814cb --- /dev/null +++ b/config/spong.conf.solaris @@ -0,0 +1,41 @@ +# --------------------------------------------------------------------------- +# OS Specific variables. A few external programs are used by spong-client, +# spong-network, and spong-message. Chances are these differ from OS to OS. +# A couple of things to watch for. +# +# $DF Your df command should output %used as the first column with a '%' +# $PS You really want you ps command to return sorted via CPU usage +# $PING Make sure your ping command only pings a finite number of times +# and since some ping command want args after the host, put the +# word HOST where you need the host to be in your ping command +# --------------------------------------------------------------------------- + +$DF = "/usr/ucb/df"; +$UPTIME = "/usr/bin/uptime"; +$PS = "/usr/bin/ps -ef"; +$GREP = "/usr/bin/grep"; +$PING = "/usr/sbin/ping -n HOST 1024 2"; +$TRACEROUTE = "/usr/bin/traceroute"; +$SENDMAIL = "/usr/lib/sendmail -t"; +$MAILQ = "/usr/lib/sendmail -bp"; + +undef $LSPS; + +# Routine to calculate swap space for Solaris +sub get_swap { + my ( $msg, $page, $avail, $used); + + open (FOO,"-|") or exec "/usr/sbin/swap -s"; + $msg = ; + $used = 0; $avail = 0; $page = 0; + if ( $msg =~ /\=\s(\d+)\D.*\s(\d+)/ ) { + ($used, $avail) = ($1,$2); + $page = int($used / ($avail+$used) * 100); + } else { $msg = "Unexpected output of swap -s command:\n" . $msg; } + close FOO; + + return ($msg, $page); +} + + +1; # I'm a file that gets included in perl code - leave this 1 here... -- 2.30.2