Jump to content

16 Linux server monitoring commands you really need to know

  • Please log in to reply
No replies to this topic

#1 OFFLINE   securitybreach


    CLI Phreak

  • Forum Admins
  • 23,422 posts

Posted 03 March 2017 - 10:47 PM


If you want to know what's going on with your Linux server, start with these Linux monitoring commands.

Want to know what’s really going on with your server? Then you need to know these essential commands. Once you’ve mastered them, you’ll be well on your way to being an expert Linux system administrator. Sure, you can use a GUI program to pull up much of the information that these shell commands can give you, depending on the Linux distribution. SUSE Linux Enterprise Server and openSUSE, for example, have an excellent graphical configuration and management tool, YaST. And there are universal tools, such as Webmin and cPanel, which can be used on any Linux server. However, it’s a Linux administrator truism that you should run a GUI on a server only when you absolutely must. That’s because Linux GUIs take up system resources that could be better used elsewhere. So, while using a GUI program is fine for basic server health checkups, if you want to know what’s really happening, turn off the GUI and use these tools from the Linux command shell. This also means you should start a GUI on a server only when it’s required; don’t leave it running. For optimum performance, a Linux server should run at runlevel 3, which fully supports networking and multiple users but doesn’t start the GUI when the machine boots. If you really need a graphical desktop, you can always get one by running startx from a shell prompt.

The iostat command shows in detail what your storage subsystem is up to. You usually use iostat to monitor how well your storage subsystems are working in general and to spot slow I/O problems before your clients notice that the server is running slowly. Trust me, you want to spot these problems before your users do!

meminfo and free
Meminfo gives you a detailed list of what’s going on in memory. Typically you access meminfo’s data by using another program such as cat or grep. For example, cat /proc/meminfo , gives you the details of what’s going on in your server’s memory at any given moment. For a quick “just the facts” look at memory, you can use the free command. In short, free gives you the overview; meminfo gives you the details.

The mpstat command reports on the activities of each of the available CPUs on a multi-processor server. These days, thanks to multi-core processors, that’s almost all servers. Mpstat also reports on the average activities of all your server’s CPUs. It enables you to display overall CPU statistics per system or per processor. This overview can alert you to possible application problems before they get to the point of annoying users..............
Posted ImagePosted Image Posted Image
CNI Radio/G+ Profile/Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users