#!/bin/sh

#
# bbsys.solaris
#
# BIG BROTHER
# OPERATING SYSTEM DEPENDENT THINGS THAT ARE NEEDED
#
#####
#####  Modified by Paul A. Luzzi on 01-17-2001 to include any variables needed
#####    for the full extensions to be useful.
#####

#####
#####  Changed to Berkley version of PS for extended output
#####
## PS="/bin/ps -ef"			# SOLARIS, HPUX
PS="/usr/ucb/ps -axw"       
DF="/bin/df -kl"			# SOLARIS, SYSTEM V
DFUSE="^/dev|^swap"			# Scott Walters <scott@PacketPushers.com>
MSGFILE="/var/adm/messages"		# SYSTEM V TYPE MACHINES
PING="/usr/sbin/ping"                 	# From: Josh Wilmes <josh@sky.net>
PINGPAR1="-s"
PINGPAR2="56 1"				# No. of bytes and # of pings.

#####
#####  Commented out Berkley version and using ATT version
#####
## MAIL="/usr/ucb/mail -s"
MAIL="/usr/bin/mailx -s"
NSLOOKUP="/usr/sbin/nslookup"		# NEW IN 1.06C
EGREP=/usr/xpg4/bin/egrep
AWK=/usr/xpg4/bin/awk
LOCKPREFIX="/var/spool/locks/LCK.."	# from: <lchamber@fcpa.fujitsu.com>

#####
#####  Added these which I found to be missing from the definitions
#####
WC="/usr/bin/wc -l"
UPTIME="/usr/bin/uptime"
TAIL="/usr/bin/tail"
HEAD="/usr/bin/head"
TOUCH="/usr/bin/touch"
EXPR="/usr/bin/expr"

#####
#####  New section to handle all of the extension scripts
#####
NAWK="/usr/bin/nawk "
CUT="/usr/bin/cut"
PSRINFO="/usr/sbin/psrinfo"
MPSTAT="/usr/bin/mpstat"
SWAP="/usr/sbin/swap"
IOSTAT="/usr/bin/iostat"
VMSTAT="/usr/bin/vmstat"
SHOWMOUNT="/usr/sbin/showmount"
IFCONFIG="/sbin/ifconfig"
NETSTAT="/usr/bin/netstat"
YPWHICH="/usr/bin/ypwhich"
TOP="/usr/local/bin/top"
IPCS="/usr/bin/ipcs"
VXDISK="/usr/sbin/vxdisk"
VXDG="/usr/sbin/vxdg"
VXIOD="/usr/sbin/vxiod"
FORMAT="/usr/sbin/format"
UNAME="/usr/bin/uname"
PKGINFO="/usr/bin/pkginfo"
SULOG="/var/adm/sulog"
ADMDIR="/var/adm"
THIS_HOST=`$UNAME -n`
#####
#####  Now export all of them
#####
export NAWK CUT PSRINFO MPSTAT SWAP IOSTAT VMSTAT
export SHOWMOUNT IFCONFIG NETSTAT YPWHICH PKGINFO
export TOP IPCS VXDISK VXIOD UNAME VXDG FORMAT
export SULOG ADMDIR THIS_HOST

#####
#####  Copies of info from bbsys.sh
#####    These values override those, so these are important
#####    for this to work, the $BBHOME/bin/bb-local.sh must include EGREP in the 
#####    DFEXCLUDE check and not the plain GREP command
#####
DFSORT="4"                              # % COLUMN - 5
DFUSE="^/dev"                           # PATTERN FOR LINES TO INCLUDE
DFEXCLUDE="cdrom|dbfs|tmpora"
export DFSORT DFUSE DFEXCLUDE

#####
#####  Custom for dmp agent - needed for 1.5 and later of dmp, and vx*
#####
#####    Tune the DMP_DEV_LIST controller/disk numbers to whatever you want to exclude
#####    we need to exclude at a minimum, the gatekeepers and vcmdb devices.
#####
## DMP_DEV_LIST=`$VXDISK list | $AWK '{print $1}' | $EGREP -v "DEVICE|c[23]t0d0s2|c[23]t0d24[01]s2" `
DMP_DEV_LIST=`$VXDISK list | $AWK '{print $1}' | $EGREP -v "DEVICE" `
VX_DISK_LIST=` $VXDISK list | $AWK '{print $3,$1}' | $UNIQ | $EGREP -v "^-|DISK" | $AWK '{print $2}' `
export DMP_DEV_LIST VX_DISK_LIST

#####
#####  Custom for memory agent - needed for 1.0 and later of memory
#####
#####    Tuning not required for anything but binary locations
#####    The PRTMEM and MEMPS are from the Sun MEMTOOL package.  If its installed
#####      the prtmem command will be run.  If its not, then that section is skipped.
#####
SAR="/usr/sbin/sar"
SWAP="/usr/sbin/swap"
PRTMEM="/usr/bin/prtmem"
MEMPS="/usr/bin/memps"
export SAR SWAP PRTMEM MEMPS
