Blogs Classifieds Downloads FlashChat Gallery Googlemap Invite Friends Links Projects Reviews Wiki
 


Welcome to the pSeries Tech Forums, our free peer-based support site for administrators, engineers and architects working with IBM pSeries servers and software.

You are currently viewing our site as a guest which gives you limited access to view most discussions, articles, tutorials and access our other free features. By joining our community you will be able to collaborate with administrators, engineers and architects charged with designing, delivering or maintaining IBM pSeries server environments.

Founded by a recognized IBM pSeries consultant and IBM Redbook author, pSeries Tech Forums was developed with the single mission of bringing IBM pSeries professionals together into a single self-help community.

Registration is fast, simple and absolutely free to all IT professionals with responsibility for or interest in IBM pSeries servers. We invite you to join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

Our Sponsors
Want to advertise?  


Reply
 
LinkBack Thread Tools
  #1  
Old October 24th, 2007
acascianelli's Avatar
acascianelli Offline
Member
 
Join Date: April 2007
Posts: 30
Error logging and notification

I want to setup something on an pseries machine running AIX5.3 that will automatically email me when a new entry is added to the error report. Is there any simple way to do this?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2  
Old October 25th, 2007
Frans's Avatar
Frans Offline
Member
 
Join Date: November 2006
Posts: 51
Re: Error logging and notification

This is actually a big subject and I know I can just give you scripts to do this but you need to think about this and what you want out of this


Email Scripts example
Scripts can be created to E-mail you as problems come in but you may end up with a lot of email when there is a big problem causing your mailbox to fail

#!/bin/ksh
################################################## ##########################
# Errort message mail script
RUNTIME=$(date +%d%m%Y)
################################################## ##########################
# User setup
User1=”email@comp.contry”
User2=”email@comp.contry”
################################################## ##########################
#DATE setup
dayT=`date +%m%d`
TZ=+24
dayY=`date +%m%d`
################################################## ###########################
# Go to all systems and check for errors You can use dsh , rsh , or ssh

for i in `system.list nawk '{print $1}'`
do
echo " $i ##\c" 2>&1 >> err_send.$$
echo " `grep $i /etc/hosts|awk '{print$2}'`" 2>&1 >> err_send.$$
rsh $i uptime 2>&1 >> err_send.$$
rsh $i errpt |grep "[[:space:]]" |egrep "$dayT|$dayY" 2>&1 >> err_send.$$
echo " Disk space Problems " 2>&1 >> err_send.$$
rsh $i "df -k | grep 100%" 2>&1 >> err_send.$$
echo " " 2>&1 >> err_send.$$
done
################################################## ##########################
# Send mail to users

/usr/bin/mail -s "Error report " "${user1} ${user2}" < err_send.$$


Manual process can be used

I have created a menu system scripts that access all my systems and report errors on the systems from one single point (normally NIM )
I created a menu system that can do tasks as well as list all errors on the systems


Monitoring tools
Monitoring tools like Tivoli Monitor can be used in conjunction with syslog by sending error log messages to Syslog it monitors all messages for you to a central console.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Glad to help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old October 25th, 2007
acascianelli's Avatar
acascianelli Offline
Member
 
Join Date: April 2007
Posts: 30
Re: Error logging and notification

How do you use that script, as a cron task?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old October 25th, 2007
Frans's Avatar
Frans Offline
Member
 
Join Date: November 2006
Posts: 51
Re: Error logging and notification

I don’t use the Email script any more I use menu system that looks at all the system because there is now to many Lpars and the email is a problem

The script use to run from cron once a day to collect any problems in the last 23 hours. on all systems

You can change the format of the scripts to run more frequently but then need to adjust the way you look at time.


Using this format in your scripts
errpt -s/-e mmddhhmmyy ( month , day , hour , min and year )


Run this first
date +%m%d%H%M%y > /tmp/date_old


then make this sort of script and add to cron

StartDate =`cat /tmp/date_old`
If [ “${StartDate}” = ““ ]
then
echo “ this is first run “
date +%m%d%H%M%y > /tmp/date_old
errpt –a |more
else
errpt -a -s $StartDate > yourfile
fi

use the rest of my scripts to mail
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Glad to help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

These are the 100 most searched terms
Search Cloud
0042-001 0042-001 nim 0513-001 the system resource controller daemon is not active 0513-001 the system resource controller daemon is not active. 0514-061 0514-061 cannot find a child device 0514-061 cannot find a child device. 0516-787 0516-787 extendlv 0516-787 extendlv: maximum allocation for logical volume 110000ac aa00e1f3 aio aix aix aio aix freeware aixif_arp_dup_addr b150f22a b181f22a b181fb53 ba010004 c1001020 d133c002 dacnone dcb47997 fcp_array_err6 fget_config gnu tar aix gsclvmd gtar aix hi yall hmc root password hmc vmware hscl05db ibm p6 ibm p6 520 libpopt aix libpopt.a libpopt.a(libpopt.so.0) is needed by rsync-2.6.2-1 migratelv mksysb navisphere agent nim server pseries pseriestech rsync aix sc_disk_err4 scan_error_chrp vio server websm xhost file ... powered by Simple Search Cloud


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Powered by vbWiki Pro 1.3 RC5. Copyright ©2006-2007, NuHit, LLC

vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50