Every cronjob that I run logs an error.
* * * * * /usr/bin/wireguard_watchdog
leads to:
cron.err crond[9024]: USER root pid 9184 cmd /usr/bin/wireguard_watchdog
This seems to have been an issue for over 14 years Not that it's super important, but running a cronjob every minute trashes the logfile.
1 Like
Ramon
October 13, 2024, 9:44am
2
I know. Install syslog-ng
and filter that text!
1 Like
To be clear (since others haven't clearly noted it yet), the normal logging level in OpenWrt is Err
.
There isn't an error.
Nevermind, see
a result, BusyBox components (including cron) in syslog write all messages with the error level.
Also
I think I found the line you are referring to, on line [958 here].
I guess I can try patching it so that line is removed just for testing.
(https://git.busybox.net/busybox/tree/miscutils/crond.c )
log8("USER %s pid %3d cmd %s",
Looking into it further, setting log level of 9 probably did not make any difference, as it only has support for 5, 8 and 9 (possible bug on level 5, as it is actually set to 4). This is on lines 188 to 210.
I might be able to make some improvements here in the fo…
hello forum,
wireguard_watchdog present but crond.err
all scheduled task are displaying crond.err
like: */5 * * * * /usr/bin/wireguard_watchdog
Wed Jun 29 10:40:00 2022 cron.err crond[1493]: USER root pid 4503 cmd /usr/bin/wireguard_watchdog
idea of what could be causing this issue?
Model
TP-Link Archer C2600
Architecture
ARMv7 Processor rev 0 (v7l)
Target Platform
ipq806x/generic
Firmware Version
OpenWrt 21.02.3 r16554-1d4dea6d4f / LuCI openwrt-21.02 branch git-22.167.28411-ee…
2 Likes
It ain't a bug, it’s a feature.
Strange feature if you as me but I don’t think anyone really want to change it, mostly because the never ending worthless small flash routers must live on!?
2 Likes
If it ain't an error, why does it say error? Sounds like an error to me
1 Like
Good question.
That's simply the "logging level" in *nix-like systems. I'll have to search for the discussion where a developer noted there's only a few other options (e.g., "warn"). Other options imply severity.
Another option is to build OpenWrt firmware where it's capable of those log levels.
2 Likes
That's weird. Most systems allow for an "info" log level.
2 Likes
Ramon
October 14, 2024, 6:28pm
9
donutratgolf:
info
Question: would a crash or firewall warning (for example) be considered info?
The post was literally one down from what I linked:
The FEATURE_SYSLOG_INFO option appeared in BusyBox v. 1.31.0. But in OpenWRT in order to save memory this option is disabled by default: master , openwrt-21.02 branch . As a result, BusyBox components (including cron) in syslog write all messages with the error level.
1 Like
stangri
October 14, 2024, 7:40pm
11
The reason I switch to micrond
if I need to use cronjobs on OpenWrt.
1 Like
That seem to be a solution with busybox settings, but it requires building from source code.
2 Likes