The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Notification if server unreachable? Sepia UNIX for Dummies Questions & Answers 3 03-06-2008 01:29 AM
How to add email notification in scripts? redlotus72 UNIX for Dummies Questions & Answers 2 03-14-2005 04:19 AM
Why am I not recieving email notification? Kelam_Magnus Post Here to Contact Site Administrators and Moderators 6 09-03-2002 07:01 PM
Directory updation Notification? vjsony High Level Programming 6 07-23-2002 05:58 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-05-2008
Registered User
 

Join Date: Oct 2007
Posts: 236
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
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-05-2008
Registered User
 

Join Date: Feb 2008
Location: New Zealand
Posts: 42
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
Reply With Quote
  #3 (permalink)  
Old 05-07-2008
Registered User
 

Join Date: Oct 2007
Posts: 236
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
Reply With Quote
  #4 (permalink)  
Old 05-07-2008
Tornado's Avatar
Registered User
 

Join Date: Nov 2006
Location: Melbourne
Posts: 240
Quote:
Originally Posted by itik View Post
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
Reply With Quote
  #5 (permalink)  
Old 05-08-2008
Registered User
 

Join Date: Oct 2007
Posts: 236
Wow! What a solution?

Thanks you very much!
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:46 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0