Mauricio Silveira
Dabbler
- Joined
- Aug 10, 2016
- Messages
- 28
Hi.
I've just spent some time debugging what I think is atrun misbehavior in TrueNAS core ( not sure if this applies to SCALE ).
EDIT: Testing on version TrueNAS-12.0-U8.1
After trying to make sense of how it is setup in TrueNAS ( maybe it's FreeBSD default, I really don't know FreeBSD ), I noticed that while linux default atrun is every minute, in TrueNAS it runs every 5 minutes.
Another point is that there's this cron entry at /etc/cron.d/at:
Running a test like:
So, for a test, I commented the cron.d/at entry, changed the /etc/crontab entry to */1 and now I have a "consistent" 1-minute prcision working atrun:
/etc/cron.d/at
/etc/crontab
Am I wrong about this or should I open a bug report for this to get fixed in future releases ?
I've just spent some time debugging what I think is atrun misbehavior in TrueNAS core ( not sure if this applies to SCALE ).
EDIT: Testing on version TrueNAS-12.0-U8.1
After trying to make sense of how it is setup in TrueNAS ( maybe it's FreeBSD default, I really don't know FreeBSD ), I noticed that while linux default atrun is every minute, in TrueNAS it runs every 5 minutes.
Another point is that there's this cron entry at /etc/cron.d/at:
And into /etc/crontab:*/5 * * * * root /usr/libexec/atrun
*/5 * * * * root /usr/libexec/atrun > /dev/null 2>&1
Running a test like:
ORecho "echo testing >> /tmp/testing.txt" | at now
doesn't work because it seems to make atrun run twice at the same time, leading to conflict accessing /var/at/jobs/cXXXXXXXXc, generating syslog messages like this:echo "echo testing >> /tmp/testing.txt" | at now +1 minute
It will complain as many times as the number os jobs in queue.Jan 17 08:00:00 storage01 1 2023-01-17T08:00:00.026230-03:00 storage01.local.domain atrun 52298 - - cannot open input file c0001401a9b553: No such file or directory
Jan 17 08:05:00 storage01 1 2023-01-17T08:05:00.053245-03:00 storage01.local.domain atrun 52397 - - cannot open input file c0001501a9b557: No such file or directory
Jan 17 08:10:00 storage01 1 2023-01-17T08:10:00.028049-03:00 storage01.local.domain atrun 52497 - - cannot open input file c0001601a9b55a: No such file or directory
Jan 17 08:10:00 storage01 1 2023-01-17T08:10:00.028049-03:00 storage01.local.domain atrun 52499 - - cannot open input file c0001801a9b55b: No such file or directory
Jan 17 08:10:00 storage01 1 2023-01-17T08:10:00.029169-03:00 storage01.local.domain atrun 52498 - - cannot open input file c0001701a9b55c: No such file or directory
Jan 17 08:15:00 storage01 1 2023-01-17T08:15:00.039606-03:00 storage01.local.domain atrun 52609 - - cannot open input file c0001901a9b561: No such file or directory
Jan 17 08:15:00 storage01 1 2023-01-17T08:15:00.039837-03:00 storage01.local.domain atrun 52608 - - cannot open input file c0001a01a9b560: No such file or directory
Jan 17 08:15:00 storage01 1 2023-01-17T08:15:00.040264-03:00 storage01.local.domain atrun 52607 - - cannot open input file c0001b01a9b561: No such file or directory
So, for a test, I commented the cron.d/at entry, changed the /etc/crontab entry to */1 and now I have a "consistent" 1-minute prcision working atrun:
/etc/cron.d/at
#*/5 * * * * root /usr/libexec/atrun
/etc/crontab
*/1 * * * * root /usr/libexec/atrun > /dev/null 2>&1
Am I wrong about this or should I open a bug report for this to get fixed in future releases ?
Last edited: