#!/bin/ksh -p # COPYRIGHT: Copyright (c) 2008 Stefan Parvu. # CDDL HEADER START # The contents of this file are subject to the terms of the # Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # You can obtain a copy of the license at Docs/cddl1.txt # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # CDDL HEADER END # # VERSION: 0.60 # # HISTORY # 2007-10-16 Stefan Parvu Initial Author # ######### # # MAIN BODY # # ######### # # Source Global SDR Settings PWD=$(dirname $0) . ${PWD}/setenv if [[ ${OS_NAME} != "SunOS" ]] then print "Error: cannot run on this OS: $(uname -s)" print "This collector requires Solaris 10 x86, sparc" exit 1 fi if (( $# < 1 || $# > 1 )) then print "Usage: ${0##*/} secs" exit 1 fi while true do print "\n$(date +"%Y-%m-%d:%H:%M:%S") - $(perl -e 'print time();')" ${PRSTAT_BIN} -cZ -n10,20 1 1 | \ ${PERL_BIN} -ne ' while(<>) { print if (/ZONEID/ .. /Total/); }' print "" for z in $(${ZONEADM_BIN} list) do print "Zone: $z" ${PRSTAT_BIN} -ac -n 25,10 -z $z 1 1 print "" done sleep $1 done