Im new with Linux scripts, I need help to create one script with check some installed processes on a server and if one of these services is not running restart it, and recheck again those services and if there any error print it with echo as below :
dsisrv (DSI service) (7384) Running
midaemon (measurement interface) (1412) Running
misrv (measurement interface service) (1384) Running
perfalarm (Alarm generator) Stopped
perfalarmsrv (Alarm generator service) Stopped
scopent (data collector) Stopped
scopesrv (collector service) Stopped
perfd (Real Time Metric Access Daemon) (7888) Running
perfdsrv (Real Time Metric Access Service) (9020) Running
ttd (transaction tracking) (1808) Running
in case any of above services is stopped, the script to run restart command.
Appreciate if any one help me to start with this script
Regards,
Just add the service your looking for, this will mail you if the service goes down. Im assuming your using bash so enjoy.