error notification and diagnose


 
Thread Tools Search this Thread
Operating Systems Solaris error notification and diagnose
# 1  
Old 05-05-2008
error notification and diagnose

Hi All,

How does Solaris 9/10 alert the server? Where do you get the error on the server?

Is there some kind of verifying of errors (like in AIX, CERTIFY resources or diagnose)?

Please let me know.

Thanks,
itik
# 2  
Old 05-06-2008
on solaris it is handled by syslogd

You are able to edit the /etc/syslog.conf and redirect the logs and even specify what level should be logged.

Here are the log levels:

1. emerg 2. alert 3. crit 4. err 5. warning 6. notice 7. info 8. debug

But you can redirect everything to a loghost. This way everything is centralized.

I hope this is what you asked for

cheers
gnom
# 3  
Old 05-07-2008
how do you configure this for email alert that will send to your email or pager?

how do you query for the current error on the log so that I could capture and send it to the email system?

Thanks in advance,
itik
# 4  
Old 05-08-2008
Quote:
Originally Posted by itik
how do you configure this for email alert that will send to your email or pager?

how do you query for the current error on the log so that I could capture and send it to the email system?

Thanks in advance,
itik
Write a script to look through /var/adm/messages which is where most errors go to.
You could use the comm command in your script

Here's a copy of one of my scripts to look at errors from a 3510 array.

Code:
#Minute (0-59),
#|      Hour (0-23),
#|      |       Day of the month (1-31),
#|      |       |       Month of the year (1-12),
#|      |       |       |       Day of the week (0-6 with 0=Sunday).
#|      |       |       |       |       Commands
#|      |       |       |       |       |
#------------------------------------------------------------------------------------------------------
#
# Script to monitor 3510 events
00      7,12,17 *       *       *       /ops/p_admin/utils/chk3510 > /dev/null 2>&1

Code:
#! /bin/sh
#
# Goran Cvetanoski
#
# chk3510
#
# This script will send an email if any 3510 events have occured since the
# last time it was run
#
# CHANGE LOG
# =========================================================================
# 20/2/2007 - Goran Base script created
#

LOG=/var/adm/3510-events-email
LOG1=/var/adm/3510-events
LOG2=/var/adm/3510-events-new

DEV=`sccli -l | awk '{print $1}'`

NOTIFY=unix.admin@xxxx.xxxx.com

DASHES="--------------------------------"

show()
{
        echo "$DASHES $1 $DASHES" >> $LOG
        echo "" >> $LOG
        shift
        eval "$@" >> $LOG
        echo "" >> $LOG
}

scriptargs()
{
        echo "Date:   `date`"
        echo System: `uname -a`
        echo Device: `sccli -l`
}

Footnote()
{
        echo "Other usefull information can be obtained via the sccli command run from `uname -n`."
        echo "To invoke the sccli interface, type sccli and hit return"
        echo ""
        echo "Once at the sccli> prompt valid commands are:"
        echo ""
        echo "  show battery-status [-u | --update]"
        echo "        display status of backup battery"
        echo "  show configuration [--xml | -x] [<filename>]"
        echo "        display the device's configuration or save to file"
        echo "  show disks"
        echo "        display info for array disks."
        echo "  show drive-parameters"
        echo "        display drive parameters"
        echo "  show enclosure-status"
        echo "        display the status of internal chassis components"
        echo "  show frus"
        echo "        display FRU-ID information"
        echo "  show logical-drives [<logical-drive-list>]"
        echo "        display logical drives"
        echo "  show lun-maps"
        echo "        display lun maps for host channels"
        echo "  show redundancy-mode"
        echo "        display redundancy status"
        echo "  show redundant-controller-configuration"
        echo "        display redundant controller configuration"
        echo ""
        echo "You can see the full list of available commands by typing help at the sccli> prompt"
        echo "To exit sccli and return to your shell prompt type quit"
}

SendMail()
{
        cat $LOG | mailx -s "$1" $NOTIFY
}

GetEvents()
{
        sccli $DEV show events > $1
}

cat /dev/null > $LOG
test ! -f $LOG1 && GetEvents $LOG1
GetEvents $LOG2

show "`uname -n` 3510 Status" scriptargs
show "Event Log" comm -13 $LOG1 $LOG2
show "Write policy" sccli $DEV show cache-parameters
show "Additional Information" Footnote

if [ "`comm -13 $LOG1 $LOG2`" != "" ]
        then
            SendMail "`uname -n` 3510 Events"
fi

mv $LOG2 $LOG1
exit 0

Tornado
# 5  
Old 05-08-2008
Wow! What a solution?

Thanks you very much!
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Email notification error on Solaris

Hi, I am getting error below when testing email. is there a way I can configure email on Solaris? SunOS -s 5.10 Generic_147440-04 sun4u sparc SUNW,SPARC-Enterprise echo "hello" | sendmail -v abcd WARNING: local host name (-s) is not qualified; see cf/README: WHO AM I? abcd... Connecting... (1 Reply)
Discussion started by: roshanbi
1 Replies

2. Web Development

Publish notification

hi All I use tomcat server to publish war file. How to send an notification to users via the application screen and it should dismiss once user clicks X mark. Any suggestions ? (1 Reply)
Discussion started by: anil529
1 Replies

3. Shell Programming and Scripting

Email Notification

Hi All, I need write a linux script which emails each record to the employee manager email-id which will be specified inside the file. Each employee can have a different manager too.. file contain 200 to 300 records Employee ID, Employee Name, Employee Email-ID, Manager, Manager... (4 Replies)
Discussion started by: tradingspecial
4 Replies

4. Shell Programming and Scripting

Shell script to diagnose the network

i have learnt a little bit of shell scripting but not alot. i want to write a script to diagnose the network using ping and another script to traceroute. how would i do this? (6 Replies)
Discussion started by: stefanere2k9
6 Replies

5. AIX

Diagnose high disk write IO

Hi, say for example if there is high disk write IO in one disk (detected from NMON), how to we identify what processes is writing on that particular disk? (3 Replies)
Discussion started by: ngaisteve1
3 Replies

6. UNIX for Advanced & Expert Users

Gurus needed to diagnose severe performance degradation

Hi everyone, newbie forum poster here. I'm an Oracle DBA and I require some guidance from the Unix gurus here about how to pinpoint where a problem is within a Solaris 9 system running on an 8 CPU Fujitsu server that acts as our Oracle database server. Our sysadmins are trying their best to... (13 Replies)
Discussion started by: DBA_guy
13 Replies

7. UNIX for Advanced & Expert Users

if up notification

Hello experts, I have a requirement of notifying my application everytime a network interface is brought up. My application supports Various Unix flavours e.g. RHEL, SLES, AIX, Solaris and Mac OS. I know that SLES supports /etc/sysconfig/network/if-up.d hook scripts that run once an interface is... (2 Replies)
Discussion started by: GajendraSharma
2 Replies

8. AIX

Automated Error Email Notification on AIX

Hello Folks, I would like to setup automated error email notifications for any hardware + software + Hacmp errors. How can I do it ? I have searched on the internet, i have found something like a script erronotifier or something like that... P.S. I don't want to use a third party... (7 Replies)
Discussion started by: filosophizer
7 Replies
Login or Register to Ask a Question