- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: email
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2002 10:19 PM
07-28-2002 10:19 PM
email
When ever my m/c down and rebooted because of panic or normal shutdown . i have get the email notice .. like shutdownlog ..
For this i have put entry in cron or someother way is
their?
Thankx
bye
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2002 10:28 PM
07-28-2002 10:28 PM
Re: email
The best way is to monitor your system remotely is from a different server. You could write a small script to do this.
If you wanted to find out information like this, you could place a script in the system startup area (/sbin/init.d) that e-mails the last line of the /etc/shutdownlog.
'tail -1 /etc/shutdownlog'
or
who -r
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2002 04:33 AM
07-30-2002 04:33 AM
Re: email
I've been wondering about this myself. I think it might be possible to put something in inittab to send an e-mail when the system goes to runlevel 3 (on ipl after starting networking) and in /sbin/rc3.d to send an e-mail before the system goes from runlevel 3 to runlevel 2.
I'm not sure of the correct syntax, however.
Maybe something like this?
#!/sbin/sh
# E-mail on system start/stop
case $1 in
'start_msg')
echo "Sending startup e-mail"
;;
'stop_msg')
echo "Sending stop e-mail"
;;
'start')
echo "System start: `hostname` `date`" | elm -s"system start" sysadmin@example.org
;;
'stop')
tail /var/adm/syslog/syslog.log | elm -s"System `hostname` shutdown at `date`" sysadmin@example.org
;;
*)
echo "usage: $0 {start|stop}"
;;
esac
exit
Would that work, and if so, how would you set it up to run before networking shut down?
Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2002 05:55 AM
07-30-2002 05:55 AM
Re: email
One way to know if the server goes down, is to monitor it from another server. i.e. every 15 minutes you can ping the server from somewhere else, and have that machine contact you if the first server does not respond to a ping.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2002 05:57 AM
07-30-2002 05:57 AM
Re: email
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2002 06:36 AM
07-30-2002 06:36 AM
Re: email
The best way is to monitor it from other m/c and setting the mail on other m/c to send a mail to you in case it goes down.