Does OPAL keep a local running log of events?

Does OPAL keep a local running log of events that could be used to determine why it went off-line? (i.e. powerloss, ethernet unplugged, Wi-Fi uplink loss, button press, application failure)

What is local disk storage on an OPAL? USB stick?

Is it really stored in flash? Continually writing log data would eventually fry your flash.

The default seems to be a RAM buffer. A few times I have modified my:


to do logging to a USB drive to catch errors that are lost due to a reboot.

This is from @alzhao

1 Like

It depends on the log, I would say. Some of the logs are definitely inside the flash memory.

@eric seems to be right. Some logs (like the nginx log, which is not really useful anyway) are located on the flash. The important logs are RAM only :frowning:

Sorry for my missknowledge here.

This is OpenWrt Linux. The logd daemon is responsible for it on a stock OWRT device. They can be shipped off (let’s say near real time) to a remote server/DB for analysis… over a VPN, of course, given the nature of their contents.

Interface link up/down/loss/events inc. Wi-Fi, are already logged by default. Button press can be depending on the specific device but custom scripts are required*. Application issues can be, provided the approp. monitoring agent software & augmentation via custom scripts (we’ve discussed that aspect a bit already re: ‘auto-heal’ functionality).

Power outage events aren’t recordable by default as, well, the device would be off but I intended to bring this aspect up with 'ya anyway in a future query. By its default configuration the device would lose that set of logs (they’re not flushed to a disk on a stock config)… but if a UPS is connected to the OWRT device, said device could operate as controller that issues power down/up[ commands to any subnet attached equipment. The controller is going to comparably ‘sip’ power fr the UPS than a Xeon server w/ 10 drives attached for instance, so automating the full rack’s restoration when AC is stable is within the realm of possibility.

It’s how I had my pair of 2U Xeons ‘beasts’ power up/down automatically when seasonal storm blackouts rolled through some years ago. I’m fond of Eaton’s ‘PowerWare’ lineup; they openly advertised Linux compatibility on certain models. I think they’ve changed their naming convention since then so specific model numbers would have to be checked. They still advertise Red Hat Enterprise Linux support so that’s a positive sign.

So in short: if a properly supported UPS is attached to a properly configured GL/OWRT device, logs can include AC power events along with almost anything else & sent to wherever they need to be… like a DB via VPN.


You’re right that it does depend on the application; a badly configured ipk fr Upstream or user error may well end up trashing the flash.

Baseline OWRT writes system logs to a RAMdisk:

root@slateax:~# ls -l /var/log
drwxr-xr-x    4 root     root         120 Jan 16 18:25 .
drwxrwxrwt   31 root     root         900 Jan 25 17:53 ..
-rw-r--r--    1 root     root           0 Jan 16 18:24 lastlog
drwxr-xr-x    2 root     root          60 Jan 16 18:24 nginx
drwxr-xr-x    2 root     root          40 Jan 16 18:25 samba
-rw-r--r--    1 root     root           0 Jan 16 18:24 wtmp
root@slateax:~# ls -l /var
lrwxrwxrwx    1 root     root           3 Sep  8 03:17 /var -> tmp
root@slateax:~# ls -l /tmp/log
drwxr-xr-x    4 root     root         120 Jan 16 18:25 .
drwxrwxrwt   31 root     root         900 Jan 25 17:53 ..
-rw-r--r--    1 root     root           0 Jan 16 18:24 lastlog
drwxr-xr-x    2 root     root          60 Jan 16 18:24 nginx
drwxr-xr-x    2 root     root          40 Jan 16 18:25 samba
-rw-r--r--    1 root     root           0 Jan 16 18:24 wtmp

Powering off loses the logs on a default, OOTB OWRT device.

Great info but the UPS is not integrated so it would have to notify the router to shut down - like a PI Jiuce does. Could a UPS with signaling to the router be setup with an Opal?

Also, is there a risk of corrupting the Opal OS if power is lost without UPS?

Signalling can be handled over Cat. 5E or USB, UPS model dependant, of course. Given all embedded Linux devices are normally short of eth ports, I’d be more looking to use USB. It’s not much of a difference setting up either way in my experience.

I see semi-regular reports of ‘bad blinking lights’ indicating firmware/flash corruption for all models here on this forum. It’s not unheard of. There are ways to check the filesystem integrity on device boot. Attached storage devices (eg: USB disk, TF/SD card) are more susceptible than the onboard flash. At a minimum I would ensure a high quality surge protector. I use a Tripp Lite ULTRABLOK428 these days.

Tripp Lite also builds enterprise class, Linux compatible UPS’.

If you’re familiar with the RPis’ capabilities when it runs Linux, you’re probably already familiar w/ most OWRT based embedded devices capabilities… model dependant, as all things in life, of course.

Fun fact: OWRT runs on the RPi.


1 Like

Can an OPAL take signaling through the USB-C power port or is it just for power?

That’d be just for power delivery. Excuse my presumptions but I think you’re going to be looking to the Slate AX if you’re seeking a USB port (eg: for UPS signalling) & uSD slot (to write log entries before passing them off to a remote server).

Linkback for ref:

1 Like