#!/bin/sh # # pmlogger admin script for WebMeter # # $Id: webmeter4.frm,v 1.4 1996/05/01 09:02:53 kenmcd Exp $ TRACE=false # make true to enable tracing MYTITLE="pmlogger Administration for Host `hostname`" # load common procedures . ./webmetercommon.cgi # get current settings # stolen from /usr/pcp/pmlogger/cron.pmcheck # _current() { _pmlogger_status } # restore sane defaults # _default() { : } # do default page set up # _home() { localhost="`hostname`" _preamble "$MYTITLE" cat <

The pmlogger utility and may be used to create historical archives of system and Web server performance for the local host and/or remote hosts.

These archives are most useful for retrospective performance analysis, problem diagnosis and capacity planning.

End-of-File if [ -s $tmp.status ] then cat < Current pmlogger setup on $localhost Archive for Hostpmlogger
StatusArchive Directory End-of-File nawk -F: <$tmp.status ' { printf "" printf "" printf "" $2 if ($1 == 0) printf "inactive" else printf "active" printf "" $5 print "" }' echo "" else cat <Currently $localhost is not setup to collect archives for any hosts.

End-of-File fi cat <

To activate a new pmlogger instance on $localhost, enter the name of the host from which performance metrics are to be collected then


Display the pmlogger man page. End-of-File _postscript } # mainline # _form # do our own _decode_params # for arg in $PARAMS do arg=`echo "$arg" | _fix_url` _trace arg "$arg" case "$arg" in # recognized variable assignments # host-*) host=`echo "$arg" | sed -e 's/host-//' -e 's/=.*//'` ;; new=*) eval $arg newhost=$new ;; action=*) eval $arg ;; # debug # debug=*) eval $arg set $debug ;; # bogus? # *) _yyerror "Unknown variable assignment: $arg" ;; esac done # check for errors and setup _yycheck [ "X$host" = X ] && host="$newhost" if [ "X$host" = X ] then _yywarn "You must specify a host to be archived, before selecting Add." fi SCRIPT_NAME=/webmeter5.cgi QUERY_STRING="host=$host&action=$action" export QUERY_STRING exec `pwd`/webmeter5.cgi