pcyuen98 / covidAngular

0 stars 0 forks source link

R&D - Commands to check resource on Centos #21

Closed nadizeq closed 3 years ago

nadizeq commented 3 years ago

The resources can be classified as:

  1. Disk space
  2. Memory
  3. CPU Utilization
  4. Running processes

- For Resources #1

Using df command where df stands for disk filesystem. Example:

  1. df -h --> Display information in human readable format. Disk space value is displayed in GB and MB

image

  1. df -m --> display in MB

Using du command where du stands for disk usage. Example:

  1. du -h --> Show the size of the folder
  2. du -h --time --> Display the last modification time

fdisk command is used to monitor the partition of the disk and can do delete, create, move and copy disk partition as well. But required root privilege.

- For Resources #2

Using free command to get the overview information on the detail used for computer memory and swap.

Example:

image

Column in the output represent information that is shown in the table below.

image

Pro: Can be easily understood and it provide summation Con: It is not detailed and it only shows the overview

To get more detailed information, is to view meminfo which can be done by typing the command:

image

Other commands: top, htop

- For Resources #3

top

Example output after running top command:

image

- For Resources #4

  1. Running Processes
    • ps

image

To check all process:

image

nadizeq commented 3 years ago

Reference:

Resource #1

Resource #2

Resource #3

Resource #4