(This isn’t really “Add-Ons” but I could not find an appropriate forum category)
For various reasons I have been looking to reduce the number of writes to the SSD my IPFire system uses. I found that 80% of entries in
/var/log/messages are related to
fcron, most just reporting a check to see if a script or link exists to run a cron job against. It seems to be a customisation made in IPFire.
For example, by commenting out:
*/1 * * * * test -x /usr/local/bin/run-parts && /usr/local/bin/run-parts /etc/fcron.minutely
fcron won’t be able to run every minute, however this isn’t used by default (and I’m not using it) yet a single log entry is removed every minute.
Does anyone else see the same proportion of events in their
Does anyone know why this
run-parts script was added?
This is there since IPFire was started (checked back to Core Update 50). It is present to run all executable files that are in the minutely directory. The same thing is done for the hourly, daily, weekly, monthly and cyclic directories.
I don’t see any fcron related lines in my logs.
If you check the
/etc/rc.d/init.d/fcron file do you have the -y in the loadproc line for the start function. This stops any fcron logging. It is normally only removed if you want to do some troubleshooting and need log info. See the following wiki page
Thanks @bonnietwin I seem to have commented out the
-y switch at some point when using fcron for my own purposes. It’s great to know that IPFire isn’t spamming everyone’s logs by default!
If I were being perfectionist, it would be nice to be able to log actual jobs run but mute internal functions (all the
run-parts scripts). I’m still a bit surprised about them. Was adding them the only way fcron could be made to have minutely, hourly, daily scripts linked in a directory?
Using run-parts is how fcron, cron, cronie and anacron find and execute scripts that are placed in those minutely etc directories.
You could create scripts to do the same thing but it would be more complicated and run-parts exists and also will only run executable scripts that are in the directories so you can also place scripts in the directories without the executable bit set and they will be ignored until the bit is set.