Host status (check resource usage, check network usage)

1. Check resource usage

[1] You can use the top command to view the usage of cpu and memory. The task manager similar to windows
refreshes every 5 seconds by default
. Syntax: topCtrl + c to exit
insert image description here
insert image description here

2. Disk information monitoring

[1] Use the df command to view the disk information usage
Syntax:df [ -h ]

  • Display in a more user-friendly unit
    insert image description here
    [2] Use iostat to view cpu and disk related information
    Syntax:iostat [ -x ] num1 num2

  • Options: -x show more information

  • num1: number, refresh interval, num2, number, refresh several times

  • insert image description here

3. Network status monitoring

You can use the sar command to view the relevant statistics of the network (the sar command is very complicated, and it is only used for statistical network here)
Syntax:sar -n DEV num1 num2

  • Options: -n to view the network, dev means to view the network interface
  • num1 Refresh interval (if you don't fill it, you can check it once), num2, the number of times you want to check it (if you don't fill it, it will be countless times)
    insert image description here

Je suppose que tu aimes

Origine blog.csdn.net/weixin_46268244/article/details/129290990
conseillé
Classement