psutil.boot_time() ... doesn't ?

R.Wieser address at not.available
Thu Nov 7 04:23:19 EST 2019


Dennis,

> Which is probably... last file system modification time

Nope.  Its from a file it saves at shutdown, and which gets updated once an 
hour (I also thought of that one, but the once-an-hour update threw a wrench 
into it).

> There is no way for a freshly booted system to differentiate between
[snip]

True.   But
1) thats not likely the moment I will be looking at the "has the time been 
updated"
2) The same goes for having NTP (or any other such "wait for it ..." method) 
update the clock.

> Except that "last boot time" is really "booted /n/ minutes ago
> from /now/".

Than thats the point where we disagree.   Boot time is not just a gadget for 
the user to look and gawk at, it has (or /should/ have) its usages.   Like 
allowing someone to determine which files have been altered since last boot.

Besides, all you now get is uptime, just presented differently.  :-(

> http://man7.org/linux/man-pages/man5/crontab.5.html#EXTENSIONS
>
> The main concern is just how soon after reboot that @reboot executes.

Yup.  And in which order the different programs and scripts are ran ....

> https://www.cyberciti.biz/faq/linux-execute-cron-job-after-system-reboot/
> has an example with a sleep...

Thanks for those links.  I'll have a look at them.

Regards,
Rudy Wieser




More information about the Python-list mailing list