Cron and sysstat, anyone got these to work collecting data?

Hello,

Anyone get the sysstat package to work collecting data?
The OpenWRT version doesn't seem to follow any of the tutorials I find online.
cron is also different?

Do I want to do this on flash memory chips?
There is talk logging "wears out" the flash chips?

I don't use sysstat, so I can't help you there.

What version are you using?

ubus call system board

Not on the internal flash storage.

Yes. The internal flash memory inside most consumer routers has very limited write cycle counts before it will become damaged/worn out. All flash memory (including SSDs and USB flash drives) will eventually wear out, but there are different grades of storage write-cycle longevity for different purposes. Routers and other embedded devices only need to be able to be written to relatively infrequently (i.e. config changes and the like), rather than general purpose storage.

If your device has a USB port or an SD card slot, you can write to that media. Yes, eventually that may fail, but it's easy and cheap to replace.

Have you looked at the LuCI statistics package, which can be configured to collect diverse data from your system? CPU, memory, disk usage, network, temps, etc.

Yes, OpenWrt's default cron is supplied by busybox, and hence has some limitations if you're accustom to full gnu cron. Most notably the @macros are missing in busybox, maybe other stuff I don't know about

No, you don't want to log to flash chips in general. Most of the packages, like the luci-app-statistics package mentioned above, default to a configuration that writes to /tmp/... which is in RAM (and hence disappears on reboot). You can configure most of them (including App Stats) to write to anywhere you want, typically an external USB drive (thus avoiding data loss on reboot).

LuCI App Statistics was recently enhanced to stash it's RAM storage on flash during sysupgrades (and you can augment it with a cron job to do the same stashing to reduce data loss if you have a power failure).

Thanks for the replies, yes, I have luci statistics.
Just trying different things.
I think I really need to learn SNMP.

1 Like