Thursday, March 22, 2012

how to check if service is running in debian

Syntax: ps xa -f | grep (name of the service you are looking for)

Example: 

Service: openvpn

Syntax: ps xa -f | grep openvpn

Output: 
root@asterguy:~# ps xa -f | grep openvpn
root      1233     1  0 21:53 ?        Ss     0:00 /usr/sbin/openvpn --writepid /var/run/openvpn.server.pid --daemon ovpn-server --cd /etc/openvpn --config /etc/openvpn/server.conf
root      2029  1918  0 22:15 pts/0    S+     0:00 grep openvpn
root@asterguy:~#

No comments:

Post a Comment