use string comparison in shell... if [ $pid == "" ]
check for NULL...
| piyu sen <[EMAIL PROTECTED]>
11/09/2004 01:52 PM
|
|
i am giving u what i have done hope u will understand then what i want
pid=`ps -ef |awk '/xxxx/ && !/awk/ {print $2}'`
if [ $pid -eq ???? ]
so if there is no process called xxxx then it will give null for pid value
Then what should be my value for ???? in my if statement
[EMAIL PROTECTED] wrote:
$procs=`ps -ef | grep root |awk '{print $8}'`
The $8 gives me the process name (aix)..suit it to your OS.
>From $procs compare each entry with your list of processes that should be running and then for those
processes for which there is no entry in $procs send a alert..
| "Raghavan, Rajeev"
<[EMAIL PROTECTED]>
11/09/2004 01:23 PM
|
|
ps -ef | grep "processname" | grep -v grep | wc -l
will give you the number of instances of a particular process.
You need to write a shell script to monitor the process instances and then send an alert.
-----Original Message-----
From: piyu sen [mailto:[EMAIL PROTECTED]
Sent: 09 November 2004 15:35
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [c-prog] Process iD. !!!URGENT......!!
Yes i have all of them
[EMAIL PROTECTED] wrote:
>>>i want to generate allerts for the process that r not running???
So..Do you have a list of processes that should be running???
Only then can you check which processes are running and then send alerts for those that are not running!
Thanks.
| piyu sen <[EMAIL PROTECTED]>
11/09/2004 12:39 PM
|
|
i want to generate allerts for the process that r not running
Mahesh Menase <[EMAIL PROTECTED]> wrote:
if process id is 0 then ...........
:) ......... go Home.
piyu sen <[EMAIL PROTECTED]> wrote:
ok
if the process id is 0 then
Satya Prasad <[EMAIL PROTECTED]> wrote:
I would like to help you ... but how can a terminated
process have a process Id.
Regards,
Satya Prakash Prasad.
--- piyu sen <[EMAIL PROTECTED]> wrote:
> Hi,
> Can ne 1 tel me what will b the Process id for a
> process that have been normaly terminated or
> terminated by fource..
> I need to send sms allert for the process that r not
> running.
> Plz help me.
> U can call me in this number or give ur number so
> that i can talk to u in this regard
> 9811425054.
> Thanks
> Regards Piyu
>
>
> ---------------------------------
> Do you Yahoo!?
> Check out the new Yahoo! Front Page. www.yahoo.com
__________________________________
Do you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com
To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.
Piyu Sen
Software Engineer.
SSL. Bangalore.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.
Do you Yahoo!?
Check out the new Yahoo! Front Page. www.yahoo.com
To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.
Piyu Sen
Software Engineer.
SSL. Bangalore.
Do you Yahoo!?
Check out the new Yahoo! Front Page. www.yahoo.com
To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.
|
Yahoo! Groups Sponsor
| |
|
| |
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/c-prog/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
| DISCLAIMER: The information contained
in this message is intended only and solely for the addressed individual
or entity indicated in this message and for the exclusive use of the said
addressed individual or entity indicated in this message (or responsible
for delivery of the message to such person) and may contain legally privileged
and confidential information belonging to Tata Consultancy Services Limited.
It must not be printed, read, copied, disclosed, forwarded, distributed
or used (in whatsoever manner) by any person other than the addressee.
Unauthorized use, disclosure or copying is strictly prohibited and may
constitute unlawful act and can possibly attract legal action, civil and/or
criminal. The contents of this message need not necessarily reflect or
endorse the views of Tata Consultancy Services limited on any subject matter. Any action taken or omitted to be taken based on this message is entirely at your risk and nei ther the originator of this message nor Tata Consultancy Services Limited takes any responsibility or liability towards the same. Opinions, conclusions and any other information contained in this message that do not relate to the official business of Tata Consultancy Services limited shall be understood as neither given nor endorsed by Tata Consultancy Services Limited or any affiliate of Tata Consultancy Services Limited. If you have received this message in error, you should destroy this message and may please notify the sender by e-mail. Thank you. |
To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.
Piyu Sen
Software Engineer.
SSL. Bangalore.
Do you Yahoo!?
Check out the new Yahoo! Front Page. www.yahoo.com
To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.
|
Yahoo! Groups Sponsor
| |
|
| |
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/c-prog/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.
|
Yahoo! Groups Sponsor
| |
|
| |
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/c-prog/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
This message is for the sole use of the intended recipient. If you received this message in error please delete it and notify us. If this message was misdirected, CSFB does not waive any confidentiality or privilege. CSFB retains and monitors electronic communications sent through its network. Instructions transmitted over this system are not binding on CSFB until they are confirmed by us. Message transmission is not guaranteed to be secure.
==============================================================================
ForwardSourceID:NT00007292
| DISCLAIMER: The information contained
in this message is intended only and solely for the addressed individual
or entity indicated in this message and for the exclusive use of the said
addressed individual or entity indicated in this message (or responsible
for delivery of the message to such person) and may contain legally privileged
and confidential information belonging to Tata Consultancy Services Limited.
It must not be printed, read, copied, disclosed, forwarded, distributed
or used (in whatsoever manner) by any person other than the addressee.
Unauthorized use, disclosure or copying is strictly prohibited and may
constitute unlawful act and can possibly attract legal action, civil and/or
criminal. The contents of this message need not necessarily reflect or
endorse the views of Tata Consultancy Services limited on any subject matter. Any action taken or omitted to be taken based on this message is entirely at your risk and neither the originator of this message nor Tata Consultancy Services Limited takes any responsibility or liability towards the same. Opinions, conclusions and any other information contained in this message that do not relate to the official business of Tata Consultancy Services limited shall be understood as neither given nor endorsed by Tata Consultancy Services Limited or any affiliate of Tata Consultancy Services Limited. If you have received this message in error, you should destroy this message and may please notify the sender by e-mail. Thank you. |
To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.
Piyu Sen
Software Engineer.
SSL. Bangalore.
Do you Yahoo!?
Check out the new Yahoo! Front Page. www.yahoo.com
To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.
|
Yahoo! Groups Sponsor
| |
|
| |
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/c-prog/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
| DISCLAIMER: The information contained in this message is intended only and solely for the addressed individual or entity indicated in this message and for the exclusive use of the said addressed individual or entity indicated in this message (or responsible for delivery of the message to such person) and may contain legally privileged and confidential information belonging to Tata Consultancy Services Limited. It must not be printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person other than the addressee. Unauthorized use, disclosure or copying is strictly prohibited and may constitute unlawful act and can possibly attract legal action, civil and/or criminal. The contents of this message need not necessarily reflect or endorse the views of Tata Consultancy Services limited on any subject matter. Any action taken or omitted to be taken based on this message is entirely at your risk and neither the originator of this message nor Tata Consultancy Services Limited takes any responsibility or liability towards the same. Opinions, conclusions and any other information contained in this message that do not relate to the official business of Tata Consultancy Services limited shall be understood as neither given nor endorsed by Tata Consultancy Services Limited or any affiliate of Tata Consultancy Services Limited. If you have received this message in error, you should destroy this message and may please notify the sender by e-mail. Thank you. |
To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.
| Yahoo! Groups Sponsor |
| Get unlimited calls to U.S./Canada |
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/c-prog/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
