Install SNMP Service on 1.linux
First step: Install the SNMP service on the company 192.168.100.171 Linux virtual machine.
The second step: get the corresponding value through the nodes in the Host-resources-mib library.
Step three: You can only pass: The 1.3.6.1.2.1.25.1.1.0 node object gets to the system run time and cannot get the value to the other node.
Fourth step: Modify the/etc/snmp/snmpd.conf file
Add a line: View SystemView included. 1
Fifth step: Restart the SNMP service after modifying the configuration.
2.CPU, HDD, Memory utilization Calculation 2.1 CPU Utilization 2.1.1 formula
CPU utilization = (sum of CPU load values/number of processors) *100%
2.1.1 Algorithm (Flow) description
(1) Get the corresponding CPU load value via node: Hrprocessorload (1.3.6.1.2.1.25.3.3.1.2):
(2) There are 4 values indicating that the system has a core number of 4 cores
(3) CPU utilization = (1+1+1+1)/4 *100% = 1%
2.2 HDD Utilization Calculation 2.1.1 formula
Used hard disk size = number of used clusters * size of each cluster
Total hard disk size = total number of clusters in the hard disk * size of each cluster
HDD utilization = (used hard drive size/hard disk total size) * 100%
2.1.1 Algorithm (Flow) description
hrstorageused:1.3.6.1.2.1.25.2.3.1.6
hrstoragesize:1.3.6.1.2.1.25.2.3.1.5
hrstorageallocationunits:1.3.6.1.2.1.25.2.3.1.4
The number of clusters used per partition:
The total number of clusters per partition:
hrstoragesize.31 |
12901535 |
hrstoragesize.37 |
11766514 |
The size of the cluster corresponding to each partition
hrstorageallocationunits.31 |
4096 |
hrstorageallocationunits.35 |
4096 |
hrstorageallocationunits.36 |
1024 |
hrstorageallocationunits.37 |
4096 |
hrstorageallocationunits.40 |
2048 |
HDD Utilization Calculation:
HDD Utilization = (1220045 * 4096 + 57 * 4096 + 39874 * 1024 + 363210 * 4096 + 2181544 * 2048)/(12901535 * 4096 + 1005704 * 40) 96 + 495844 * 1024 + 11766514 * 4096 + 2181544 * 2048) * 100% = 9.98%
2.3 Memory Utilization Calculation 2.1.1 formula
Memory size used = number of clusters used * size of each cluster
Total memory size = Total number of families * size of each cluster
Memory Utilization = (memory size used/total memory size) *100%
2.1.1 Algorithm (Flow) description
Get memory-corresponding information:
hrstorageused:1.3.6.1.2.1.25.2.3.1.6
hrstoragesize:1.3.6.1.2.1.25.2.3.1.5
hrstorageallocationunits:1.3.6.1.2.1.25.2.3.1.4
Hrstorageused.1 |
1463816 number of clusters used |
Hrstoragesize.1 |
Total number of 8045632 clusters |
Hrstorageallocationunits.1 |
1024 size of each cluster |
Memory Utilization Calculation:
Memory Utilization = (1463816 * 1024)/(8045632 *1024) *100% = 18.1
CPU, hard disk, memory utilization under Linux system