Also, checking a PID can change on occasion, if you're wanting to use this to ensure a particular service is running, I wouldn't recommend this way of checking. And like unspawn suggested, another alternative is to use the pidof command to find the PID's of a particular service.
# pidof httpd
17141 9356 9355 9354 9353 9352 9351 9350 9349
|