Home > other >  CPU load
CPU load

Time:02-03

How to use psutil library CPU load calculation

CodePudding user response:

Under the most good-looking psutil module's source code, analyze what are the methods, the commonly used method, as follows, to get some calculation, combine the line:
[CPU information]
1,
 psutil. Cpu_times () # CPU full information 

2,
 psutil. Cpu_times (). The user # user CPU information 

. 3,
 psutil cpu_times (). Iowait # IO wait time 

. 4,
 psutil cpu_count (#) logical CPU number 

5,
 psutil. Cpu_count (logical=False) # number of physical CPU 

6,
 psutil. Cpu_percent () # CPU utilization 

.

[memory] information
1,
 psutil. Virtual_memory () # memory complete information 

2,
 psutil. Virtual_memory (). The total # all memory 

.

[disk information]
1,
 psutil. Disk_partitions () # partition usage 

2,
 psutil. Disk_usage ('/') # disk utilization 

3,
 psutil. Disk_io_counters (perdisk=True) # disk IO number and read and write information 

.

[network information]
# 1,
 psutil.net _io_counters () to obtain network general IO situation 

2,
 psutil.net _io_counters (pernic=True) # access card IO of 

.

Detailed reference website: http://pythonhosted.org/psutil/

CodePudding user response:

These I know, just want to know how to calculate the CPU load

CodePudding user response:

refer to the second floor geek_puddin response:
these I know, just want to know how to calculate the CPU load

1, could you tell me what is the CPU load?
2, the influence factors of CPU load is what?
3, how to calculate the CPU load?
4, Jmeter, LR is how to calculate the CPU load?
If this a few questions clear, still can't work?
  • Related