01-15-2004
Script to e-mail me when a command is done
I am using aix 5.1
I am trying to put a line in a command script to e-mail myself when a command is done.
I am not sure what that is . Could somebody help me ?
Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i wanted to write a shell script that can automatically read unread mails and copy each one into a different file. I was trying to use the MAIL command to do it, but this command requires user input inbetween, I was wondering how that could be achieved in a shell script.
Can sumone please suggest... (0 Replies)
Discussion started by: garric
0 Replies
2. Shell Programming and Scripting
Hi..
How can i use mailx,mail command in Shell Script.
Suppose i gave a condition that x value is above 25 send a mail alert to abc@rediffmail.com.
How can i do this?
Regards
Sollin (16 Replies)
Discussion started by: sollin
16 Replies
3. AIX
I apoligize for the cross-post but I'm not getting much in the way of help in the dummies forum:
I'm trying to script sending an e-mail message on an AIX 5.x server with the following requirements:
1. command line switch to specify file name containing message body in HTML format
2. command... (3 Replies)
Discussion started by: G-Man
3 Replies
4. Shell Programming and Scripting
Can someone please help me with this script, I'm trying to create system backup on AIX, for this I want to first mount the filesystem if it is not mounted, then create the backup and unmount the filesystem but I'm having problem while using the mail command to notify the status of filesystem... (9 Replies)
Discussion started by: mbak
9 Replies
5. Shell Programming and Scripting
Hi all,
Currently in shell script i am using the following command to send mail
echo "Certain assets are not loaded properly. PFA the result of the DataLoad" | mail -s "Weekly DataLoad - Failure Notification !!" $MAILINGLIST
I need to attach a file along with that. How should i handle this... (7 Replies)
Discussion started by: ananthi_ku
7 Replies
6. Shell Programming and Scripting
well, I have a script with this code inside:
nohup /usr/sbin/auditstream | /usr/sbin/auditselect -m -e "event== USER_Create || event== USER_Remove || event== USER_Change || event== GROUP_Create || event== GROUP_Remove || event== GROUP_Change || event== PASSWORD_Change " | /usr/sbin/auditpr -h... (4 Replies)
Discussion started by: iga3725
4 Replies
7. Shell Programming and Scripting
Hello
I am trying to send an email when a .KSH script is run on an AIX Machine.
This email will only include a subject line that is made up of variables from within the script, and is as follows:
CURRENT_DATE=`date +%Y%m%d`
TIME=`date`
ADMIN="myname@domain.com"
date
block ()
{
... (4 Replies)
Discussion started by: jimbojames
4 Replies
8. Shell Programming and Scripting
Hello all
I'm trying to write a script to send an email, so I can be nnotified when something is going wrong with my system.
I've tried many options with no luck:
mail -s "You've got mail" somebody@example.com
echo "Mail Body" | mail -s "Subject" somebody@example.com
I tried also to... (1 Reply)
Discussion started by: samer.odeh
1 Replies
9. Shell Programming and Scripting
HI everyone,
I would like to have a script to run a certain linux command and mail the results or output of this command.
This shell is to be later on set as cronjob.
thanks in advance. (9 Replies)
Discussion started by: patrickminas
9 Replies
10. Red Hat
Dear Concern,
We use following mail command in a script. We want to modify below command in script so that we can set mail as CC, BCC and From field of mail also can be modified. Please suggest.
echo "The SFTP user account '"$username"' will be expired soon. If you want to extend your... (1 Reply)
Discussion started by: makauser
1 Replies
vxsited(1M) vxsited(1M)
NAME
vxsited - site monitoring daemon
SYNOPSIS
/etc/vx/bin/vxsited [mail_address...]
DESCRIPTION
The vxsited daemon monitors Veritas Volume Manager (VxVM) for disks being attached, and reattaches a detached site if the disks that belong
to that site become accessible.
vxsited analyzes the output of the vxnotify command, and waits for a failed disk to attach. When a disk is attached, vxsited attempts to
online the disk, and tries to reattach the failed site. If a site is successfully reattached, vxsited starts recovery using vxrecover, and
sends mail to root (by default) or to other specified users.
Mail Notification
By default, vxsited sends mail to root with information about the disk status of any attempts to reattach the site. To send mail to other
users, add the user login name to the line that starts vxsited in the startup script, /etc/init.d/vxvm-recover, and reboot the system. For
example, if the line appears as:
nohup vxsited root &
and you want mail also to be sent to user1 and user2, change the line to read:
nohup vxsited root user1 user2 &
Alternatively, kill the vxsite process, and restart it from the command line with the required mail addresses as arguments.
The mail notification has a format that is similar to the following:
Subject : Volume Manager site reattach on host hostname
Reattached site sitename in disk-group diskgroup
Reattachment Procedure
If a disk from a detached site becomes accessible again, vxsited checks whether the relocation daemon, vxrelocd, is running. If vxrelocd
is running, vxsited attempts to reattach the site. The relocation daemon can then try to relocate the failed subdisks using space on the
available disks in the disk group. If the failed objects are successfully relocated, vxrelocd changes the state of the site to RECOVER,
and starts the recovery of volumes at the site. When all the plexes at a site have been recovered, the plexes are put into the ACTIVE
state, and the state of the site is set to ACTIVE.
If vxrelocd is not running, vxsited only reattaches a site when all the disks from that site become accessible. After successfully reat-
taching a site, vxsited changes the site state to ACTIVE, and initiates recovery using vxrecover. When all the plexes from a site have been
recovered, the plexes are put into the ACTIVE state, and the state of the site is set to ACTIVE.
vxsited does not attempt to reattach a site that has been explicitly detached by an administrator. The state OFFLINE is set for sites that
have been detached by using the following command:
vxdg -g dg_name detachsite sitename
Disabling vxsited
If you do not want a site to be recovered automatically, kill the vxsited daemon, and prevent it from restarting. To kill the daemon, run
the following command from the command line, and locate the process table entry for vxsited:
ps -ef
Execute the command:
kill -9 PID
Substitute the process ID of the vxsited process for PID. To prevent vxsited from being restarted, comment out the line that starts
vxsited in the startup script /sbin/init.d/vxvm-recover.
FILES
/sbin/init.d/vxvm-recover The startup file for vxsited.
SEE ALSO
kill(1), mailx(1), ps(1), vxdg(1M), vxrelocd(1M), vxintro(1M), vxnotify(1M), vxrecover(1M)
VxVM 5.0.31.1 24 Mar 2008 vxsited(1M)