3072 pci@1d,700000/SUNW,qlc@1/fp@0,0 c3t5006016446E01FEFd0s0 SP A4 active alive 0 0
3072 pci@1d,700000/SUNW,qlc@1/fp@0,0 c3t5006016C46E01FEFd0s0 SP B4 active dead 0 1
3073 pci@1e,600000/SUNW,qlc@3/fp@0,0 c4t5006016546E01FEFd0s0 SP A5 active alive 0 0
3073 pci@1e,600000/SUNW,qlc@3/fp@0,0 c4t5006016D46E01FEFd0s0 SP B5 active dead 0 1
The script is running every 10 mins to detect the ECM dead path ( see above) and sendind an email only when it detect the dead paths
The simple way is
10,20,30,40,50,59 * * * * /ect/powermt display dev=all|awk '{print $7}' |grep -i dead |mail orafup@mymail.com <---work perfect when there is a dead path
and the script
Please help me out.
Thanks!
Last edited by Franklin52; 10-06-2011 at 03:11 AM..
Reason: Please use code tags, thank you
I like your script . it is good for multi-luns but it dont think it work
but it is still not working. i am to send mail only when there is a dead path(s).
thanks!
#!/bin/sh
HOSTNAME=`uname -n`;MYMAIL='yourmail@yourdomain';TEMPF=/tmp/prog$$
powermt display dev=all|awk '/Pseudo name/{print substr($0,13,length($0))}'|
while read -r dev;do if [[ $(powermt display dev=$dev|grep -i dead) ]] ; then
powermt display dev=$dev>$TEMPF;mailx -s "There is a dead path(s) at the '$dev' device in $HOSTNAME" $MYMAIL<$TEMPF
fi; done
I like your script . it is good for multi-luns but it dont think it work
#!/bin/sh
HOSTNAME=`uname -n`
MYMAIL="yourmail@yourdomain"
TEMPF=/tmp/prog$$
powermt display dev=all|awk '/Pseudo name/{print substr($0,13,length($0))}'|while read -r dev;
do
echo $dev
powermt display dev=$dev|grep -i dead
if [[ $(powermt display dev=$dev|grep -c dead) -ne 0]] ;
then
powermt display dev=$dev>$TEMPF;
mailx -s "There is a dead path(s) at the '$dev' device i$HOSTNAME"$MYMAIL<$TEMPF
fi;
done
but it is still not working. i am to send mail only when there is a dead path(s).
thanks!
what is error?
i guess you has a typo!
this script already send to mail when matches dead of paths.
YGEMICI,
It keeps looping , I have to kill it with control D
why do you use the sh ?
you must use
.
and firstly glance , there is any error your script maybe except some corrections..
if you get any error with below script then write the output of below comd
re-try this.
and your code might look like this.
Hello,
I am using centos-6.2
I have apache server,php5 on my system and I want to send mail using sendmail on my system.
when I try to send mail from shell that time mail is succesfully sent to respective address()
but when I try to send it through webbrowser I am not able to send it.... (1 Reply)
Hi all,
I want to send a mail for my business needs from outlook account to an unix server (HP-UX) but I don't send any mail. While I can send from the unix server to my outlook account, I can't send from outlook to unix.
How can I achieve this ? How can I send a mail from my outlook or other... (2 Replies)
Hi,
One of our Solaris servers was peviously zoned and connected to 2 seperate arrays, one HP and the other EMC. The server is now only connected to the EMC. The sever has x2 single port HBA's.
When running cfgadm I see the following:
root@qwicprod /dev/rdsk]# cfgadm -al
Ap_Id Type... (6 Replies)
i have sun machines having solaris 9 & 10 OS . Now i need to send mail from the machines to my outlook account . I have the ip adress of OUTLOOK mail server. Now what are the setting i need to do in solaris machines so that i can use mailx or sendmail.
actually i am trying to automate the high... (2 Replies)
Hi,
Can someone pls tell me how do i mail the contents of my dead.letter to my mail id. The problem is that the content is a multi-part message in MIME format. How do i get the original message mailed to me.
i used uuencode, but that does not work, says "uuencode not found"
Any help... (7 Replies)
Hi All,
I have a requirement to send and email of body html with an attachment.
concatinating uuencode output to the mail body with mailx command works, but as my Email body is of HTML type i use sendmail.
my command to send HTML body is as below:
export MAILTO="recipient@domain.com"... (1 Reply)
Hello all,
I would be happy if any one could help me with a shell script that would determine all the processes running on a Unix server and post a mail if any of the process is not running or aborted.
Thanks in advance
Regards,
pradeep kulkarni.
:mad: (13 Replies)
Hi !!
I'm trying to send myself a mail from my Solaris server, i had tryed with this commands:
mail -s "test" irasela@yahoo.com < /monitoring/space/bitacora.txt
mailx -s "test" irasela@yahoo.com < /monitoring/space/bitacora.txt
sendmail -F "test" address "irasela.yahoo.com" -t... (1 Reply)
Hello I am new user on solaris...
I need to configure my solaris to be able to send mails...
I know mailx command
mailx -s hello address@address.com
but I get an error...
you have mail in /var/mail/root
# hello... User unknown
/dead.letter... Saved message in /dead.letter
what... (10 Replies)
hi, Gurus,
I need some help with sending mail out from my UNIX server:
It is running Solaris 2.6 and the sendmail version is 8.8.
Output of :/usr/lib/sendmail -d0.1 -bt < /dev/null
Version 8.8.8+Sun
Compiled with: LOG MATCHGECOS MIME7TO8 MIME8TO7 NAMED_BIND NDBM NETINET
... (5 Replies)