Link to home
Start Free TrialLog in
Avatar of trickle
trickle

asked on

Programs launcher/monitor

Hi there!, I have a set of programs (1..6) let me refer them as "services" wich I need to execute all in the same shell because they use a common PATH, and in the same machine (SUN-Solaris) run the services again but with another PATH.
The status is 2 or 3 sessions within its PATH and running this services, well the problem is that I can't control (stop, restart) only 1 program inside a service because they all have the same name but in different instances.
The idea is write a program wich forks or execs this programs from a conf file, and write the PID somewhere in order to kill and restart later 1 program of a service of a session:
 Graphical explanation:

Services = {  PgmA , PgmB , PgmC,... }
Session=  { SrvA , SrvB , SrvC , ... } where SrvA={PgmA, PgmB} ...

And I will launch different Sessions within its services and programs.

Avatar of jlevie
jlevie

If modifying the source of your "services" is an option, the cleanest solution would be to have each of them get their pid on startup and emit it to stdout. Your start script could then get the value and save it however you wish.
ASKER CERTIFIED SOLUTION
Avatar of chris_calabrese
chris_calabrese

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial