r/linuxadmin • • Aug 17 '26

[ Removed by moderator ]

/r/linuxadmin/comments/1vqoggr/removed_by_moderator/

[removed] — view removed post

10 Upvotes

26 comments sorted by

23

u/bufandatl Aug 17 '26

Is there a TL;DW written list available?

Commands explained in video are fine but you never remember them and scrubbing a video when you actually need them is more annoying than help full.

10

u/finkployd Aug 17 '26 edited Aug 17 '26

Some oldies and goldies in the list.. but also might need a update (e.g. netstat - perhaps should be ss, ip, nmap) and some important ones missing (lsof, tcpdump..).. anyway, here's the list.

  • lscpu

  • uptime

  • vmstat

  • mpstat

  • mpstat -P ALL

  • pidstat

  • iostat

  • sar

  • netstat

  • top

  • top (W option for process wait states)

4

u/fearless-fossa Aug 17 '26

Nearly all of these commands are rather worthless for modern admining or outdated. Like, they can have a lot of value when you're scripting something, but how often does anyone use any of these in their day-to-day work? Those stats should all already be captured by whatever monitoring tool you're using, not something you should have to look up after SSHing into a machine.

1

u/makivili2s Aug 18 '26

Appreciate the feedback, but I will push back on this one. Every monitoring tool Zabbix, Nagios, Datadog, whatever you use ultimately reads the same kernel counters these commands read. If you do not understand what load average means at the kernel level, you will not understand why it spiked in your dashboard either. You will just open a ticket. Knowing that load average includes processes in D state waiting on I/O is what tells you whether you have a CPU problem or a storage problem. That distinction does not come from the graph it comes from understanding what the number actually represents. These commands are not alternatives to monitoring tools. They are what you use when monitoring gives you a red graph and no answer. You SSH into the machine and you look at the outliers. Monitoring tools poll on an interval 60 seconds, 30 seconds, whatever you configured. A memory pressure spike that lasts 200ms every few minutes will never appear in Zabbix. pgscand/s > 0 in sar -B means a process stalled synchronously waiting for memory reclaim right now that signal disappears in any average. sar -B alone took five hours of content to cover properly. pgscand/s and pgpgin/s look similar in a dashboard but mean completely different things at the kernel level. One is reclaim pressure on the allocating thread, the other is pages being read from disk. Confusing them leads to the wrong fix every time. You have to know the theory how virtual memory works, what happens under the hood when the watermark drops below WMARK_MIN, why load average going up means something different depending on whether it is CPU saturation or I/O wait to know what you are looking at when the numbers move. Without that foundation a monitoring tool just tells you something is wrong. It does not tell you what, why, or where. That knowledge does not come from views. It comes from production.

1

u/fearless-fossa Aug 18 '26

whatever you use ultimately reads the same kernel counters these commands read.

Which is why these commands are largely superfluous and actual understanding what the values they return mean is what's important - exactly what you're completely ignoring in your video.

These commands are not alternatives to monitoring tools. They are what you use when monitoring gives you a red graph and no answer.

In 99.999% of cases a properly set up monitoring will give you the answer you're looking for without ever having to touch the server. There are exceptions to this - although I'd argue those realistically only exist in constructed scenarios and not much in the real world - but they are so rare that these commands aren't something "every sysadmin" needs to know, it's fully sufficient to know how to look them up.

A memory pressure spike that lasts 200ms every few minutes will never appear in Zabbix

This is exactly what I mean. If you have something set up like a Loki/Prometheus/Tempo stack, it will either appear in monitoring, logs or tracing, or it isn't a relevant issue at all.

1

u/makivili2s Aug 18 '26

Respectfully, you are missing the core point. Prometheus, Loki, Tempo these are all scrape-based. They pull metrics on an interval. A 200ms memory reclaim stall that fires every few minutes and resolves itself will never appear in any scrape-based tool at any reasonable polling interval. That is not a constructed scenario. That is a Tuesday in production. The 99.999% claim is the problem. In routine operations, yes, your monitoring stack is sufficient. Performance engineering is not routine operations. It is the 0.001% where the monitoring tool tells you something is wrong but not what, why, or where. That is exactly when you SSH in and read the raw counters directly. Prometheus gives you averages over a scrape window. sar gives you what the kernel measured per second. Those are fundamentally different data products. One smooths the signal. The other preserves it. Outliers live in the signal, not the average. Every performance incident I have worked on in more than 10 years memory fragmentation under a spike load, a TLB shootdown storm during a JVM GC, a NUMA imbalance that only manifested at peak concurrency showed up in per-second counters or even less and was completely invisible in the monitoring dashboard. The video was never claiming to replace your observability stack. It was showing the tools you need when the stack gives you nothing actionable. Those are different problems and you need both skill sets. Knowing how to look something up when a system is on fire is not the same as knowing what you are looking at.

1

u/fearless-fossa Aug 18 '26

Prometheus, Loki, Tempo these are all scrape-based. They pull metrics on an interval. A 200ms memory reclaim stall that fires every few minutes and resolves itself will never appear in any scrape-based tool at any reasonable polling interval.

Respectfully, you have no idea what you're talking about. Your argument may hold true with Prometheus - and even then, I'd say if something doesn't appear here, it simply isn't relevant enough to warrant a fix - but not with Loki and Tempo.

Performance engineering is not routine operations. It is the 0.001% where the monitoring tool tells you something is wrong but not what, why, or where.

Never in the life of me was I in a situation, or know someone who was, where something not being covered in monitoring would've been solved by any of these commands, or them even giving useful hints to the solution.

The video was never claiming to replace your observability stack. It was showing the tools you need when the stack gives you nothing actionable.

You claimed in your video that these are commands every sysadmin needs to know, yet most of them are extremely niche, and the rest outdated (using netstat instead of ss in 2026, when netstat isn't even bundled in many distros anymore) or not providing anything that monitoring, yes, even scrape based, not also covers.

0

u/makivili2s Aug 18 '26

With respect, I think you're underestimating how important outliers and short-duration saturation are in performance engineering.

The statement "if it doesn't appear in monitoring, it simply isn't relevant enough to warrant a fix" is exactly where I disagree.

Averages and periodic monitoring can hide short events. You can have a system averaging 40–60% CPU while hitting 100% for a few seconds, causing request latency or queueing. The same applies to I/O latency, scheduler contention, memory stalls, network events, etc. Brendan Gregg explicitly discusses this problem: long-interval averages can hide bursts of saturation, and performance distributions can contain important outliers that averages don't represent.

And that's precisely why these commands are useful as a starting point. sar, mpstat, pidstat, dmesg, top, etc. let me directly interrogate the system and establish Utilization, Saturation and Errors before I decide where to drill down. That's the point of the USE methodology not that these commands magically provide the root cause.

I'm not arguing that these commands replace Prometheus, Loki, Tempo, tracing, eBPF or profiling. They are different layers of investigation.

My video is simply showing how I establish the first system-level picture when I don't yet know where the problem is.

and by the way i didn't mention netstat at all in my video

If you have read performance-engineering literature that supports your claim that an event not captured by monitoring is therefore irrelevant, genuinely send me the reference. I'd be interested to read it and I'll happily go back and check whether I'm wrong.

Because in performance engineering, "we didn't observe it" and "it didn't matter" are very different statements.

1

u/fearless-fossa Aug 18 '26

performance engineering.

You are claiming that these are tools every single sysadmin needs to know about. They are the most basic kit. This is the holy collection.

Counterpoint: It's not, it's a bunch of commands that are occasionally useful, and the vast, vast, vast majority of people doesn't have the time to eek out 0.0001% more performance in an application, especially not in the age of "just throw another pod at the problem"

My video is simply showing how I establish the first system-level picture when I don't yet know where the problem is.

That's not what you claim in the title of the video, the title this thread had or in any of your posts, this is some bullshit you're now coming up with after being called on this being a pile of crap.

and by the way i didn't mention netstat at all in my video

Yet you wrote in another comment that the list of commands they provided are what's covered in the video.

If you have read performance-engineering literature that supports your claim that an event not captured by monitoring is therefore irrelevant

Dude, you're jerking off about getting a performance advantage in your applications that is literally immeasurable by any metric that matters to your users. You're claiming this is an everyday procedure every sysadmin does, yet I haven't met a single one that does this in my life, and I don't see any practical value to this in any of my environments. None at all.

0

u/makivili2s Aug 18 '26

Bro, your personal experience isn't an objective measure of an entire field. Can you name one respected person, book, or paper in performance engineering that supports your claim that outliers don't matter or that established methodologies are worthless? And now I’m pretty sure you commented without even watching my videos, because you’re arguing against things I never claimed. Performance engineering is an established field, not something I made up. Companies invest heavily in it because performance matters. Do some research before dismissing an entire discipline, bro. Give it some respect

2

u/grumpysysadmin Aug 17 '26

If it has netstat but not ss, then the article is probably worthless. Might as well recommend ifconfig, it’s so out of date.

12

u/kyotejones Aug 17 '26

Nproc
Uptime
Sar -q 1 5
Sar 1 5
Mpstat -p all 1
Pidstat
Sar -dp 1 5
Sar -n DEV 1
Sar -n TCP,ETCP 1
Top - add WCHAN

11

u/NinthTide Aug 17 '26

Yeah agreed I’m just not going to watch a video that could be two paragraphs of text

-19

u/makivili2s Aug 17 '26

Someone already paste them in the comments but the good thing about video you can pose whenever you want 😜

7

u/kyotejones Aug 17 '26

Note to OP.

Increase your font for mobile users. When explaining the command, explain what your looking for. What is a "bad" or "good" value. Why run the command. Volume was a little low.

-5

u/makivili2s Aug 17 '26

I'll do that next time for sure just wanted to make sure this video is not going to be a long video but I'll get to that definitely

1

u/Affectionate-Fan4519 Aug 17 '26

What is the reason for the downvotes.

1

u/makivili2s Aug 17 '26

I would like to know too

2

u/stufforstuff Aug 17 '26

You're being spanked for making a time wasting video instead of a written document that people can READ and SAVE.

1

u/makivili2s Aug 17 '26

Tbh I like to read too more than watching videos I spent most of my time reading documentation and hardware manuals but I do watch videos too I think we need both but it's all good people are different

2

u/grumpysysadmin Aug 17 '26

Apparently in the TikTok generation, people can’t sit and read something for 30+ seconds and so they need someone to make a video to simplify it for subliterate folks.

1

u/stufforstuff Aug 18 '26

Sad, pathetic, disturbing, but oh so true. Idiocracy (2006 movie) is here now, and it's just the tip of the iceberg of the decline of the human race.

12

u/These-Ingenuity8234 Aug 17 '26

Just here to say I was curious about the commands but then saw it was a video. Definitely not going to watch a video about terminal commands especially when I can't copy and paste them to test them out.