Centos 8 crond no pid file

Issues related to applications and software problems and general support
Post Reply
Lionheart82
Posts: 3
Joined: 2017/03/09 08:18:25

Centos 8 crond no pid file

Post by Lionheart82 » 2021/01/05 19:50:43

Hello all, wish you a happy new year!

I am in a new centos8 minimal server setup as web server.
My issue is that for some reason i see no crond.pid file in /var/run for crond service.

the service is running of course and i see no errors in messages or cron log.

/bin/systemctl status crond.service
crond.service - Command Scheduler
Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor preset: enabled)
Active: active (running)

even tried to add:
CRONDARGS="-x ext,sch,proc,pars,load,misc,test,bit"
in: /etc/sysconfig/crond
but still no error in the logs.

I can confirm that cron is running ok and all crons are also running so everyting is ok... but i would like to add crond to be monitored by "monit"
like: check process crond with pidfile /var/run/crond.pid ...

Any ideas?

Br,
S.Alexandros

User avatar
TrevorH
Forum Moderator
Posts: 30173
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Centos 8 crond no pid file

Post by TrevorH » 2021/01/05 20:54:48

You don't need monit, systemd already monitors the process and restarts it if it dies.
CentOS 6 died in November 2020 - migrate to a new version!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Lionheart82
Posts: 3
Joined: 2017/03/09 08:18:25

Re: Centos 8 crond no pid file

Post by Lionheart82 » 2021/01/06 16:40:09

Thank you for the info, nevertheless it is good to have a monitoring system to be sure...
I solved monit by adding matching crond instead of pid...
So the only thing that remains is the mystery to me of why pid is not created :S i remember in centos 7 it was there.

Thank you for your time.

Post Reply

Return to “CentOS 8 - General Support”