[geeks] Is this really the way to set up system accounting on Solaris 10?
Sandwich Maker
adh at an.bradford.ma.us
Fri Mar 5 10:35:08 CST 2010
" From: Patrick Giagnocavo <patrick at zill.net>
"
" Background: all I want is to collect the info for use by "sar", so that
" I can look over the last 24 hours or more of data.
i also found that - at least on s8 - sar only keeps the last week or
so, instead of a full month.
does s10 still have 'sag' [sar grapher]? [does it still have
toolwait?] if so, you might want my little 'xsag':
[btw it's the only use i've ever seen for xterm tek mode]
#!/usr/bin/ksh -p
# xsag - graph sar data on screen
# 20041001 adh at an.bradford.ma.us
[ -n "$1" ] &&
{
typeset -Z2 DAY=$(($(date +%d) - $1))
(( DAY < 1 )) &&
{
for LASTDAY in 31 30 29 28
do
[ -f /var/adm/sa/sa$LASTDAY ] &&
{
#DAY=$((LASTDAY+DAY))
DAY=$LASTDAY
break
}
done
}
SAGFILE="-f /var/adm/sa/sa${DAY}"
}
cd /tmp
at now <<-EOF-
toolwait xterm -t -n "SAG day $DAY" -T "System Activity Graph ${DAY:+- day $DAY }" -e sh -c "sag -T tek -s 00:00 -e 24:00 $SAGFILE; PS1=''; export PS1; biff n 2>`tty`; exec nice -19 sh -n"
EOF
________________________________________________________________________
Andrew Hay the genius nature
internet rambler is to see what all have seen
adh at an.bradford.ma.us and think what none thought
More information about the geeks
mailing list