Re: temperature (OUTPUT)
- From: Dave Zarnoch <zarnocd@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 10 Aug 2006 07:29:46 -0400
Damir and Bill,
Thank you very much for the info!!!
When I run the script, I see a temperature of 37 degrees on hdisk0
U1.1-P1 22 U0.1-L1 28 U0.1-P1 37 U0.1-P1 34
When I run /usr/lpp/diagnostics/bin/uesensor -l
the value for hdisk0 is:
Sensor = thermal sensor
Status = Normal
Value = 37 Degrees Celsius
Physical Location Code = U0.1-P1
So I assume that 37 degrees is normal and the error messages
that are being generated are just informational?
Thanks!
Dave Zarnoch
Nationwide Provident
zarnocd@xxxxxxxxxxxxxxxxxxxxxxx
W 302-452-4197
C 302-462-8703
Damir Delija
<ddelija@xxxxxxxx To: aix-l@xxxxxxxxxxxxx
RCE.HR> cc:
Sent by: IBM AIX Subject: Re: temperature
Discussion List
<aix-l@Princeton.
EDU>
08/10/2006 01:04
AM
Please respond to
IBM AIX
Discussion List
On Wed, Aug 09, 2006 at 01:27:42PM -0700, Bill Verzal wrote:
Run /usr/lpp/diagnostics/bin/uesensor -lsensors.
If it is supported on your system, it will show you environmental
BV
you can start temp monitoring
to see what is going on
there is no uesensor class in RMC but
you can use my old script published in sysadmin magazine
#!/usr/bin/ksh
#############################################################
#Sri 20 Stu 2002 13:37:24
#PBZ HR
#temp monitoring script
#version 0.0.1-D
#
#Author: Damir Delija ddelija@xxxxxx
#############################################################
# FILE NAME: temperature
# FILE DESCRIPTION: crontab tester based on bb-scripts
#
# RETURN VALUE DESCRIPTION:
# 0 sucess
# 1 failure
#
# EXTERNAL PROCEDURES CALLED:
#
# OPERATIONS
#
# this is based on standard df-k monitors from various sources
# script just control if there is limit violation
#
# CONTROL
# there is no control
#
# USAGE add into crontab and configure parameters
#
# QUIRCS
# if machine is in LPAR mode this not works
#
############################################################
#Revison history
#0.0.1-D just working with usensors
############################################################
export PATH=/bin:/usr/local/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/sbin
BASEDIR=/rootop
CONFDIR=$BASEDIR
LOGDIR=$BASEDIR/logs
##########################################################
# testing and creating directories nesecarry
# for script operation
##########################################################
for d in $CONFDIR $LOGDIR
do
if test ! -d "$d"
then
mkdir -p $d || exit 1
fi
done
#############################################################
#work files
#############################################################
HOST=$(hostname)
#############################################################
#logs and event data
#in DF last df-k data is stored
#############################################################
DF=$LOGDIR/temp
#############################################################
#event, or two last messages cretaed
#############################################################
EV=$LOGDIR/event.temp
EVO=$LOGDIR/event.temp.old
#############################################################
#Notification info
#############################################################
#if LOGFILE exists message is automatically added to it
LOGFILE=$LOGDIR/$HOST.temp.log
#email where report is sent
DFADMIN=root
#logger syslog level to log message
SYSLOG="notice"
#to dump message on stdout
ECHO="echo"
#to send snmptrap -just for future use
SNMPTRAP=""
#BigBrother
BB="echo"
BBDISP=" ..."
######################################################
#sennsor control command on AIX
#f there is no capability exit
######################################################
SENS="/usr/lpp/diagnostics/bin/uesensor"
test -x $SENS || exit 2
######################################################
# MAXTEMP - value for alarm
######################################################
MAXTEMP=36
######################################################
#set the message and global action variable
#if ACTION is > 0 it means do action
######################################################
MESSAGE="$HOST :"
ACTION=0
MM="$MESSAGE"
#real data collection
$DF#snashot of the status ... just FS and data percentage,
################################################
#walk trough df and test conditions
#FS loop
################################################
$SENS -a| while read token index status val lcode
do
MM=$MM" $lcode $val"
if test "$token" -eq 3 -a "$val" -gt "$MAXTEMP"
then
ACTION=1
MESSAGE=$MESSAGE"\n $lcode $val"
fi
done
######################################################
# end of the tempread loop
######################################################
#patch for mandatory logging
logger "TEMPERATURE $MM"
echo "ENVSTATUS $MM"
######################################################
#store the latest event and one previous
######################################################
test -f "$EV" && mv "$EV" "$EVO"
touch "$EVO"
echo "$MESSAGE" > "$EV"
#EVENTS are same - no sending messages just to AVOID flodding
diff "$EV" "$EVO" > /dev/null 2>&1 && exit 0
#if loop because of posible case later ...
if [ "$ACTION" -gt 0 ]
then
######################################################
#notification
#if there is email adress send email
#if syslog do syslog
#if echo dump on the screen
######################################################
#remove \n form subjet line outlook problem ..
SUBJECT=$(echo "$MESSAGE"| sed 's/\\n/ /g')
if test -n "$SYSLOG"
then
logger -p"$SYSLOG" "TEMPERATURE $SUBJECT"
fi
if test -n "$LOGFILE"
then
{
date
echo "$MESSAGE"
echo "###############################"
} >> "$LOGFILE"
fi
#use printf to expand \n in message old trick ..
if test -n "$DFADMIN"
then
printf "$MESSAGE" ""| mail -s "TEMPERATURE OVER LIMIT $MAXTEMP C $SUBJECT"
"$DFADMIN"
fi
if test -n "$ECHO"
then
date
echo "$MESSAGE"
echo "###############################"
fi
fi
###################################################
#end of fi loop
###################################################
exit 0
# end temperature
- Follow-Ups:
- FTP /performance issue question
- From: Andrew . Townsend
- Re: temperature (OUTPUT)
- From: Bill Verzal
- Re: temperature (OUTPUT)
- From: Damir Delija
- FTP /performance issue question
- Prev by Date: Rejected postings (was: User auditing)
- Next by Date: Re: LSOF with AIX 5.3 ML04
- Previous by thread: Rejected postings (was: User auditing)
- Next by thread: Re: temperature (OUTPUT)
- Index(es):
Relevant Pages
|
|