Is there any attribute (sign) whether system booted after reboot commnd or power on

is there any attribute (sign) whether system booted after reboot command or power on

Don't think so, you could create one though, at least on x86, and removable storage devices, where common writes aren't an issue.

1 Like

well there is away to make a script that will make a record befor reboot command and on power on check this record and delete
But i was thinking maybe there somthing in system alredy so i can just use that sign

Openwrt minimizes the amount of writes to the storage media, it would surprise me if there was, but I'm only man guessing ,)

yeah that is probaly right

Well, the uptime should be an indicator (and there's even a collectd plugin providing uptime graphs, if installed and configured to log to permanent storage).

Likewise remote syslog would allow grepping for reboots (and distinguish intentional ones from crashes or powerlosses).

Not sure if it fits your needs, but what I do is to change LED colors in /etc/rc.local, so I know when the boot process has reached final stage. It doesn't mean that the system is fully operational as, for instance, radar detection takes some time, but works for me.

1 Like

but there is no difrence in uptime whether it was rebooted by command or by power

I think I saw something about this in u-boot. If your device uses u-boot, take a look at the environment variables.

1 Like

x86 uses grub.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.