psutil.boot_time() ... doesn't ?
R.Wieser
address at not.available
Fri Nov 8 11:02:27 EST 2019
Dennis,
> Well... If it is the last file written during shutdown, it would be
> the "last file system modification time" <G>
Yep ... up until the next hours cronjob overwriting it ...
Currently I've got a (very) small init.d shellscript which copies the
contents of that file into another one - which only gets altered on next
boot (could not do it in the fake-hwclock script, as that gets first called
when the filesystem is still in read-only mode).
> The only time it would not be "last modification time" would be if
> the system had the power pulled, and was not shut down cleanly.
Only the first hour (not sure if that is clock or uptime ...), than it would
be overwritten.
I've also thought of letting the fake-hwclock write my file on shutdown too.
But a bad shutdown would cause problems there.
> Of course, in that situation, one has the potential of having a corrupted
> file system -- and anything goes...
Yup. And in such a case I do /not/ want to have to remember my programs
little quirk ... :-(
Regards,
Rudy Wieser
More information about the Python-list
mailing list