BB Unix Network Monitor - Message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: {bb} Advanced process monitoring?





Gerry,

I can assume you run this as an ext script on each local machine?
Could not MACHINE= be set to "hostname" instead of a hard addr to make it more
portable?

Frank





"Brown, Gerry L." <Gerry_Brown@bis.inrg.com> on 10/06/99 09:25:40 AM

Please respond to bb@taex001.tamu.edu

To:   "'bb@taex001.tamu.edu'" <bb@taex001.tamu.edu>
cc:    (bcc: Franklin Petersen/Support/IS/CrownNotes)

Subject:  RE: {bb} Advanced process monitoring?




this is the script I have in place to check for "hogs" (anything over 20%
CPU) also the comsrv process is killed automatically if it goes over the
threshold....It is an inittab respawn.

working on the memory "hogs" script......



#!/bin/sh
#
#  Script to put output of hogs to BigBrother
#
#
###########################################################################


TOP="20.0"
MACHINE="www,shopems,com"
ps -aefd -F
pid=Process,pcpu=CPU_Use,time=CPU_Time,vsz=Memory,runame=User,args=Command |
sort -r +1 | cut -c -130| head -20 > $BBHOME/hogs.dat
LINE=`cat $BBHOME/hogs.dat`
COLOR="green"

CLINE=`cat $BBHOME/hogs.dat | tail -20 | head -1`
set $CLINE
USE=$2
if (( $USE > $TOP ))
then
  COLOR="red"
  PLINE="Hogs over 20 percent"
#  $BB $BBPAGE "page $MACHINE.hogs `date` $PLINE"
else
  COLOR="green"
fi

grep comsrv $BBHOME/hogs.dat |
while read line
do
  set $line
  PROC=$1
  USE=$2
  if (( $USE > $TOP ))
  then
    kill -9 $PROC
  fi
done
$BB $BBDISP "status $MACHINE.hogs $COLOR `date` $LINE"

-----Original Message-----
From: Douwe Dijkstra [mailto:douwe@i-pay.com]
Sent: Wednesday, October 06, 1999 7:17 PM
To: bb
Subject: {bb} Advanced process monitoring?


Hi there!

The standard 'processes that must exist' feature is a little too simple
for
my usage.

Did anybody write an extension or a modified big brother to add the
following functionality?

- Not only check for a process name, but also check for the owner
  (I want all 6 of the 'java' virtual machines to run)
- Check for cpu usage of the process (detect runaway processes)
- Check for memory usage of the process (memory leaks)

Douwe Dijkstra
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Please send mail for the mailing list to: bb@taex001.tamu.edu
  To [un]subscribe to this list, send e-mail to majordomo@taex001.tamu.edu
     with [un]subscribe bb in the BODY of the message.
  Please contact the mailing-list-owner as: bb-owner@taex001.tamu.edu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Please send mail for the mailing list to: bb@taex001.tamu.edu
  To [un]subscribe to this list, send e-mail to majordomo@taex001.tamu.edu
     with [un]subscribe bb in the BODY of the message.
  Please contact the mailing-list-owner as: bb-owner@taex001.tamu.edu






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Please send mail for the mailing list to: bb@taex001.tamu.edu
  To [un]subscribe to this list, send e-mail to majordomo@taex001.tamu.edu
     with [un]subscribe bb in the BODY of the message.
  Please contact the mailing-list-owner as: bb-owner@taex001.tamu.edu


Home | Main Index | Thread Index