Support us on Patreon to keep GamingOnLinux alive. This ensures we have no timed articles and no paywalls. Just good, fresh content! Alternatively, you can donate through PayPal, Flattr, Liberapay or Buy us a Coffee. You can also buy games using our partner links for GOG and Humble Store.
Unknown cron job?
Salvatos 21 Feb

For a while now I’ve had something trigger at precisely 0:08:00 every single day and do a lot of disk reading and writing for close to ten minutes, slowing down my entire system in the process. At first I suspected Timeshift, but I have it set up to only fire once a week, and according to the available backups it’s not running every day and not specifically at that time. The weird thing is that System Monitor doesn’t seem to show any increased activity, but I can definitely hear it and feel it. Since it seems so similar to what Timeshift does, I’m not ruling out the possibility that it’s somehow running and not actually saving the backups, since it seems like a pretty shaky piece of software in general.

Anyway, I’d like to figure out what this is and turn it off but I have no idea where to look, so any help would be welcome. Running crontab as either my user or root returns nothing. I’m on Mint 19 Cinnamon.

WorMzy 21 Feb

Also check in /etc/cron.d and systemd timers.
cat /etc/cron.d/*
systemctl list-timers
systemctl --user list-timers

Valck 21 Feb

My first guess would be updatedb for your locate database, indexing your filesystems.
I personally find locate a very useful tool when you need it, just shift it to a time when you're less active, or maybe weekly or even monthly instead of daily...

Salvatos 21 Feb

WorMzyAlso check in /etc/cron.d and systemd timers.
cat /etc/cron.d/*
systemctl list-timers
systemctl --user list-timers

/etc/cron.d/* looks innocent:
30 7    * * *   root [ -x /etc/init.d/anacron ] && if [ ! -d /run/systemd/system ]; then /usr/sbin/invoke-rc.d anacron start >/dev/null; fi
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=""

0 * * * * root timeshift --check --scripted


systemctl list-timers:
NEXT                         LEFT        LAST                         PASSED    
Fri 2020-02-21 18:03:54 EST  8min left   Fri 2020-02-21 17:00:11 EST  55min ago 
Fri 2020-02-21 18:34:22 EST  38min left  Fri 2020-02-21 09:53:17 EST  8h ago    
Sat 2020-02-22 03:33:17 EST  9h left     Fri 2020-02-21 14:43:13 EST  3h 12min a
Sat 2020-02-22 06:53:35 EST  12h left    Fri 2020-02-21 09:53:17 EST  8h ago    
Sat 2020-02-22 13:22:29 EST  19h left    Fri 2020-02-21 13:22:29 EST  4h 33min a
Mon 2020-02-24 00:00:00 EST  2 days left Mon 2020-02-17 00:00:11 EST  4 days ago
n/a                          n/a         Thu 2020-02-20 00:18:53 EST  1 day 17h 

The last one might correspond to the approximate time it finished two days ago, but the rest don’t seem related.

systemctl --user list-timers shows 0 timer.

I also tried grep run-parts /etc/crontab to check mlocate and other dailies but the timing doesn’t correspond either.
17 * * * * root    cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

Valck 22 Feb

Salvatos
WorMzyAlso check in /etc/cron.d and systemd timers.
[code]cat /etc/cron.d/*
I suppose you also looked inside the other /etc/cron.* directories--if they exist of course? On my system, there's /etc/cron.daily/mlocate for example, as well as other stuff in /etc/cron.weekly/ and so on.
Can't help you with systemd specifics though.

Salvatos 22 Feb

I installed iotop and it’s definitely updatedb.mlocate using up 90+% of IO.

I ran locate / as suggested on Launchpad to see where it was spending so much time, and as it happens Timeshift’s snapshots are occupying an incredible proportion of the output. I’ve added its directory to PRUNEPATHS in /etc/updatedb.conf as suggested, we’ll see how it goes the next time.

Last edited by Salvatos on 22 February 2020 at 5:25 am UTC

Salvatos 22 Feb

Valck
Salvatos
WorMzyAlso check in /etc/cron.d and systemd timers.
[code]cat /etc/cron.d/*
I suppose you also looked inside the other /etc/cron.* directories--if they exist of course? On my system, there's /etc/cron.daily/mlocate for example, as well as other stuff in /etc/cron.weekly/ and so on.
Can't help you with systemd specifics though.
I looked at the file but it didn’t say anything about when it runs, and my understanding of the grep run-parts /etc/crontab output above was that mlocate and other dailies are supposed to run at 6:25. I’m guessing it catches up later when the computer isn’t on at that time, but I wonder why it consistently chooses to do so at 0:08.

Salvatos 24 Feb

Aaaand it took about a minute tonight. Case closed, thank you all for the assist :)

You need to Register and Login to comment, submit articles and more.


Or login with...