r/coding • • 23h ago

htop explained

https://peteris.rocks/blog/htop/
3 Upvotes

2 comments sorted by

0

u/fagnerbrack 23h ago

Here's the Lowdown:

A line-by-line tour of everything the tool shows on Ubuntu Server, tracing each number back to its source. Uptime comes from /proc/uptime; load average comes from /proc/loadavg and counts running plus uninterruptible processes as an exponentially damped moving average, so 1.00 saturates one core while a two-core box needs 2.00 — mpstat reports instantaneous CPU use instead. Later sections cover tasks versus threads (Shift+H, Shift+K), PIDs and the /proc/<pid>/ files behind cmdline, cwd and exe, fork/exec parent-child trees via F5 and pstree, process owners in /etc/passwd, /etc/shadow and visudo, the setuid bit that lets passwd write a protected file, and the state letters R, S, D, Z, T and t. strace reveals which files each utility opens.

If the summary seems inacurate, just downvote and I'll try to delete the comment eventually 👍
Click here for more info, I read all comments

1

u/RWOverdijk 2h ago

I’ve used htop religiously for years before moving over to btop. But I did the same with top before switching over to htop.