title: How can i make the python program to check linux services
body: <p>I want to make simple python script , which i can run on cron job. i just want to see if these services are currently running or stopped</p>
  
  <pre><code>Httpd
  mysql
  </code></pre>
  
  <p>How should i check them with python.</p>
  
  <p>Do i need to parse the output of <code>netstat -tlnp</code></p>