| 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? | |
![]() |
| | LinkBack | Thread Tools |
|
#2
| ||||
| ||||
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 |
|
#4
| ||||
| ||||
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 |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |