Skip to content

Add modern method get boottime modern Linux kernel - #405

Open
GermanAizek wants to merge 1 commit into
Atoptool:masterfrom
GermanAizek:speedup-getboottime-modern-kernel
Open

Add modern method get boottime modern Linux kernel#405
GermanAizek wants to merge 1 commit into
Atoptool:masterfrom
GermanAizek:speedup-getboottime-modern-kernel

Conversation

@GermanAizek

@GermanAizek GermanAizek commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

The old method is left in case /proc/stat doesn't work, but modern kernel advises against using this hack as it causes an expensive fork() system interrupt.

The fork() call requires the kernel to create a complete copy of the process's address space (using the Copy-on-Write mechanism), allocate new data structures (PIDs, descriptors), initialize page tables, etc. This is a heavy operation that consumes CPU and memory resources.[1][2]

References:

The old method is left in case /proc/stat doesn't work, but modern kernel advises against using this hack as it causes an expensive fork() system interrupt.

References:
- https://www.linuxhowtos.org/System/procstat.htm
- https://man7.org/linux/man-pages/man5/proc_stat.5.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant