Open Source Software - has Vendor Participation

 View Only

Check the performance of your Linux server with these commands

By Dale Qualls posted 04-01-2014 09:40

  

The following commands/utilities are installed by default on most Linux systems.  If you do not have one of the commands, use your distributions package installer to add them in.

I would guess that most of the time the things I care about the most on my Linux systems is performance.  If things seem to be lagging a bit I’d like to know what resources are available and if a process seems to be hogging the system.  Here are a few that I use frequently.

The “top” command is typically used to quickly see the processor and memory usage on a system but will also show you the uptime, number of users on the system along with the number and state of the processing running on the machine.  The “top” command also lists the usage of individual processes (as you would see in the Windows Task Manager), sorted, by default, with those using the most processing power at the top of the list.

There are some variations to “top” as well, if you prefer pretty ANSI colors (and who doesn’t), check out “htop”.  This program shows total memory usage and many other details.

If you’re just concerned about the total and available RAM, the “free” command will spit these numbers back at you instantly and in a concise manner.  There is also the “vmstat” command which reports information about processes, memory, paging, block IO, traps, and cpu activity.  It has many switches so do a “man vmstat” to see the flexibility of this utility.

And let’s not forget the all-important “df -h”.  Nothing can slow a server quicker than being out of disk space.  I’ve had this happen on more than one occasion on my security video server and it’s the first thing I check on that particular VM.  Remember too that you can check the size of a directory (including subdirectories) by using “du -h” while in that directory.  Both of these commands have multiple switches available so, as always, do a “man <insert command here>” to see the syntax to use to achieve your desired results.

What commands do you use to check the performance of your Linux systems?  Leave comments and share them with the world.

0 comments
19 views

Permalink