title: Linux self-healing script to check some process
body: <p>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 :</p>
  
  <pre><code>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
  </code></pre>
  
  <p>in case any of above services is stopped, the script to run restart command.</p>
  
  <p>Appreciate if any one help me to start with this script</p>
  
  <p>Regards, </p>