Linux Free command and top utility

Both the free command and the top utility are useful tools for monitoring system resources on a Linux system.

The free command displays information about the system's memory usage, including the total amount of memory available, the amount of memory currently in use, and the amount of memory that is free. It also shows information about the system's swap usage.

The output of the free command looks like this:

vbnet
total used free shared buff/cache available Mem: 2042740 625048 658456 4632 758236 1295360 Swap: 1048572 0 1048572

Here, you can see that the system has 2,042,740 kilobytes of memory installed, and that 625,048 kilobytes are currently in use, while 658,456 kilobytes are free. The shared column shows the amount of memory being used by shared memory segments, while the buff/cache column shows the amount of memory used by the system's buffer cache. The available column shows the amount of memory that is available for new processes to use.

The top utility is a real-time system monitoring tool that shows information about the system's processes, including their CPU usage, memory usage, and other information. It is useful for identifying processes that are using a lot of system resources, and for monitoring system performance over time.

The output of the top command looks like this:

The output of the top command looks like this:

yaml
top - 16:47:27 up 9 days, 2:23, 1 user, load average: 0.00, 0.00, 0.00 Tasks: 129 total, 1 running, 128 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st MiB Mem : 1989.9 total, 325.6 free, 1188.6 used, 475.7 buff/cache MiB Swap: 1024.0 total, 981.8 free, 42.2 used. 488.4 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1 root 20 0 168844 12328 8900 S 0.0 0.6 0:09.92 systemd 2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd 3 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_gp 4 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_par_gp 5 root 20 0 0 0 0 I 0.0 0.0 0:00.00 kworker/0:0-eve

Comments

Popular posts from this blog

Introduction to Computer

History of Computer

Computer Generation