Uh oh!
There was an error while loading. Please reload this page.
gh-151929: Get boot identifier and uptime in test.pythoninfo - #152127
Conversation
vstinner
commented
Jun 24, 2026
Example of GitHub Action CI jobs logging the 3 keys (boot_id, machine_id, uptime):
Android (x86_64) logs boot_id and uptime:
|
vstinner
commented
Jun 24, 2026
Oh, it got two network erros: and |
vstinner
commented
Jun 24, 2026
Draft code to get the uptime of a Linux container: importtimeimportdatetimeimportosjiffies=os.sysconf("SC_CLK_TCK")
withopen("/proc/1/stat") asfp:
line=fp.readline()
line=line.rpartition(')')[-1]
parts=line.split()
start_time=int(parts[22-3])
seconds=start_time/jiffiesuptime=time.clock_gettime(time.CLOCK_BOOTTIME)
print(str(datetime.timedelta(seconds=uptime-seconds))) |
vstinner
commented
Jun 24, 2026
"Emscripten / build and test" logs only the machine_id: |
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15. |
GH-152134 is a backport of this pull request to the 3.15 branch. |
Sorry, @vstinner, I could not cleanly backport this to |
GH-152135 is a backport of this pull request to the 3.14 branch. |
GH-152137 is a backport of this pull request to the 3.13 branch. |
vstinner
commented
Jun 25, 2026
Oh, I'm surprised FreeBSD logs the uptime and the machine_id! It seems like the |
Uh oh!
There was an error while loading. Please reload this page.