How to ensure that csf/lfd are running and operational ?

Post Reply
ktp
Junior Member
Posts: 65
Joined: 12 Jun 2008, 06:53

How to ensure that csf/lfd are running and operational ?

Post by ktp »

Hello,

Since csf/lfd is very important for my server security, I would like with a monitoring script to ensure that csf and lfd are both running and operational. Is there a recommended way to do this ? I am running CentOS 7.
I am thinking about:
- either parsing the output of command "systemctl status csf lfd" and detect that they are active, and also "running" for lfd.
- either parsing the output of "ps auxf" command and detect "lfd" occurrence.

Output excerpt of "systemctl status csf lfd" command:
For lfd:
Active: active (running) since Sun 2019-07-21 05:43:32 CEST; 58min ago

For csf:
Active: active (exited) since Sun 2019-07-21 04:12:39 CEST; 2h 29min ago

Thank you.
Post Reply