r/linuxquestions • u/AaronAtWorkAccount • 14d ago
Advice Command that will give you the current state of your Linux box.
I see frequently posts of people who create programs to show the state of there Linux box. Usually contains, network traffic, CPU usage, memory usage and more. They all run off the command line. I usually just scroll past them. I starting to think they may be useful to me. Now since I am looking for them, I can not find a single one. I am looking for recommends. Some thing I can have running on a terminal all the time.
47
Upvotes
22
u/Guggoo 14d ago
You probably want something like btop
17
u/Dolapevich Please properly document your questions :) 14d ago edited 12d ago
So... you might be thinking about
neofetch( I am told it isfastfetchnowadays ) that shows a nice output, but that is usually for eye candy.You need to think in terms of resources. CPU, RAM, DISK, NETWORK are the main resources. There are different commands to inspect those. And some that intergrate many in a single view.
Here is a cheat sheet with commands to inspect different parts of the system: https://personales.unican.es/corcuerp/linux/resources/LinuxCommandLineCheatSheet_1.pdf
Also, since unix/linux has ~60 years of history, some of them might be deprecated, but still refered in old documentation.
Case in point, the original venerable BSD tools to configure and inspect network configuration were arp, ifconfig, netstat, rarp, nameif and route.
Those tools were absolutely superseeded by the current generation: ip, tc, and ss.
8
u/Mister_Pibbs 14d ago
I like htop
8
u/treuss 14d ago
with dmesg, top and df you'll get a pretty good survey over your system's health. Especially top is very underrated. One short glance to the three sysload numbers on the top right corner usually shows enough information to device if further checks are necessary. Check out its man page, it's totally worth it.
vmstat, ss and iostat are very helpful too if you cannot find the reason for some trouble.
I'm not a big fan of fastfetch, neofetch etc., since you won't find them on every machine and sometimes you're probably not even able to install them on a machine in trouble.
6
u/Dashing_McHandsome 14d ago
vmstat, mpstat, sar, iostat, dtrace, bpftrace
4
u/valgrid 14d ago
btop
4
u/Robold_12 14d ago
Many are posting the output from fastfetch in Terminal. It can be installed with sudo apt install fastfetch if you are on Debian or similar.
3
u/ziggyw00t 14d ago
I use glances pretty often.
2
u/aieidotch 14d ago
i like https://github.com/alexmyczko/ruptime with multiple computers
2
u/scorp123_CH 14d ago
I always leave an instance of btop running in a terminal ... old habit. Plus it looks cool. π
2
u/trailhounds 13d ago
sar, vmstat, or dstat are the best that are most likely installed already. All of the "*top"s are sort of interactive.
1
u/Rincewindcl 14d ago
Bpytop
1
u/NeedleworkerLarge357 14d ago
Btop is great out of the box, htop can be configured quite well. Atop shows a ton of helpful information that will overwhelm you if you're no expert, but it also has a nice overview with "atop -B". Those are the tools I usually use.
1
u/xRolox 14d ago
atop is a nice continuous and present state monitor
1
u/truthinessembargo 14d ago
Bottom
1
u/The-Princess-Pinky 14d ago
I use nmon. It shows everything you need quite clearly. It can also be run in batch mode to create a file that is read by the nmon analyzer, which creates graphs for you.
1
u/Prestigious-Bet-6534 14d ago
gotop is nice, it has graphs for cpu/memory usage and also displays network, disks and temperatures
1
u/Kokumotsu36 14d ago
fastfetch, btop, You can even setup waybar or quickshell to have all the info you need in there without the need for a Term
1
u/SadServers_com 13d ago
- top/htop/atop gives you a good view of processes, memory and CPU.
- for disk space: df -h, and iotop for disk i/o.
- for networking you can use ss for example
A cheatsheet: https://docs.sadservers.com/docs/troubleshooting/linux-server-review/ , you can practice this problem of "finding the current state of the Linux box" with this hands-on scenario: https://sadservers.com/scenario/linux-server-review
1
u/libben 13d ago
You also could look into Daves TMOG.org I like it alot.
1
u/Y-L-S-E 13d ago
If you want to see how much is being used on all fronts (to see how borked your shit is) btops pretty nice
1
u/Dearth87 13d ago
rigtop:
https://github.com/akivajp/rigtop
1
u/PortableShell 13d ago
I don't have any command-line suggestions, but some years ago I did write a small X11 app that creates a thin panel at the top (or bottom) of your screen and shows some information about your system's memory usage, CPU load, network activity, and battery level.
You can find it here:
https://github.com/yetanothergeek/says
1
u/Super-Revolution-433 11d ago
Htop is nice for something quick and easy out of the box. If you want something specific to you then I'd look into install quickshell and making a display panel that shows what you want
1
u/jlrueda 9d ago
maybe the "command line flight recorder" can hekp you: https://github.com/jlruedab/clifr
1
u/jlrueda 9d ago
top is the Linux default command to see the current state. If you ever want to see the state from any past moment you can use clifr:
clifr --at "PAST_MOMENT" top
clifr
0
u/loligans 13d ago
Anything that shows: CPU, RAM, MEM, DISK, and Security? With how AI has been uncovering vulnerabilities left and right, is there a tool that scans your device for vulnerabilities of known SVEs?
-5
u/OutrageousCrab9224 14d ago
No such thing
-3
u/bagpussnz9 13d ago
Claude, my laptop fans a bit noisy. Fix it please...... Thank you