Sys Admin Report

2007-12-25 9:12:00

To all Sun-Managers,

I sent out a request for a sys admin report, provided

is a summary of what I received. I have not been able

to try all of these yet so I can't recommend any of them.

I will provide more once I try a few. I do appreciate all

the responses that I received.

Regards,

George

Watcher

ftp://ftp.unm.edu/pub/unix/Watcher.tar.Z

Big Brother

http://www.iti.qc.ca/users/sean/bb-dnld/index.html

Bruce Alan Wynn's monitoring tools

ftp://ftp.mfi.com/pub/sysadmin/1997/feb97.tar.Z

DiskHog

ftp://ftp.ssc.com/pub/lj/listings/issue44/2416.tgz.

Someone sent me the attached script "Sunconf.sh"

I was also told to try the following command:

"sar -A 5 5" which will give you the stats for the entire system.

and

Some one sent me the following Script:

----------------------------------------------------------------------

#!/bin/sh

#

# $Id: monitor,v 1.5 1997/12/16 17:18:53 vogelke Exp $

# $Source: /source/usr/local/cron/monitor/RCS/monitor,v $

#

# NAME:

# monitor

#

# SYNOPSIS:

# monitor [-v]

#

# DESCRIPTION:

# Keeps an eye on the current disk statistics and process table.

#

# OPTIONS:

# "-v" prints the version and exits.

#

# AUTHOR:

# Karl E. Vogel <vogelke@c17mis.wpafb.af.mil>

# Sumaria Systems, Inc.

PATH=/bin:/usr/sbin:/usr/ucb

export PATH

tag=`basename $0` # tag for the syslog entries.

# ============================= FUNCTIONS ==================================

#

# FUNCTION:

# logmsg

# die

#

# SYNOPSIS:

# logmsg string

# die string

#

# DESCRIPTION:

# "logmsg" prints a string to the system log.

#

# "die" prints a string to the system log and exits. The most

# common use for "die" is with a test:

# test -f /etc/passwd || die "cannot find passwd file"

#

logmsg () {

logger -t $tag "$*"

}

die () {

echo "$tag: ERROR -- $*" >& 2

exit 1

}

#

# FUNCTION:

# usage

#

# SYNOPSIS:

# usage [string]

#

# DESCRIPTION:

# "usage" prints an optional string plus part of the script comment

# header (if any) to stderr, and exits with return code 1.

#

usage () {

lines=`egrep -n '^# (NAME|AUTHOR)' $0 | cut -f1 -d:`

(

case "$#"

in

0) ;;

*) echo "usage error: $*"; echo ;;

esac

case "$lines"

in

"") ;;

                        *) set `echo $lines | sed -e 's/ /,/'`

                                sed -n ${1}p $0 | sed -e 's/^#//g' |

                                        egrep -v AUTHOR:

                                ;;

esac

) >& 2

exit 1

}

#

# FUNCTION:

# version

#

# DESCRIPTION:

# Prints the current version to stdout.

#

version () {

local_sedscr='s/RCSfile: //

s/.Date: //

s/,v . .Revision: / v/

s/\$//g'

local_revno='$RCSfile: monitor,v $ $Revision: 1.5 $'

local_revdate='$Date: 1997/12/16 17:18:53 $'

echo "$local_revno $local_revdate" | sed -e "$local_sedscr"

}

# ============================= MAIN PROGRAM ===============================

#

# Handle command line arguments.

#

set -- `getopt v $*`

case "$?"

in

0) ;;

*) usage "unrecognized option" ;;

esac

for i in $*

do

case $i

in

-v) version; exit 0 ;;

--) shift; break ;;

esac

done

#

# Once an hour, write the contents of the process table to a file.

# Start a new file every day, and clean out the directory to only

# hold the current day plus the last 6 days.

#

# Even though the case statement is based on the hour of the day,

# the script will perform correctly if it is run more often than

# once an hour.

#

umask 022

logmsg start

dir="/spool/adm/sa/monitor"

test -d "$dir" || die "$dir: no such directory"

file=`date "+$dir/%Y-%m-%d"`

hour=`date +%H`

case "$hour"

in

00) cd $dir

list=`ls | sort -r | tail +7`

list=`echo $list`

case "$list"

in

"") ;;

*) rm $list ;;

esac

list=`ls | sort -r | tail +2 | grep -v '.Z$'`

list=`echo $list`

case "$list"

in

"") ;;

*) compress $list ;;

esac

;;

*) ;;

esac

cd /

(

echo ===========================================================

date

uname -a

echo ' '

echo 'Output of who:'

who

echo ' '

/usr/local/gnu/df

echo ' '

ps -ef

) >> $file 2>&1

chown adm $file

chgrp bin $file

chmod 644 $file

exit 0




Comments

Got something to say?

You must be logged in to post a comment.