You are not logged in.

#26 2012-08-22 06:55:14

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: Errors in error.log – possible fixes?

@cfr yes, good point. Away from computer at the moment, so can't see what I'm using but that'll be it.


EDIT just checked and yes, I'm using dcron.

Last edited by skanky (2012-08-22 20:34:51)


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#27 2012-08-29 10:30:24

riccardo
Member
From: IT
Registered: 2012-08-05
Posts: 50

Re: Errors in error.log – possible fixes?

cfr wrote:
riccardo wrote:
cfr wrote:

/etc/syslog-ng.conf?

apropos syslog

yes smile

does this file "decide" all level log of the system?

apropos syslog

understood smile


Thank you.
Riccardo


Arch Linux x86_64 | GNOME | Genuine Intel® CPU U7300 @ 1.30GHz × 2 | 3,7 GiB | Corsair Force 3 SSD 120 GiB

Offline

#28 2012-11-14 09:26:21

Osiris
Member
Registered: 2003-01-18
Posts: 153
Website

Re: Errors in error.log – possible fixes?

Does the /etc/conf.d/crond file has any effect at all when using systemd? The service file:

root@horus /usr/lib/systemd/system # cat cronie.service
[Unit]
Description=Periodic Command Scheduler

[Service]
ExecStart=/usr/sbin/crond -n
ExecReload=/bin/kill -HUP $MAINPID
Restart=always

[Install]
WantedBy=multi-user.target

No EnvironmentFile is set.

Offline

#29 2013-07-04 08:54:54

whabash090
Member
Registered: 2010-11-04
Posts: 4

Re: Errors in error.log – possible fixes?

Osiris wrote:

Does the /etc/conf.d/crond file has any effect at all when using systemd? The service file:

root@horus /usr/lib/systemd/system # cat cronie.service
[Unit]
Description=Periodic Command Scheduler

[Service]
ExecStart=/usr/sbin/crond -n
ExecReload=/bin/kill -HUP $MAINPID
Restart=always

[Install]
WantedBy=multi-user.target

No EnvironmentFile is set.

Osiris - I don't think do.

I have tried starting cronie with both the '-s' and -S' arguments, and seen no change in the output of my execution of `cat cronie.service`:

kjones /usr/lib/systemd/system $ cat cronie.service
[Unit]
Description=Periodic Command Scheduler

[Service]
ExecStart=/usr/bin/crond -n
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=always

[Install]
WantedBy=multi-user.target

I am curious about how to edit the config that systemd is referencing for cronie.  Currently trying to figure this out by reading https://wiki.archlinux.org/index.php/Cron .

Offline

#30 2013-07-04 09:17:10

Osiris
Member
Registered: 2003-01-18
Posts: 153
Website

Re: Errors in error.log – possible fixes?

Overwriting and modifying the systemd unit file seems to be the way to go:

https://bugs.archlinux.org/task/31231
https://bugs.archlinux.org/task/30408

Offline

#31 2013-07-04 09:33:03

whabash090
Member
Registered: 2010-11-04
Posts: 4

Re: Errors in error.log – possible fixes?

whabash090 wrote:

I am curious about how to edit the config that systemd is referencing for cronie.  Currently trying to figure this out by reading https://wiki.archlinux.org/index.php/Cron .

Easy enough, just need to edit the `ExecStart` line found in /usr/lib/systemd/system/cronie.service directly, as follows:

kjones /usr/lib/systemd/system $ cat cronie.service
[Unit]
Description=Periodic Command Scheduler

[Service]
ExecStart=/usr/bin/crond -S
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=always

[Install]
WantedBy=multi-user.target

and then

kjones /usr/lib/systemd/system $ sudo systemctl reload cronie

Now upon start I just have:

Jul 04 02:27:19 li431-203 systemd[1]: Started Periodic Command Scheduler.
Jul 04 02:27:19 li431-203 crond[6100]: (CRON) INFO (running with inotify support)
Jul 04 02:27:19 li431-203 crond[6100]: (CRON) INFO (@reboot jobs will be run at computer's startup.)

Offline

#32 2013-07-04 21:09:31

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: Errors in error.log – possible fixes?

The right way to do it is to copy cronie.service to /etc/systemd/system/cronie.service and edit the copy. That way, your changes will not be overwritten next time the package is updated.

Actually there is probably a newer, better way involving including the standard file but I've not figured out how to do that yet or what the dangers might be so I'm still using the /etc override method.

For example, I use:

$ cat /etc/systemd/system/cronie.service 
[Unit]
Description=Periodic Command Scheduler

[Service]
ExecStart=/usr/bin/crond -n -s -m off
ExecReload=/usr/bin/kill -HUP $MAINPID
KillMode=process
Restart=always

[Install]
WantedBy=multi-user.target

Obviously you need to reenable and/or restart the service as appropriate after this.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#33 2013-07-04 21:53:56

whabash090
Member
Registered: 2010-11-04
Posts: 4

Re: Errors in error.log – possible fixes?

cfr wrote:

The right way to do it is to copy cronie.service to /etc/systemd/system/cronie.service and edit the copy. That way, your changes will not be overwritten next time the package is updated.

I will do that instead then - thank you.

Offline

#34 2013-07-04 22:15:58

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Errors in error.log – possible fixes?

I think even better would be to learn how to use the drop-in configuration stuff that systemd features.  That way, your changes won't be overwritten, but if the default service file gets updates, those changes will be reflected in what you are running.

Offline

#35 2013-07-04 22:41:38

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: Errors in error.log – possible fixes?

WonderWoofy wrote:

I think even better would be to learn how to use the drop-in configuration stuff that systemd features.  That way, your changes won't be overwritten, but if the default service file gets updates, those changes will be reflected in what you are running.

I've wondered about this but what if a change is made which is not compatible with the change you've made? That is, using that functionality silently changes the configuration in ways which may or may not be consistent with my customisation. So I worry somewhat about this option even though I can see the attractions.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB