Operating System - HP-UX
1833046 Members
2602 Online
110049 Solutions
New Discussion

Script for sending email about my server heath daily

 
UVA
Regular Advisor

Script for sending email about my server heath daily

Hi,


I needs to create a script in my hp-ux servers which can e-mail me daily about my servers diskspace, health etc.. pls give me some idea.


thanks
7 REPLIES 7
Torsten.
Acclaimed Contributor

Re: Script for sending email about my server heath daily

How about this suggestion:

You will receive an email is something wrong with your system (hardware problem, disk is getting full, etc.)?

EMS already does it.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
UVA
Regular Advisor

Re: Script for sending email about my server heath daily

Hi,

I dont want to use any special products, i just wants to get mail mainly about my server
diskspace. instead of logging in the system
and do the bdf command. is it is possible...
Torsten.
Acclaimed Contributor

Re: Script for sending email about my server heath daily

Of course it is possible ... put everything you want in a script, time this script with cron and mail the result.


Regarding special tools:

do a

man ems

(it is always there)

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
UVA
Regular Advisor

Re: Script for sending email about my server heath daily

Hi,

i have a script which showing and excuting abt my diskspce as per the time interwal, but
my problem is how to send this as a email to my email account
ex:- abc@mymail.com
Torsten.
Acclaimed Contributor

Re: Script for sending email about my server heath daily

What is your question now?

Do you want to know how to monitor the system health or how to send an email?

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
UVA
Regular Advisor

Re: Script for sending email about my server heath daily

Hi,

Sorry for the confusion.

I just wants to know how to send a mail with attachment to my email address.
Arturo Galbiati
Esteemed Contributor

Re: Script for sending email about my server heath daily

Hi,
I use this script:

cat sx
SENDMAIL=/usr/sbin/sendmail
UUENCODE=/usr/bin/uuencode
USER_LIST="john.doe"
DOMAIN=hotmail.com
LOG_FILE=seek_string.log
#
for USER in $USER_LIST
#
do
#
echo "Subject: Output Log $0 \n` cat $LOG_FILE | $UUENCODE $LOG_FILE`" | $SENDMAIL $USER@$DOMAIN
#
done

HTH,
Art