- Nikhil Bhaskar
- May 16, 2021
To perform computer system for proper administration and monitoring.
How to monitor system Processes.
One of the most common tools to check the resource utilization of processes is “top“.
The top portion has some system statistics, including load averages for last 1 minute, 5 minutes, and 15 minutes. It also shows memory and swap usage and count of various process states.
The bottom portion has every process on the system and organized by the top users of resources. This list is updated in real-time.
Although “top” is included in almost every distribution by default and an improved version of top which called “htop” is available for download from most repositories. It will show the real-time live processes running and working.
To install htop on Ubuntu, type the following:
sudo apt-get install htop
Here are some keys that will help to use htop more effectively:
- M: Sort processes by memory usage
- P: Sort processes by processor usage
- ?: Access help
- k: Kill current/tagged process
- F2: Setup htop. You can choose display options here.
- /: Search processes
How Do I Find Out How Much Disk Space I Have Left?
For a quick overview of how much disk space have left in drives we can use “df” command.
If we want to see the total disk space available on all file systems, we can pass the “–total” option. This will add a row at the bottom with summary information:
If want see the output of the disk fragmentation in a human readable so you can use the command.
How to find the space of the memory and its usage.
The easiest way of finding out the current memory usage on your system with “free” command.
When used without options the output looks like below:
If need to see the output in human readable then use -h parameter.
To display in a more readable format we can pass the “-m” option to display the output in megabytes:
Using these tools we will be able to monitor server from the command line. There are many other utilities that perform simple monitoring operations.