Hello,

I’m looking for a reliable way to identify a system startup, something
guaranteed to be unique on every boot.

kern.boottime reflects the system time at boot and is accurate initially, but the man page notes: “The boottime variable holds the system boot time. It
is set from time at system boot, and is updated when the system time is
adjusted with settimeofday(2).”, so it’s not fully immutable.

Is there a better method to obtain a boot reference that is stable and unique for each startup? As example, something like FreeBSD kern.boot_id sysctl.

Thanks,
Ricardo F.

Reply via email to