[INUG-Users] Using PAD to control other processes.

Hubbard, Greg L greg.hubbard at eds.com
Thu Sep 13 15:00:14 EDT 2007


Then you are almost there!  The trick is to add the part that traps
SIGTERM (and any other signals you want to watch for) and have the
script kill the process.  As you may have seen posted in the last
coupled of days, PAD issues a SIGTERM (15) to a managed process, and if
it doesn't exit then it eventually issues a "kill -9."

GLH 

-----Original Message-----
From: users-bounces at netcoolusers.org
[mailto:users-bounces at netcoolusers.org] On Behalf Of
jvisovsky at pershing.com
Sent: Thursday, September 13, 2007 1:48 PM
To: users at netcoolusers.org
Subject: Re: [INUG-Users] Using PAD to control other processes.

I already have something like that invoked every 5 minutes by cron.  The
Event Enablement script is called ee_start. Its start a process call
'ihstdmai'.   My cron job does a ps and grep for ihstdmai and runs the
ee_start script if it doesn't see the process.  The problem with this is
my cron job is for user ncoadmin not root. and  Event Enablement
requires root.  However, for some reason, its still starts up.

I wanted to implement this using PAD and not use cron since my ever
benevolent Unix SAs let PAD start stuff as root.   I do not have root
priveleges, however am given a few trivial sudo commands.  With EE
running under PAD , its like I have root since I can start and stop a
root owned process.

Thanks,
Joe


 

             "Hubbard, Greg L"

             <greg.hubbard at eds

             .com>
To 
             Sent by:                  <users at netcoolusers.org>

             users-bounces at net
cc 
             coolusers.org

 
Subject 
                                       Re: [INUG-Users] Using PAD to

             09/13/2007 02:16          control other processes.

             PM

 

 

             Please respond to

             users at netcooluser

                   s.org

 

 





Joe,

In this case, you need to write a script that starts EE.  Then have it
troll "ps" output now and then (via sleep loop) to see if EE is still
running and restart it if not.  When it gets a SIGTERM, it should stop
EE.  Now you have made it "PAD-aware".  You can be as clever as you
want.

Then you have PAD start the script instead of EE.  Common trick.  I am
not at liberty to post my script, but I bet someone else might be
willing to post theirs.  Or you might search the archives; I think I
have seen some script examples posted in the past, using a lot less code
that I do...

Jacob, do you know any volunteers who might write a "how to put
something that doesn't know about PAD under PAD" document for the INUG
Web site?

GLH

-----Original Message-----
From: users-bounces at netcoolusers.org
[mailto:users-bounces at netcoolusers.org] On Behalf Of
jvisovsky at pershing.com
Sent: Thursday, September 13, 2007 12:36 PM
To: users at netcoolusers.org
Subject: Re: [INUG-Users] Using PAD to control other processes.

I tried it and PAD starts EE successfully, but never gets the PID.   So
nco_pa_status always shows 'Pending' with PID of '0' and the PA log show
PA continually trying to restart it.


Thanks,
Joe (V) Visovsky
Technology Services Group
Work # (973) 360-3037
Pager # (800) 502-5136




             trefalgar at reality

             bytes.net

             Sent by:
To
             users-bounces at net         users at netcoolusers.org

             coolusers.org
cc



Subject
             09/13/2007 01:20          Re: [INUG-Users] Using PAD to

             PM                        control other processes.





             Please respond to

             users at netcooluser

                   s.org









No reason you can't.  :)

Jacob

Quoting jvisovsky at pershing.com:

> I am running IBMs EE (Event Enablement) to forward Netcool events to
TBSM.
> Can I add this process to nco_pa.conf so PAD starts it on Netcool 
> start
up
> or if the process dies?
>
>
>
> Thanks,
> Joe (V) Visovsky
> Technology Services Group
> Work # (973) 360-3037
> Pager # (800) 502-5136
>
>
> ******************************************************
> This message and any files or attachments sent with this message 
> contain confidential information and is intended only for the 
> individual named.  If you are not the named addressee, you should not 
> disseminate, distribute, copy or use any part of this email.  If  you 
> have received this message in error, please delete it and all copies 
> from your system and notify the sender immediately by return Email.
>
> Email transmission cannot be guaranteed to be secure or error-free as 
> information can be intercepted, corrupted, lost, destroyed, late, 
> incomplete or may contain viruses.  The sender, therefore, does not 
> accept liability for any errors or omissions in the contents of this 
> message, which arise as a result of email transmission.
> ******************************************************
> _______________________________________________
> Sent by the netcoolusers.org "users" mailing list
> Post: users at netcoolusers.org
> Unsubscribe: users-unsubscribe at netcoolusers.org
> Search: http://lists.netcoolusers.org/archives/users/
>



_______________________________________________
Sent by the netcoolusers.org "users" mailing list
Post: users at netcoolusers.org
Unsubscribe: users-unsubscribe at netcoolusers.org
Search: http://lists.netcoolusers.org/archives/users/



******************************************************
This message and any files or attachments sent with this message contain
confidential information and is intended only for the individual named.
If you are not the named addressee, you should not disseminate,
distribute, copy or use any part of this email.  If you have received
this message in error, please delete it and all copies from your system
and notify the sender immediately by return Email.

Email transmission cannot be guaranteed to be secure or error-free as
information can be intercepted, corrupted, lost, destroyed, late,
incomplete or may contain viruses.  The sender, therefore, does not
accept liability for any errors or omissions in the contents of this
message, which arise as a result of email transmission.
******************************************************
_______________________________________________
Sent by the netcoolusers.org "users" mailing list
Post: users at netcoolusers.org
Unsubscribe: users-unsubscribe at netcoolusers.org
Search: http://lists.netcoolusers.org/archives/users/
_______________________________________________
Sent by the netcoolusers.org "users" mailing list
Post: users at netcoolusers.org
Unsubscribe: users-unsubscribe at netcoolusers.org
Search: http://lists.netcoolusers.org/archives/users/



******************************************************
This message and any files or attachments sent with this message contain
confidential information and is intended only for the individual named.
If you are not the named addressee, you should not disseminate,
distribute, copy or use any part of this email.  If you have received
this message in error, please delete it and all copies from your system
and notify the sender immediately by return Email.

Email transmission cannot be guaranteed to be secure or error-free as
information can be intercepted, corrupted, lost, destroyed, late,
incomplete or may contain viruses.  The sender, therefore, does not
accept liability for any errors or omissions in the contents of this
message, which arise as a result of email transmission.
******************************************************
_______________________________________________
Sent by the netcoolusers.org "users" mailing list
Post: users at netcoolusers.org
Unsubscribe: users-unsubscribe at netcoolusers.org
Search: http://lists.netcoolusers.org/archives/users/


More information about the Users mailing list