Sponsored Content
Top Forums Shell Programming and Scripting Solaris Server dectects EMC dead path and send mail immediately Post 302562718 by orafup on Friday 7th of October 2011 08:17:56 PM
Old 10-07-2011
i would like to change little bit. Please see below
Code:
#!/bin/sh

HOSTNAME=`uname -a`
MYMAIL="orafup@mymail.com"
EMCSTATUS=/tmp/prog$$

powermt display dev=all|awk ' {print $7}'|grep -c dead > $EMCSTATUS

if [ `cat $EMCSTATUS` -ne 0 ]
then 
 echo " there is the dead path "
 cat $EMCSTATUS |mailx -s "Please check $HOSTNAME on the dead path" $MYMAIL
 exit
fi
rm $EMCSTATUS
exit 0

---------- Post updated at 05:17 PM ---------- Previous update was at 05:16 PM ----------

YGEMICI,
It keeps looping , I have to kill it with control D

Last edited by Franklin52; 10-10-2011 at 03:12 AM.. Reason: Please use code tags, thank you
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

can not send mail from unix server to company/yahoo mail

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)
Discussion started by: b5fnpct
5 Replies

2. Solaris

mail problems - how to send mail on solaris

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)
Discussion started by: amon
10 Replies

3. UNIX for Dummies Questions & Answers

Can not send mail in solaris 5.9

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)
Discussion started by: irasela
1 Replies

4. Shell Programming and Scripting

script to monitor process running on server and posting a mail if any process is dead

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)
Discussion started by: pradeepmacha
13 Replies

5. UNIX for Advanced & Expert Users

send attachments using send mail in Solaris

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)
Discussion started by: mohan_kumarcs
1 Replies

6. Emergency UNIX and Linux Support

Send mail from dead.letter

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)
Discussion started by: raghu_shekar
7 Replies

7. UNIX for Advanced & Expert Users

need to configure mail setting to send mail to outlook mail server

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)
Discussion started by: amitranjansahu
2 Replies

8. Solaris

Removing Dead Paths And Unusable Path Solaris 9

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)
Discussion started by: jamba1
6 Replies

9. UNIX for Advanced & Expert Users

How can I send a mail from my outlook or other mail accounts to UNIX server?

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)
Discussion started by: igelegin
2 Replies

10. Shell Programming and Scripting

How to send mail using PHP mail function On apache server.?

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)
Discussion started by: Kiran ursal
1 Replies
SET_NET_DEFAULT(8)					      System Manager's Manual						SET_NET_DEFAULT(8)

NAME
s_n_d, set_net_default - select the default TCP/IP network SYNOPSIS
set_net_default: not found DESCRIPTION
This manual page is here because so many others refer to it. The set_net_default command does not exist under standard Minix, because the TCP/IP server only supports one network. The server under Minix-vmd supports four different networks, that can each be chosen as the default network. The TCP/IP library and commands do have a notion about a "default network" however, because the code is shared between the Minix versions. So if you want to venture into network programming then you should know about the devices and environment variables mentioned below to make your program compatible. (Especially since there is a plan to upgrade the TCP/IP server for standard Minix.) Options and environment to change the default Many TCP/IP programs implement the following options and environment variables to change the default devices set by set_net_default. The options are only implemented for low level programs where it makes sense to name a network device. The environment variables are used in all code. You can run a process and all its children connected to a different network by setting four environment variables. ETH_DEVICE=device -E device Device to use as raw ethernet device instead of the default /dev/eth. PSIP_DEVICE=device -P device Pseudo IP device to use instead of /dev/psip. IP_DEVICE=device -I device IP device to use instead of /dev/ip. TCP_DEVICE=device -T device TCP device to use. UDP_DEVICE=device -U device UDP device to use. FILES
/dev/eth[01] First and second raw ethernet. /dev/psip[01] First and second Pseudo IP network. /dev/ip[0123] IP devices for two ethernets and two Pseudo IP networks. /dev/tcp[0123] TCP devices for same four networks. /dev/udp[0123] UDP devices. /dev/eth, /dev/psip, /dev/ip, /dev/tcp, /dev/udp Devices for the default network, links to the devices above. Eth is only present if ethernet is the default, psip only for pseudo IP. SEE ALSO
ip(4), boot(8). AUTHOR
Kees J. Bot (kjb@cs.vu.nl) SET_NET_DEFAULT(8)
All times are GMT -4. The time now is 04:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy