Re: [Dorset] How to Cancel Existing systemd.timer(5) OnCalendar Values.

2020-09-30 Thread Hamish McIntyre-Bhatty
On 09/09/2020 12:15, Keith Edmunds wrote:
> On Wed, 9 Sep 2020 09:44:44 +0100, hamis...@live.co.uk said:
>
>> so has anyone experienced cron jobs sporadically (kind of randomly) not
>> running when they're meant to?
> No, never (and I've been using Linux since the early 90s, and UNIX before
> that).
>
> Set up your cron jobs so that the command is:
>
> [...] your-command 2>&1 | /usr/bin/logger -t 'my cronjob'
>
> Then take a look in your syslog files after the cron job has apparently
> not run.
>
> Linux Tips: https://www.tiger-computing.co.uk/category/techtips/

Turns out cron is fine on the pi, the problem is my system time not
syncing for some unknown reason.

The joys of debugging...

Hamish



signature.asc
Description: OpenPGP digital signature
-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-10-06 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] How to Cancel Existing systemd.timer(5) OnCalendar Values.

2020-09-13 Thread Ralph Corderoy
Hello Hamish,

> > > Now I just have to work out why updatedb.conf(5)'s
> > > PRUNE_BIND_MOUNTS doesn't seem to have an effect.  :-)
> >
> > Because it's buggy and doesn't work.  It's been known about for many
> > years and not fixed or documented.  :-(
> >
> > https://bugzilla.redhat.com/show_bug.cgi?id=723279
> > https://pagure.io/mlocate/issue/23
...
> Out of interest, what do you need that option/feature for?

The root filesystem is low on space.  Another filesystem isn't so some
large directories, e.g. /usr/share, have been moved to that other
filesystem as /data/usr-share and then bind-mounted onto /usr/share so
nothing knows the difference.

It's similar to using a symbolic link but without everything traversing
/usr/share/... having to follow the link, or deciding not to because
they don't follow symlinks.

The symptom, now sorted, is locate(1) returns an entry twice because
updatedb(8) wanders where I'd rather it didn't.

$ locate magic.mgc
/data/usr-share/file/misc/magic.mgc
/usr/share/file/misc/magic.mgc
$

-- 
Cheers, Ralph.

-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-10-06 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] How to Cancel Existing systemd.timer(5) OnCalendar Values.

2020-09-13 Thread Hamish McIntyre-Bhatty
On 13/09/2020 12:08, Ralph Corderoy wrote:
> Hi,
>
> I wrote:
>> Now I just have to work out why updatedb.conf(5)'s PRUNE_BIND_MOUNTS
>> doesn't seem to have an effect.  :-)
> Because it's buggy and doesn't work.  It's been known about for many
> years and not fixed or documented.  :-(
>
> https://bugzilla.redhat.com/show_bug.cgi?id=723279
> https://pagure.io/mlocate/issue/23

Aw :/

Out of interest, what do you need that option/feature for?

NB: I'll try the suggestions you offered for the issues I'm having, just
taking a little break from the debugging things all week :)

Hamish



signature.asc
Description: OpenPGP digital signature
-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-10-06 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] How to Cancel Existing systemd.timer(5) OnCalendar Values.

2020-09-13 Thread Ralph Corderoy
Hi,

I wrote:
> Now I just have to work out why updatedb.conf(5)'s PRUNE_BIND_MOUNTS
> doesn't seem to have an effect.  :-)

Because it's buggy and doesn't work.  It's been known about for many
years and not fixed or documented.  :-(

https://bugzilla.redhat.com/show_bug.cgi?id=723279
https://pagure.io/mlocate/issue/23

-- 
Cheers, Ralph.

-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-10-06 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] How to Cancel Existing systemd.timer(5) OnCalendar Values.

2020-09-09 Thread Hamish McIntyre-Bhatty
On 09/09/2020 12:15, Keith Edmunds wrote:
> On Wed, 9 Sep 2020 09:44:44 +0100, hamis...@live.co.uk said:
>
>> so has anyone experienced cron jobs sporadically (kind of randomly) not
>> running when they're meant to?
> No, never (and I've been using Linux since the early 90s, and UNIX before
> that).
>
> Set up your cron jobs so that the command is:
>
> [...] your-command 2>&1 | /usr/bin/logger -t 'my cronjob'
>
> Then take a look in your syslog files after the cron job has apparently
> not run.
>
> Linux Tips: https://www.tiger-computing.co.uk/category/techtips/
>
Yeah, that's why I'm asking - cron sounds bulletproof by a lot of what
I've heard.

Cheers, I'll do that. At the moment I'm debugging something else wrong
with the pi, but I'll give this a shot once that's done.

Hamish



signature.asc
Description: OpenPGP digital signature
-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-10-06 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] How to Cancel Existing systemd.timer(5) OnCalendar Values.

2020-09-09 Thread Keith Edmunds
On Wed, 9 Sep 2020 09:44:44 +0100, hamis...@live.co.uk said:

> so has anyone experienced cron jobs sporadically (kind of randomly) not
> running when they're meant to?

No, never (and I've been using Linux since the early 90s, and UNIX before
that).

Set up your cron jobs so that the command is:

[...] your-command 2>&1 | /usr/bin/logger -t 'my cronjob'

Then take a look in your syslog files after the cron job has apparently
not run.

Linux Tips: https://www.tiger-computing.co.uk/category/techtips/

-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-10-06 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] How to Cancel Existing systemd.timer(5) OnCalendar Values.

2020-09-09 Thread Hamish McIntyre-Bhatty
On 09/09/2020 09:38, Ralph Corderoy wrote:
> Hi Patrick,
>
>> Is it intentional that OnCalender= has a different spelling of 
>> Calend[a,e]r than OnCalendar=20:12?
> Nope!  Thanks, that fixes it.
>
> $ systemctl cat updatedb.timer
> # /usr/lib/systemd/system/updatedb.timer
> [Unit]
> Description=Daily locate database update
>
> [Timer]
> OnCalendar=daily
> AccuracySec=12h
> Persistent=true
>
> # /etc/systemd/system/updatedb.timer.d/override.conf
> [Timer]
> OnCalendar=
> OnCalendar=20:12
> Persistent=no
> $
> $ systemctl show updatedb.timer | grep OnCalendar=
> TimersCalendar={ OnCalendar=*-*-* 20:12:00 ;
> next_elapse=Wed 2020-09-09 20:12:00 BST }
> $
>
> Now I just have to work out why updatedb.conf(5)'s PRUNE_BIND_MOUNTS
> doesn't seem to have an effect.  :-)
>
Seems like it might be slightly related, so has anyone experienced cron
jobs sporadically (kind of randomly) not running when they're meant to?

On the same pi as has the kernel OOPS issue, I have cron jobs to turn
the power and SD access lights off at night and on at day, and run an
update script in the early morning. For a while now, these don't always
seem to run. I haven't bothered to dive into exactly why, but I was
wondering if there were any common misconfigurations that cause this.

I wouldn't find myself especially surprised if the kernel OOPS was also
somehow knocking CRON out/off-kilter.

Hamish



signature.asc
Description: OpenPGP digital signature
-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-10-06 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] How to Cancel Existing systemd.timer(5) OnCalendar Values.

2020-09-09 Thread Ralph Corderoy
Hi Patrick,

> Is it intentional that OnCalender= has a different spelling of 
> Calend[a,e]r than OnCalendar=20:12?

Nope!  Thanks, that fixes it.

$ systemctl cat updatedb.timer
# /usr/lib/systemd/system/updatedb.timer
[Unit]
Description=Daily locate database update

[Timer]
OnCalendar=daily
AccuracySec=12h
Persistent=true

# /etc/systemd/system/updatedb.timer.d/override.conf
[Timer]
OnCalendar=
OnCalendar=20:12
Persistent=no
$
$ systemctl show updatedb.timer | grep OnCalendar=
TimersCalendar={ OnCalendar=*-*-* 20:12:00 ;
next_elapse=Wed 2020-09-09 20:12:00 BST }
$

Now I just have to work out why updatedb.conf(5)'s PRUNE_BIND_MOUNTS
doesn't seem to have an effect.  :-)

-- 
Cheers, Ralph.

-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-10-06 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] How to Cancel Existing systemd.timer(5) OnCalendar Values.

2020-09-09 Thread Patrick Wigmore
Is it intentional that OnCalender= has a different spelling of 
Calend[a,e]r than OnCalendar=20:12?

Patrick

-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-10-06 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk