借助gopsutil库,获取机器相关信息
共 46092字,需浏览 93分钟
·
2023-08-31 22:48
使用github.com/shirou/gopsutil/disk这个库,如何获取机器下不同磁盘分区的内容
使用 github.com/shirou/gopsutil/disk 库获取机器下不同磁盘分区的内容,可按如下:
import "github.com/shirou/gopsutil/disk"
//调用 disk.Partitions() 函数获取机器下所有磁盘分区的信息:
partitions, err := disk.Partitions(false)
if err != nil {
// 处理获取磁盘分区信息的错误
}
该函数返回一个 []disk.PartitionStat
类型的切片,其中每个元素包含一个磁盘分区的信息,包括分区设备名、分区挂载点等。
遍历 partitions 切片,对于每个磁盘分区,调用 disk.Usage() 函数获取该分区的使用情况:
for _, p := range partitions {
usage, err := disk.Usage(p.Mountpoint)
if err != nil {
// 处理获取磁盘使用情况的错误
}
// 处理 usage 变量,获取该磁盘分区的使用情况
}
该函数返回一个 *disk.UsageStat 类型的结构体,包含该磁盘分区的使用情况,如总容量、已用容量、可用容量等。
通过以上步骤,即可获取机器下不同磁盘分区的内容
df -h这里的Use%,用的是进一法而不是四舍五入
172936/14318640 = 0.012077683355
用 disk.Usage(”/media “) 得到的的使用比例为: 1.274563%
准确一些,但也不完全一致..
可参考 解决df容量显示不准确的问题
怎样看出是tf卡还是emmc
在 Linux 中,可以使用以下命令来查看 SD 卡的信息,从而判断是 TF 卡还是 eMMC:
cat /proc/cpuinfo
在输出中查找 "mmcblk" 字段,如果值为 0,那么是 eMMC 存储,否则是 TF 卡存储。例如,如果输出为 /dev/mmcblk1,则是 TF 卡;如果输出为 /dev/mmcblk0,则是 eMMC 存储。
监测某个进程(程序)的CPU等资源的占用
在瞬间高并发,goroutine结束后的资源回收问题 提到了
xiaorui.cc的验证代码:
import psutil
import time
p = psutil.Process(26444) # 改成你自己的 pid 就行了
while 1:
v = str(p.cpu_percent())
if "0.0" != v:
print(v, time.time())
time.sleep(1) 这段代码什么意思
这段代码用 Python 的 psutil 模块监控指定进程的 CPU 占用率。
通过 psutil 模块获取指定进程的 Process 对象,其中 26444 需要替换为目标进程的进程 ID(PID) 进入循环,每隔 1 秒钟获取一次进程的 CPU 占用率,并将占用率和当前时间戳输出到控制台中。如果占用率为 0.0,则不输出。循环会一直运行,直到程序被手动终止。 该段代码主要用于进程监控和性能分析,可以用于诊断和优化一些 CPU 占用率高的问题。
其实这个库还有很多可以探索的~
import psutil
import time
print("爽哥提示:开始监测")
p = psutil.Process(33126) # 改成你自己的 pid 就行了
while 1:
v = str(p.cpu_percent())
if "0.0" != v:
print("cpu占用---内存占用----时间戳:")
print(v, p.memory_percent(),time.time())
time.sleep(1)
帮我把这段代码翻译为go
这段 Python 代码可以通过 Psutil 库来获取指定进程的 CPU 占用率,并且每秒钟打印一次非 0 的 CPU 占用率值和当前时间。
以下是 Go 语言的等价实现:
package main
import (
"fmt"
"github.com/shirou/gopsutil/process"
"time"
)
func main() {
p, _ := process.NewProcess(26444) // 改成你自己的 pid 就行了
for {
v, _ := p.CPUPercent()
if v != 0.0 {
fmt.Printf("%v %v\n", v, time.Now().Unix())
}
time.Sleep(1 * time.Second)
}
}
需要先安装 gopsutil 库,可以使用以下命令进行安装:
go get github.com/shirou/gopsutil/process
go语言获取当前程序的进程号
在 Go 语言中,可以使用 os 包的 Getpid() 函数获取当前程序的进程 ID,示例如下:
package main
import (
"fmt"
"os"
)
func main() {
pid := os.Getpid()
fmt.Println("当前程序的进程号为:", pid)
}
所以可以:
package main
import (
"fmt"
"net/http"
_ "net/http/pprof"
"os"
"runtime"
"time"
"github.com/shirou/gopsutil/process"
)
func main() {
go func() {
fmt.Println(http.ListenAndServe(fmt.Sprintf("127.0.0.1:%s", "6060"), nil))
}()
go func() {
pid := os.Getpid()
fmt.Println("当前程序的进程号为:", pid)
p, _ := process.NewProcess(int32(pid))
for {
v, _ := p.CPUPercent()
//if v != 0.0 {
if v > 0 {
fmt.Printf("该进程的cpu占用率:%v, 时间:%v\n", v, time.Now().Format(time.DateTime))
}
time.Sleep(1 * time.Second)
}
}()
fmt.Printf("最初!程序中goroutine的数量为:%d,allg大小为 %d\n", runtime.NumGoroutine(), runtime.PrintAllgSize())
for i := 0; i < 1000000; i++ {
go func() {
time.Sleep(time.Second * 10)
}()
}
time.Sleep(5e9)
fmt.Printf("最后!程序中goroutine的数量为:%d,allg大小为 %d\n", runtime.NumGoroutine(), runtime.PrintAllgSize())
time.Sleep(5e9)
fmt.Printf("5s后程序中goroutine的数量为:%d,allg大小为 %d\n", runtime.NumGoroutine(), runtime.PrintAllgSize())
time.Sleep(5e9)
fmt.Printf("10s后程序中goroutine的数量为:%d,allg大小为 %d\n", runtime.NumGoroutine(), runtime.PrintAllgSize())
time.Sleep(5e9)
fmt.Printf("15s后程序中goroutine的数量为:%d,allg大小为 %d\n", runtime.NumGoroutine(), runtime.PrintAllgSize())
time.Sleep(5e9)
fmt.Printf("20s后程序中goroutine的数量为:%d,allg大小为 %d\n", runtime.NumGoroutine(), runtime.PrintAllgSize())
for i := 0; i < 50000; i++ {
go func() {
time.Sleep(time.Second * 10)
}()
}
time.Sleep(5e9)
fmt.Printf("25s后程序中goroutine的数量为:%d,allg大小为 %d\n", runtime.NumGoroutine(), runtime.PrintAllgSize())
time.Sleep(5e9)
fmt.Printf("30s后程序中goroutine的数量为:%d,allg大小为 %d\n", runtime.NumGoroutine(), runtime.PrintAllgSize())
// 用于阻塞不使程序退出
select {}
// 或者用这种方式
// //ch := make(chan int, 0)
// //ch <- 1
}
最初!程序中goroutine的数量为:3,allg大小为 8
当前程序的进程号为: 35858
该进程的cpu占用率:13.93218508907891, 时间:2023-05-12 17:43:09
该进程的cpu占用率:190.7547865712858, 时间:2023-05-12 17:43:10
该进程的cpu占用率:131.36926562865509, 时间:2023-05-12 17:43:11
该进程的cpu占用率:97.7316086419175, 时间:2023-05-12 17:43:12
该进程的cpu占用率:77.69165154646852, 时间:2023-05-12 17:43:13
该进程的cpu占用率:64.58652211811584, 时间:2023-05-12 17:43:14
该进程的cpu占用率:55.195502469747844, 时间:2023-05-12 17:43:15
最后!程序中goroutine的数量为:1000003,allg大小为 1000025
该进程的cpu占用率:48.3143547204877, 时间:2023-05-12 17:43:16
该进程的cpu占用率:42.85615630905907, 时间:2023-05-12 17:43:18
该进程的cpu占用率:38.6094531105651, 时间:2023-05-12 17:43:19
该进程的cpu占用率:38.69918183404214, 时间:2023-05-12 17:43:20
5s后程序中goroutine的数量为:3,allg大小为 1000027
该进程的cpu占用率:43.256800346785035, 时间:2023-05-12 17:43:21
该进程的cpu占用率:39.9065741906491, 时间:2023-05-12 17:43:22
该进程的cpu占用率:37.036865899176554, 时间:2023-05-12 17:43:23
该进程的cpu占用率:34.61052124041722, 时间:2023-05-12 17:43:24
该进程的cpu占用率:32.43585840070092, 时间:2023-05-12 17:43:25
10s后程序中goroutine的数量为:3,allg大小为 1000027
该进程的cpu占用率:30.56847783241788, 时间:2023-05-12 17:43:26
该进程的cpu占用率:28.913631011303906, 时间:2023-05-12 17:43:27
该进程的cpu占用率:27.435652290471964, 时间:2023-05-12 17:43:28
该进程的cpu占用率:26.048693094893355, 时间:2023-05-12 17:43:29
该进程的cpu占用率:24.847932777177395, 时间:2023-05-12 17:43:30
15s后程序中goroutine的数量为:3,allg大小为 1000027
该进程的cpu占用率:23.711815074529483, 时间:2023-05-12 17:43:31
该进程的cpu占用率:22.71687437878832, 时间:2023-05-12 17:43:32
该进程的cpu占用率:21.764448372415732, 时间:2023-05-12 17:43:33
该进程的cpu占用率:20.92875969114541, 时间:2023-05-12 17:43:34
该进程的cpu占用率:20.12160921350193, 时间:2023-05-12 17:43:35
20s后程序中goroutine的数量为:3,allg大小为 1000027
该进程的cpu占用率:19.991944530240655, 时间:2023-05-12 17:43:36
该进程的cpu占用率:19.27471544596121, 时间:2023-05-12 17:43:37
该进程的cpu占用率:18.641917211245666, 时间:2023-05-12 17:43:38
该进程的cpu占用率:18.017115467733227, 时间:2023-05-12 17:43:39
该进程的cpu占用率:17.466064267325425, 时间:2023-05-12 17:43:40
25s后程序中goroutine的数量为:50003,allg大小为 1000027
该进程的cpu占用率:16.948856361999116, 时间:2023-05-12 17:43:41
该进程的cpu占用率:16.462340237710794, 时间:2023-05-12 17:43:42
该进程的cpu占用率:15.9763738240996, 时间:2023-05-12 17:43:43
该进程的cpu占用率:15.546076720001675, 时间:2023-05-12 17:43:44
该进程的cpu占用率:15.112754890350095, 时间:2023-05-12 17:43:45
30s后程序中goroutine的数量为:3,allg大小为 1000027
该进程的cpu占用率:15.076474615547225, 时间:2023-05-12 17:43:46
该进程的cpu占用率:14.704571877821197, 时间:2023-05-12 17:43:47
该进程的cpu占用率:14.352632256273097, 时间:2023-05-12 17:43:48
该进程的cpu占用率:14.017752705036889, 时间:2023-05-12 17:43:49
该进程的cpu占用率:13.674276373332054, 时间:2023-05-12 17:43:50
该进程的cpu占用率:13.37199283185849, 时间:2023-05-12 17:43:51
该进程的cpu占用率:13.059914218896532, 时间:2023-05-12 17:43:52
该进程的cpu占用率:12.784774102478526, 时间:2023-05-12 17:43:53
该进程的cpu占用率:12.500430869420784, 时间:2023-05-12 17:43:54
该进程的cpu占用率:12.248907601590398, 时间:2023-05-12 17:43:55
该进程的cpu占用率:11.98667157825792, 时间:2023-05-12 17:43:56
该进程的cpu占用率:11.75723900000132, 时间:2023-05-12 17:43:57
该进程的cpu占用率:11.516252841247146, 时间:2023-05-12 17:43:58
该进程的cpu占用率:11.305252469708497, 时间:2023-05-12 17:43:59
该进程的cpu占用率:11.083442764568709, 时间:2023-05-12 17:44:00
该进程的cpu占用率:10.888522019384913, 时间:2023-05-12 17:44:01
该进程的cpu占用率:10.682527367404667, 时间:2023-05-12 17:44:02
该进程的cpu占用率:10.484810309470612, 时间:2023-05-12 17:44:03
该进程的cpu占用率:10.329017654195303, 时间:2023-05-12 17:44:04
该进程的cpu占用率:10.161432347035777, 时间:2023-05-12 17:44:05
该进程的cpu占用率:9.98297556035863, 时间:2023-05-12 17:44:06
该进程的cpu占用率:9.809221039028456, 时间:2023-05-12 17:44:07
该进程的cpu占用率:9.659373170295838, 时间:2023-05-12 17:44:08
该进程的cpu占用率:9.49811171119314, 时间:2023-05-12 17:44:09
该进程的cpu占用率:9.358019767893909, 时间:2023-05-12 17:44:10
该进程的cpu占用率:9.206845107749317, 时间:2023-05-12 17:44:11
该进程的cpu占用率:9.076080124074247, 时间:2023-05-12 17:44:12
该进程的cpu占用率:8.934344557117829, 时间:2023-05-12 17:44:13
该进程的cpu占用率:8.81185009092234, 时间:2023-05-12 17:44:14
该进程的cpu占用率:8.678134052752641, 时间:2023-05-12 17:44:15
该进程的cpu占用率:8.563354845925128, 时间:2023-05-12 17:44:16
该进程的cpu占用率:8.437280826745479, 时间:2023-05-12 17:44:17
该进程的cpu占用率:8.343346064163166, 时间:2023-05-12 17:44:18
该进程的cpu占用率:8.223938494080908, 时间:2023-05-12 17:44:19
该进程的cpu占用率:8.121975720104588, 时间:2023-05-12 17:44:20
该进程的cpu占用率:8.008926881555775, 时间:2023-05-12 17:44:21
该进程的cpu占用率:7.898937637522161, 时间:2023-05-12 17:44:22
该进程的cpu占用率:7.8054304981786, 时间:2023-05-12 17:44:23
该进程的cpu占用率:7.701368268530203, 时间:2023-05-12 17:44:24
该进程的cpu占用率:7.612752430783679, 时间:2023-05-12 17:44:25
该进程的cpu占用率:7.513657033303554, 时间:2023-05-12 17:44:26
该进程的cpu占用率:7.417167109217976, 时间:2023-05-12 17:44:28
该进程的cpu占用率:7.335630972923487, 时间:2023-05-12 17:44:29
该进程的cpu占用率:7.256136074961514, 时间:2023-05-12 17:44:30
该进程的cpu占用率:7.16642075565105, 时间:2023-05-12 17:44:31
该进程的cpu占用率:7.078665717740228, 时间:2023-05-12 17:44:32
该进程的cpu占用率:7.004194228042127, 时间:2023-05-12 17:44:33
该进程的cpu占用率:6.94419851224013, 时间:2023-05-12 17:44:34
该进程的cpu占用率:6.862548335679914, 时间:2023-05-12 17:44:35
该进程的cpu占用率:6.7825708174416315, 时间:2023-05-12 17:44:36
该进程的cpu占用率:6.715947807646905, 时间:2023-05-12 17:44:37
该进程的cpu占用率:6.63963996731727, 时间:2023-05-12 17:44:38
该进程的cpu占用率:6.576064540092336, 时间:2023-05-12 17:44:39
该进程的cpu占用率:6.502893469577249, 时间:2023-05-12 17:44:40
该进程的cpu占用率:6.44231272823235, 时间:2023-05-12 17:44:41
该进程的cpu占用率:6.372161728940405, 时间:2023-05-12 17:44:42
该进程的cpu占用率:6.314127191035298, 时间:2023-05-12 17:44:43
该进程的cpu占用率:6.246885219038054, 时间:2023-05-12 17:44:44
该进程的cpu占用率:6.191438638630628, 时间:2023-05-12 17:44:45
该进程的cpu占用率:6.126905420040435, 时间:2023-05-12 17:44:46
该进程的cpu占用率:6.073426258518452, 时间:2023-05-12 17:44:47
该进程的cpu占用率:6.011548516997806, 时间:2023-05-12 17:44:48
该进程的cpu占用率:5.970654363384112, 时间:2023-05-12 17:44:49
该进程的cpu占用率:5.911003224940731, 时间:2023-05-12 17:44:50
该进程的cpu占用率:5.8524328309249345, 时间:2023-05-12 17:44:51
该进程的cpu占用率:5.804667258188059, 时间:2023-05-12 17:44:52
该进程的cpu占用率:5.7483702101022605, 时间:2023-05-12 17:44:53
该进程的cpu占用率:5.70252904316544, 时间:2023-05-12 17:44:54
该进程的cpu占用率:5.648182299340994, 时间:2023-05-12 17:44:55
该进程的cpu占用率:5.604267323737531, 时间:2023-05-12 17:44:56
该进程的cpu占用率:5.551579382835899, 时间:2023-05-12 17:44:57
该进程的cpu占用率:5.509325039706883, 时间:2023-05-12 17:44:58
该进程的cpu占用率:5.458869787994697, 时间:2023-05-12 17:44:59
该进程的cpu占用率:5.409248927580517, 时间:2023-05-12 17:45:00
该进程的cpu占用率:5.369269987740907, 时间:2023-05-12 17:45:01
该进程的cpu占用率:5.32140347505796, 时间:2023-05-12 17:45:02
该进程的cpu占用率:5.283022380603061, 时间:2023-05-12 17:45:03
该进程的cpu占用率:5.245299685653345, 时间:2023-05-12 17:45:04
该进程的cpu占用率:5.208360549591354, 时间:2023-05-12 17:45:05
该进程的cpu占用率:5.163349142538685, 时间:2023-05-12 17:45:06
该进程的cpu占用率:5.127483059571841, 时间:2023-05-12 17:45:07
该进程的cpu占用率:5.08408253031309, 时间:2023-05-12 17:45:08
该进程的cpu占用率:5.041251951142773, 时间:2023-05-12 17:45:09
该进程的cpu占用率:5.007433778003868, 时间:2023-05-12 17:45:10
该进程的cpu占用率:4.974169261341491, 时间:2023-05-12 17:45:11
该进程的cpu占用率:5.409363049522355, 时间:2023-05-12 17:45:12
该进程的cpu占用率:5.365091897247663, 时间:2023-05-12 17:45:13
该进程的cpu占用率:5.329732407022659, 时间:2023-05-12 17:45:14
该进程的cpu占用率:5.287089387770752, 时间:2023-05-12 17:45:15
该进程的cpu占用率:5.260646273995799, 时间:2023-05-12 17:45:16
该进程的cpu占用率:5.219188682711262, 时间:2023-05-12 17:45:17
该进程的cpu占用率:5.18609948102402, 时间:2023-05-12 17:45:18
该进程的cpu占用率:5.145893812240848, 时间:2023-05-12 17:45:19
该进程的cpu占用率:5.113871502400212, 时间:2023-05-12 17:45:20
该进程的cpu占用率:5.074814932078232, 时间:2023-05-12 17:45:21
该进程的cpu占用率:5.043881922171243, 时间:2023-05-12 17:45:22
该进程的cpu占用率:5.00592586671729, 时间:2023-05-12 17:45:23
该进程的cpu占用率:4.975895320352999, 时间:2023-05-12 17:45:24
该进程的cpu占用率:4.938799074019009, 时间:2023-05-12 17:45:25
该进程的cpu占用率:4.909669229492248, 时间:2023-05-12 17:45:26
该进程的cpu占用率:4.873795267281308, 时间:2023-05-12 17:45:27
该进程的cpu占用率:4.845689102016621, 时间:2023-05-12 17:45:28
该进程的cpu占用率:4.810830550442885, 时间:2023-05-12 17:45:29
该进程的cpu占用率:4.790529011426081, 时间:2023-05-12 17:45:30
该进程的cpu占用率:4.7566184200761805, 时间:2023-05-12 17:45:31
该进程的cpu占用率:4.72312817724572, 时间:2023-05-12 17:45:32
该进程的cpu占用率:4.696994634535435, 时间:2023-05-12 17:45:33
该进程的cpu占用率:4.664444039675117, 时间:2023-05-12 17:45:34
该进程的cpu占用率:4.63908090039445, 时间:2023-05-12 17:45:36
该进程的cpu占用率:4.607156512382249, 时间:2023-05-12 17:45:37
该进程的cpu占用率:4.582595035674127, 时间:2023-05-12 17:45:38
该进程的cpu占用率:4.551584675188922, 时间:2023-05-12 17:45:39
该进程的cpu占用率:4.527644696392133, 时间:2023-05-12 17:45:40
该进程的cpu占用率:4.497525414174748, 时间:2023-05-12 17:45:41
该进程的cpu占用率:4.474261912854611, 时间:2023-05-12 17:45:42
该进程的cpu占用率:4.444825322355441, 时间:2023-05-12 17:45:43
该进程的cpu占用率:4.4222732264897076, 时间:2023-05-12 17:45:44
该进程的cpu占用率:4.393544765779584, 时间:2023-05-12 17:45:45
该进程的cpu占用率:4.37789292102796, 时间:2023-05-12 17:45:46
该进程的cpu占用率:4.349830984092674, 时间:2023-05-12 17:45:47
该进程的cpu占用率:4.328220915008767, 时间:2023-05-12 17:45:48
该进程的cpu占用率:4.300788858307721, 时间:2023-05-12 17:45:49
该进程的cpu占用率:4.2799960249381845, 时间:2023-05-12 17:45:50
该进程的cpu占用率:4.253238013214884, 时间:2023-05-12 17:45:51
该进程的cpu占用率:4.232945444426927, 时间:2023-05-12 17:45:52
该进程的cpu占用率:4.206875712794513, 时间:2023-05-12 17:45:53
该进程的cpu占用率:4.181046931852463, 时间:2023-05-12 17:45:54
该进程的cpu占用率:4.161554129262393, 时间:2023-05-12 17:45:55
该进程的cpu占用率:4.136368712272746, 时间:2023-05-12 17:45:56
该进程的cpu占用率:4.117383722410053, 时间:2023-05-12 17:45:57
该进程的cpu占用率:4.09276221342699, 时间:2023-05-12 17:45:58
该进程的cpu占用率:4.0743050622530035, 时间:2023-05-12 17:45:59
该进程的cpu占用率:4.050190261189125, 时间:2023-05-12 17:46:00
该进程的cpu占用率:4.026392246955462, 时间:2023-05-12 17:46:01
该进程的cpu占用率:4.01443329505452, 时间:2023-05-12 17:46:02
该进程的cpu占用率:3.991084765313235, 时间:2023-05-12 17:46:03
该进程的cpu占用率:3.9737032745800693, 时间:2023-05-12 17:46:04
该进程的cpu占用率:3.950907038127659, 时间:2023-05-12 17:46:05
该进程的cpu占用率:3.933963585485877, 时间:2023-05-12 17:46:06
该进程的cpu占用率:3.911601044310056, 时间:2023-05-12 17:46:07
该进程的cpu占用率:3.889559231080057, 时间:2023-05-12 17:46:08
该进程的cpu占用率:3.873159125285078, 时间:2023-05-12 17:46:09
该进程的cpu占用率:3.8514949715482243, 时间:2023-05-12 17:46:10
该进程的cpu占用率:3.8355932146273854, 时间:2023-05-12 17:46:11
该进程的cpu占用率:3.8144074134991572, 时间:2023-05-12 17:46:12
该进程的cpu占用率:3.798853451836318, 时间:2023-05-12 17:46:13
该进程的cpu占用率:3.7781414950100505, 时间:2023-05-12 17:46:14
该进程的cpu占用率:3.762974987012108, 时间:2023-05-12 17:46:15
该进程的cpu占用率:3.7425951595204148, 时间:2023-05-12 17:46:16
该进程的cpu占用率:3.7331033260905997, 时间:2023-05-12 17:46:17
该进程的cpu占用率:3.713130675970534, 时间:2023-05-12 17:46:18
该进程的cpu占用率:3.6986266270101145, 时间:2023-05-12 17:46:19
该进程的cpu占用率:3.6790656763790817, 时间:2023-05-12 17:46:20
该进程的cpu占用率:3.6596764216890345, 时间:2023-05-12 17:46:21
该进程的cpu占用率:3.645649480200612, 时间:2023-05-12 17:46:22
该进程的cpu占用率:3.6267018523184507, 时间:2023-05-12 17:46:23
该进程的cpu占用率:3.6129882666187467, 时间:2023-05-12 17:46:24
该进程的cpu占用率:3.5943649630535885, 时间:2023-05-12 17:46:25
该进程的cpu占用率:3.5810285785351357, 时间:2023-05-12 17:46:26
该进程的cpu占用率:3.562735131083442, 时间:2023-05-12 17:46:27
该进程的cpu占用率:3.5496747263825355, 时间:2023-05-12 17:46:28
该进程的cpu占用率:3.531776428649145, 时间:2023-05-12 17:46:29
该进程的cpu占用率:3.5141699585327446, 时间:2023-05-12 17:46:30
该进程的cpu占用率:3.501498399662349, 时间:2023-05-12 17:46:31
该进程的cpu占用率:3.4890078757801706, 时间:2023-05-12 17:46:32
该进程的cpu占用率:3.471774940934537, 时间:2023-05-12 17:46:33
该进程的cpu占用率:3.4595313353464436, 时间:2023-05-12 17:46:34
该进程的cpu占用率:3.442697135426001, 时间:2023-05-12 17:46:35
该进程的cpu占用率:3.425869237092506, 时间:2023-05-12 17:46:36
该进程的cpu占用率:3.414154510947817, 时间:2023-05-12 17:46:37
该进程的cpu占用率:3.397683472751215, 时间:2023-05-12 17:46:38
该进程的cpu占用率:3.3813924685159518, 时间:2023-05-12 17:46:39
该进程的cpu占用率:3.3699144150765212, 时间:2023-05-12 17:46:40
该进程的cpu占用率:3.3538932154502814, 时间:2023-05-12 17:46:41
该进程的cpu占用率:3.342654149114109, 时间:2023-05-12 17:46:42
该进程的cpu占用率:3.326799483637914, 时间:2023-05-12 17:46:43
该进程的cpu占用率:3.3158386106880737, 时间:2023-05-12 17:46:44
该进程的cpu占用率:3.300299364808528, 时间:2023-05-12 17:46:45
该进程的cpu占用率:3.2894737294851595, 时间:2023-05-12 17:46:46
该进程的cpu占用率:3.274242286677475, 时间:2023-05-12 17:46:47
该进程的cpu占用率:3.268145927997445, 时间:2023-05-12 17:46:49
该进程的cpu占用率:3.2530847104299223, 时间:2023-05-12 17:46:50
该进程的cpu占用率:3.2427310524128243, 时间:2023-05-12 17:46:51
该进程的cpu占用率:3.228023693155903, 时间:2023-05-12 17:46:52
该进程的cpu占用率:3.213299819389789, 时间:2023-05-12 17:46:53
该进程的cpu占用率:3.2032230056844635, 时间:2023-05-12 17:46:54
该进程的cpu占用率:3.188880947990528, 时间:2023-05-12 17:46:55
该进程的cpu占用率:3.1790177501777, 时间:2023-05-12 17:46:56
该进程的cpu占用率:3.1648318553984995, 时间:2023-05-12 17:46:57
该进程的cpu占用率:3.15522272693227, 时间:2023-05-12 17:46:58
该进程的cpu占用率:3.141290884422237, 时间:2023-05-12 17:46:59
该进程的cpu占用率:3.131799931415312, 时间:2023-05-12 17:47:00
该进程的cpu占用率:3.1181600344041587, 时间:2023-05-12 17:47:01
该进程的cpu占用率:3.1088258511056117, 时间:2023-05-12 17:47:02
该进程的cpu占用率:3.095266285032715, 时间:2023-05-12 17:47:03
该进程的cpu占用率:3.086201602412835, 时间:2023-05-12 17:47:04
该进程的cpu占用率:3.07713256026762, 时间:2023-05-12 17:47:05
该进程的cpu占用率:3.0639308172344704, 时间:2023-05-12 17:47:06
该进程的cpu占用率:3.0551227103675562, 时间:2023-05-12 17:47:07
该进程的cpu占用率:3.0421928835034944, 时间:2023-05-12 17:47:08
该进程的cpu占用率:3.0334656928595427, 时间:2023-05-12 17:47:09
该进程的cpu占用率:3.0206826889560396, 时间:2023-05-12 17:47:10
该进程的cpu占用率:3.012197460354427, 时间:2023-05-12 17:47:11
该进程的cpu占用率:3.0077286669787227, 时间:2023-05-12 17:47:12
该进程的cpu占用率:3.133753697072516, 时间:2023-05-12 17:47:13
该进程的cpu占用率:3.124873306656313, 时间:2023-05-12 17:47:14
该进程的cpu占用率:3.116024414408331, 时间:2023-05-12 17:47:15
该进程的cpu占用率:3.10731398150715, 时间:2023-05-12 17:47:16
该进程的cpu占用率:3.094622659318871, 时间:2023-05-12 17:47:17
该进程的cpu占用率:3.174169786173535, 时间:2023-05-12 17:47:18
该进程的cpu占用率:3.201262482124571, 时间:2023-05-12 17:47:19
该进程的cpu占用率:3.196247166938343, 时间:2023-05-12 17:47:20
该进程的cpu占用率:3.187349619211697, 时间:2023-05-12 17:47:21
该进程的cpu占用率:3.1746363888803697, 时间:2023-05-12 17:47:22
该进程的cpu占用率:3.1659210019280533, 时间:2023-05-12 17:47:23
该进程的cpu占用率:3.1533176532330844, 时间:2023-05-12 17:47:24
该进程的cpu占用率:3.1447681509354037, 时间:2023-05-12 17:47:25
该进程的cpu占用率:3.132335261085791, 时间:2023-05-12 17:47:26
该进程的cpu占用率:3.1238981662242216, 时间:2023-05-12 17:47:27
该进程的cpu占用率:3.111692915529406, 时间:2023-05-12 17:47:28
该进程的cpu占用率:3.1033720692347813, 时间:2023-05-12 17:47:29
该进程的cpu占用率:3.0912933908880955, 时间:2023-05-12 17:47:30
该进程的cpu占用率:3.083117314338072, 时间:2023-05-12 17:47:31
该进程的cpu占用率:3.071240203383593, 时间:2023-05-12 17:47:32
该进程的cpu占用率:3.063210446697366, 时间:2023-05-12 17:47:33
该进程的cpu占用率:3.0589987163493215, 时间:2023-05-12 17:47:34
该进程的cpu占用率:3.0473718679740722, 时间:2023-05-12 17:47:35
该进程的cpu占用率:3.03954819259484, 时间:2023-05-12 17:47:36
该进程的cpu占用率:3.0280304856454987, 时间:2023-05-12 17:47:37
该进程的cpu占用率:3.020369960558119, 时间:2023-05-12 17:47:38
该进程的cpu占用率:3.0090530628896373, 时间:2023-05-12 17:47:39
该进程的cpu占用率:3.001456180742571, 时间:2023-05-12 17:47:40
该进程的cpu占用率:2.9903370556213464, 时间:2023-05-12 17:47:41
该进程的cpu占用率:2.9828755197487173, 时间:2023-05-12 17:47:42
该进程的cpu占用率:2.971877296111684, 时间:2023-05-12 17:47:43
该进程的cpu占用率:2.9609767045139654, 时间:2023-05-12 17:47:44
该进程的cpu占用率:2.9536999694183725, 时间:2023-05-12 17:47:45
该进程的cpu占用率:2.9464821171110795, 时间:2023-05-12 17:47:46
该进程的cpu占用率:2.935784036471055, 时间:2023-05-12 17:47:47
该进程的cpu占用率:2.932231138244626, 时间:2023-05-12 17:47:48
该进程的cpu占用率:2.921589741102026, 时间:2023-05-12 17:47:50
该进程的cpu占用率:2.914590799305572, 时间:2023-05-12 17:47:51
该进程的cpu占用率:2.9041592060924715, 时间:2023-05-12 17:47:52
该进程的cpu占用率:2.8972773348461884, 时间:2023-05-12 17:47:53
该进程的cpu占用率:2.8869560478445857, 时间:2023-05-12 17:47:54
该进程的cpu占用率:2.8802328570392923, 时间:2023-05-12 17:47:55
该进程的cpu占用率:2.8700179227394726, 时间:2023-05-12 17:47:56
该进程的cpu占用率:2.863347122981696, 时间:2023-05-12 17:47:57
该进程的cpu占用率:2.856759956445685, 时间:2023-05-12 17:47:58
该进程的cpu占用率:2.84671825563472, 时间:2023-05-12 17:47:59
该进程的cpu占用率:2.840202133236327, 时间:2023-05-12 17:48:00
该进程的cpu占用率:2.8303554713938732, 时间:2023-05-12 17:48:01
该进程的cpu占用率:2.8239199167961324, 时间:2023-05-12 17:48:02
该进程的cpu占用率:2.817555804802561, 时间:2023-05-12 17:48:03
该进程的cpu占用率:2.811241353476824, 时间:2023-05-12 17:48:04
该进程的cpu占用率:2.801548409730411, 时间:2023-05-12 17:48:05
该进程的cpu占用率:2.7953088568375537, 时间:2023-05-12 17:48:06
该进程的cpu占用率:2.7857646888033494, 时间:2023-05-12 17:48:07
该进程的cpu占用率:2.7796753015175106, 时间:2023-05-12 17:48:08
该进程的cpu占用率:2.7702346873238275, 时间:2023-05-12 17:48:09
该进程的cpu占用率:2.764206783453706, 时间:2023-05-12 17:48:10
该进程的cpu占用率:2.754920836787526, 时间:2023-05-12 17:48:11
该进程的cpu占用率:2.748966078918821, 时间:2023-05-12 17:48:12
该进程的cpu占用率:2.73976876062572, 时间:2023-05-12 17:48:13
该进程的cpu占用率:2.733907654754807, 时间:2023-05-12 17:48:14
该进程的cpu占用率:2.724842891269638, 时间:2023-05-12 17:48:15
该进程的cpu占用率:2.722334116912379, 时间:2023-05-12 17:48:16
该进程的cpu占用率:2.7165838891462344, 时间:2023-05-12 17:48:17
该进程的cpu占用率:2.707700079939836, 时间:2023-05-12 17:48:18
该进程的cpu占用率:2.7020289145434564, 时间:2023-05-12 17:48:19
该进程的cpu占用率:2.693210193043657, 时间:2023-05-12 17:48:20
该进程的cpu占用率:2.687652548878969, 时间:2023-05-12 17:48:21
该进程的cpu占用率:2.6788853348195105, 时间:2023-05-12 17:48:22
该进程的cpu占用率:2.6734563344710676, 时间:2023-05-12 17:48:23
该进程的cpu占用率:2.6648523110014337, 时间:2023-05-12 17:48:24
该进程的cpu占用率:2.659460241129407, 时间:2023-05-12 17:48:25
该进程的cpu占用率:2.6509329785457285, 时间:2023-05-12 17:48:26
该进程的cpu占用率:2.6455901776134696, 时间:2023-05-12 17:48:27
该进程的cpu占用率:2.637213325565515, 时间:2023-05-12 17:48:28
该进程的cpu占用率:2.6319776749167225, 时间:2023-05-12 17:48:29
该进程的cpu占用率:2.626754815211498, 时间:2023-05-12 17:48:30
该进程的cpu占用率:2.6216140738655573, 时间:2023-05-12 17:48:31
该进程的cpu占用率:2.613337779755609, 时间:2023-05-12 17:48:32
该进程的cpu占用率:2.608213612633288, 时间:2023-05-12 17:48:33
该进程的cpu占用率:2.6000978422650616, 时间:2023-05-12 17:48:34
该进程的cpu占用率:2.595066123799643, 时间:2023-05-12 17:48:35
该进程的cpu占用率:2.5870238125444014, 时间:2023-05-12 17:48:36
该进程的cpu占用率:2.582046017643823, 时间:2023-05-12 17:48:37
该进程的cpu占用率:2.57412453092379, 时间:2023-05-12 17:48:38
该进程的cpu占用率:2.569222936286185, 时间:2023-05-12 17:48:39
该进程的cpu占用率:2.5613387906925165, 时间:2023-05-12 17:48:40
该进程的cpu占用率:2.5565592699377593, 时间:2023-05-12 17:48:41
该进程的cpu占用率:2.5487502164378615, 时间:2023-05-12 17:48:42
该进程的cpu占用率:2.543978581850182, 时间:2023-05-12 17:48:43
该进程的cpu占用率:2.539258196887698, 时间:2023-05-12 17:48:44
该进程的cpu占用率:2.5345811394836923, 时间:2023-05-12 17:48:45
该进程的cpu占用率:2.52699310211664, 时间:2023-05-12 17:48:46
该进程的cpu占用率:2.5223530707874144, 时间:2023-05-12 17:48:47
该进程的cpu占用率:2.5148411586175, 时间:2023-05-12 17:48:48
该进程的cpu占用率:2.510274324068462, 时间:2023-05-12 17:48:49
该进程的cpu占用率:2.5028032273296756, 时间:2023-05-12 17:48:51
该进程的cpu占用率:2.498347934631942, 时间:2023-05-12 17:48:52
该进程的cpu占用率:2.4909723181123837, 时间:2023-05-12 17:48:53
该进程的cpu占用率:2.4865282478795785, 时间:2023-05-12 17:48:54
该进程的cpu占用率:2.4792555658940705, 时间:2023-05-12 17:48:55
该进程的cpu占用率:2.474887127284015, 时间:2023-05-12 17:48:56
该进程的cpu占用率:2.4676528771140527, 时间:2023-05-12 17:48:57
该进程的cpu占用率:2.4633716895295676, 时间:2023-05-12 17:48:58
该进程的cpu占用率:2.459031106614978, 时间:2023-05-12 17:48:59
该进程的cpu占用率:2.454763772671424, 时间:2023-05-12 17:49:00
该进程的cpu占用率:2.4476618622036344, 时间:2023-05-12 17:49:01
该进程的cpu占用率:2.4434703142791516, 时间:2023-05-12 17:49:02
该进程的cpu占用率:2.436461619336254, 时间:2023-05-12 17:49:03
该进程的cpu占用率:2.4322925345256747, 时间:2023-05-12 17:49:04
该进程的cpu占用率:2.4253784323020793, 时间:2023-05-12 17:49:05
该进程的cpu占用率:2.421264847818858, 时间:2023-05-12 17:49:06
该进程的cpu占用率:2.4143644738453935, 时间:2023-05-12 17:49:07
该进程的cpu占用率:2.4103505462422135, 时间:2023-05-12 17:49:08
该进程的cpu占用率:2.4035602533643377, 时间:2023-05-12 17:49:09
该进程的cpu占用率:2.3995561369142226, 时间:2023-05-12 17:49:10
该进程的cpu占用率:2.39283095261465, 时间:2023-05-12 17:49:11
该进程的cpu占用率:2.3889211590487314, 时间:2023-05-12 17:49:12
该进程的cpu占用率:2.3904505173957245, 时间:2023-05-12 17:49:13
该进程的cpu占用率:2.4601260700498266, 时间:2023-05-12 17:49:14
该进程的cpu占用率:2.453294277688914, 时间:2023-05-12 17:49:15
该进程的cpu占用率:2.4492582874389273, 时间:2023-05-12 17:49:16
该进程的cpu占用率:2.4424957194380505, 时间:2023-05-12 17:49:17
该进程的cpu占用率:2.438505505633914, 时间:2023-05-12 17:49:18
该进程的cpu占用率:2.4318363491275434, 时间:2023-05-12 17:49:19
该进程的cpu占用率:2.4278535198990725, 时间:2023-05-12 17:49:20
该进程的cpu占用率:2.4212524158435205, 时间:2023-05-12 17:49:21
该进程的cpu占用率:2.4173673435805654, 时间:2023-05-12 17:49:22
该进程的cpu占用率:2.4134355852240232, 时间:2023-05-12 17:49:23
该进程的cpu占用率:2.4069248676858286, 时间:2023-05-12 17:49:24
该进程的cpu占用率:2.40310787223035, 时间:2023-05-12 17:49:25
该进程的cpu占用率:2.396639150283215, 时间:2023-05-12 17:49:26
该进程的cpu占用率:2.39283964762251, 时间:2023-05-12 17:49:27
该进程的cpu占用率:2.3864618579110775, 时间:2023-05-12 17:49:28
该进程的cpu占用率:2.382698166773572, 时间:2023-05-12 17:49:29
该进程的cpu占用率:2.376360330047787, 时间:2023-05-12 17:49:30
该进程的cpu占用率:2.372654678212224, 时间:2023-05-12 17:49:31
该进程的cpu占用率:2.366396313358867, 时间:2023-05-12 17:49:32
该进程的cpu占用率:2.3627454032762185, 时间:2023-05-12 17:49:33
该进程的cpu占用率:2.3565245577623912, 时间:2023-05-12 17:49:34
该进程的cpu占用率:2.352942782616405, 时间:2023-05-12 17:49:35
该进程的cpu占用率:2.3493536117158507, 时间:2023-05-12 17:49:36
该进程的cpu占用率:2.3457681853235055, 时间:2023-05-12 17:49:37
该进程的cpu占用率:2.3396805780336845, 时间:2023-05-12 17:49:38
该进程的cpu占用率:2.3335895718739508, 时间:2023-05-12 17:49:39
该进程的cpu占用率:2.3300781571506284, 时间:2023-05-12 17:49:40
该进程的cpu占用率:2.326605339674821, 时间:2023-05-12 17:49:41
该进程的cpu占用率:2.320590395976151, 时间:2023-05-12 17:49:42
该进程的cpu占用率:2.31465702926544, 时间:2023-05-12 17:49:43
该进程的cpu占用率:2.311272389930294, 时间:2023-05-12 17:49:44
该进程的cpu占用率:2.305374722914115, 时间:2023-05-12 17:49:45
该进程的cpu占用率:2.302008351751641, 时间:2023-05-12 17:49:46
该进程的cpu占用率:2.296154612824214, 时间:2023-05-12 17:49:47
该进程的cpu占用率:2.2928365712123795, 时间:2023-05-12 17:49:48
该进程的cpu占用率:2.2870411643616375, 时间:2023-05-12 17:49:49
该进程的cpu占用率:2.283753280152597, 时间:2023-05-12 17:49:50
该进程的cpu占用率:2.27804080063883, 时间:2023-05-12 17:49:51
该进程的cpu占用率:2.274797357449842, 时间:2023-05-12 17:49:52
该进程的cpu占用率:2.2715522438683178, 时间:2023-05-12 17:49:54
该进程的cpu占用率:2.2658822930894313, 时间:2023-05-12 17:49:55
该进程的cpu占用率:2.2626647574329284, 时间:2023-05-12 17:49:56
该进程的cpu占用率:2.257036153981966, 时间:2023-05-12 17:49:57
该进程的cpu占用率:2.253873466727099, 时间:2023-05-12 17:49:58
该进程的cpu占用率:2.2482717697064696, 时间:2023-05-12 17:49:59
该进程的cpu占用率:2.2451002996734584, 时间:2023-05-12 17:50:00
该进程的cpu占用率:2.2395685501032965, 时间:2023-05-12 17:50:01
该进程的cpu占用率:2.236494190985901, 时间:2023-05-12 17:50:02
该进程的cpu占用率:2.233413013783263, 时间:2023-05-12 17:50:03
该进程的cpu占用率:2.2279365248118608, 时间:2023-05-12 17:50:04
该进程的cpu占用率:2.224918971382381, 时间:2023-05-12 17:50:05
该进程的cpu占用率:2.219509679919284, 时间:2023-05-12 17:50:06
该进程的cpu占用率:2.2188939556769145, 时间:2023-05-12 17:50:07
该进程的cpu占用率:2.2135226963835906, 时间:2023-05-12 17:50:08
该进程的cpu占用率:2.210528092377288, 时间:2023-05-12 17:50:09
该进程的cpu占用率:2.2051862315140944, 时间:2023-05-12 17:50:10
该进程的cpu占用率:2.2022684440059153, 时间:2023-05-12 17:50:11
该进程的cpu占用率:2.1969970735290274, 时间:2023-05-12 17:50:12
该进程的cpu占用率:2.1940730065938823, 时间:2023-05-12 17:50:13
该进程的cpu占用率:2.191172874182618, 时间:2023-05-12 17:50:14
该进程的cpu占用率:2.185958284462096, 时间:2023-05-12 17:50:15
该进程的cpu占用率:2.1830810888038545, 时间:2023-05-12 17:50:16
该进程的cpu占用率:2.1778947067321917, 时间:2023-05-12 17:50:17
该进程的cpu占用率:2.1750855109601313, 时间:2023-05-12 17:50:18
该进程的cpu占用率:2.169949905033676, 时间:2023-05-12 17:50:19
该进程的cpu占用率:2.1671445085102836, 时间:2023-05-12 17:50:20
该进程的cpu占用率:2.164354664936971, 时间:2023-05-12 17:50:21
该进程的cpu占用率:2.1615797869654467, 时间:2023-05-12 17:50:22
该进程的cpu占用率:2.1565135435184057, 时间:2023-05-12 17:50:23
该进程的cpu占用率:2.153791915876139, 时间:2023-05-12 17:50:24
该进程的cpu占用率:2.1487931938730354, 时间:2023-05-12 17:50:25
该进程的cpu占用率:2.1460988246420114, 时间:2023-05-12 17:50:26
该进程的cpu占用率:2.1411188250648983, 时间:2023-05-12 17:50:27
该进程的cpu占用率:2.1384579059530417, 时间:2023-05-12 17:50:28
该进程的cpu占用率:2.1335176886297345, 时间:2023-05-12 17:50:29
该进程的cpu占用率:2.130879381538641, 时间:2023-05-12 17:50:30
该进程的cpu占用率:2.125993082773112, 时间:2023-05-12 17:50:31
该进程的cpu占用率:2.123384911059115, 时间:2023-05-12 17:50:32
该进程的cpu占用率:2.118530142197227, 时间:2023-05-12 17:50:33
该进程的cpu占用率:2.1159499700660396, 时间:2023-05-12 17:50:34
该进程的cpu占用率:2.1133766483906897, 时间:2023-05-12 17:50:35
该进程的cpu占用率:2.1108042783469756, 时间:2023-05-12 17:50:36
该进程的cpu占用率:2.1060089442801577, 时间:2023-05-12 17:50:37
该进程的cpu占用率:2.1034571245052263, 时间:2023-05-12 17:50:38
该进程的cpu占用率:2.0986994432760464, 时间:2023-05-12 17:50:39
该进程的cpu占用率:2.0961757995131585, 时间:2023-05-12 17:50:40
该进程的cpu占用率:2.0936677489346165, 时间:2023-05-12 17:50:41
该进程的cpu占用率:2.0889834772380724, 时间:2023-05-12 17:50:42
该进程的cpu占用率:2.0865231826016455, 时间:2023-05-12 17:50:43
该进程的cpu占用率:2.0818653513548138, 时间:2023-05-12 17:50:44
该进程的cpu占用率:2.077252672282685, 时间:2023-05-12 17:50:45
该进程的cpu占用率:2.074819457291702, 时间:2023-05-12 17:50:46
该进程的cpu占用率:2.072408479129195, 时间:2023-05-12 17:50:47
该进程的cpu占用率:2.0678339736580913, 时间:2023-05-12 17:50:48
该进程的cpu占用率:2.0675985037338527, 时间:2023-05-12 17:50:49
该进程的cpu占用率:2.063048105257329, 时间:2023-05-12 17:50:50
该进程的cpu占用率:2.0606747091805313, 时间:2023-05-12 17:50:51
该进程的cpu占用率:2.0561802100995883, 时间:2023-05-12 17:50:52
该进程的cpu占用率:2.0538194284195157, 时间:2023-05-12 17:50:53
该进程的cpu占用率:2.0493290453787547, 时间:2023-05-12 17:50:55
该进程的cpu占用率:2.047009377647589, 时间:2023-05-12 17:50:56
该进程的cpu占用率:2.0425582261508204, 时间:2023-05-12 17:50:57
该进程的cpu占用率:2.0402559642454032, 时间:2023-05-12 17:50:58
该进程的cpu占用率:2.035841298780465, 时间:2023-05-12 17:50:59
该进程的cpu占用率:2.0335902234695737, 时间:2023-05-12 17:51:00
该进程的cpu占用率:2.0292104849305757, 时间:2023-05-12 17:51:01
该进程的cpu占用率:2.0269551598902917, 时间:2023-05-12 17:51:02
该进程的cpu占用率:2.0226254425286703, 时间:2023-05-12 17:51:03
该进程的cpu占用率:2.022500454352307, 时间:2023-05-12 17:51:04
该进程的cpu占用率:2.018174444198906, 时间:2023-05-12 17:51:05
该进程的cpu占用率:2.0159483349240155, 时间:2023-05-12 17:51:06
该进程的cpu占用率:2.011647358744972, 时间:2023-05-12 17:51:07
该进程的cpu占用率:2.009463286691548, 时间:2023-05-12 17:51:08
该进程的cpu占用率:2.0072874905504183, 时间:2023-05-12 17:51:09
该进程的cpu占用率:2.0030612136234134, 时间:2023-05-12 17:51:10
该进程的cpu占用率:2.0009090845321946, 时间:2023-05-12 17:51:11
该进程的cpu占用率:1.9967060392199125, 时间:2023-05-12 17:51:12
该进程的cpu占用率:1.9925345943804658, 时间:2023-05-12 17:51:13
该进程的cpu占用率:1.9924612395872807, 时间:2023-05-12 17:51:14
该进程的cpu占用率:2.053970068166517, 时间:2023-05-12 17:51:15
该进程的cpu占用率:2.0517433210589635, 时间:2023-05-12 17:51:16
该进程的cpu占用率:2.047491717814102, 时间:2023-05-12 17:51:17
该进程的cpu占用率:2.043242948574476, 时间:2023-05-12 17:51:18
该进程的cpu占用率:2.0410562522790223, 时间:2023-05-12 17:51:19
该进程的cpu占用率:2.036848307331849, 时间:2023-05-12 17:51:20
该进程的cpu占用率:2.0367250648471535, 时间:2023-05-12 17:51:21
该进程的cpu占用率:2.032517919837104, 时间:2023-05-12 17:51:22
该进程的cpu占用率:2.0303587203610776, 时间:2023-05-12 17:51:23
该进程的cpu占用率:2.0262081589554, 时间:2023-05-12 17:51:24
该进程的cpu占用率:2.0240952365287104, 时间:2023-05-12 17:51:25
该进程的cpu占用率:2.0199806313805424, 时间:2023-05-12 17:51:26
该进程的cpu占用率:2.017883725187063, 时间:2023-05-12 17:51:27
该进程的cpu占用率:2.013761094489964, 时间:2023-05-12 17:51:28
该进程的cpu占用率:2.0116650241964447, 时间:2023-05-12 17:51:29
该进程的cpu占用率:2.007604446787629, 时间:2023-05-12 17:51:30
该进程的cpu占用率:2.0055203858640325, 时间:2023-05-12 17:51:31
该进程的cpu占用率:2.00147106534834, 时间:2023-05-12 17:51:32
该进程的cpu占用率:1.9994107108475376, 时间:2023-05-12 17:51:33
该进程的cpu占用率:1.9954224100207179, 时间:2023-05-12 17:51:34
该进程的cpu占用率:1.9934144061682826, 时间:2023-05-12 17:51:35
^Csignal: interrupt
添加更多信息:
go func() {
pid := os.Getpid()
fmt.Println("当前程序的进程号为:", pid)
p, _ := process.NewProcess(int32(pid))
for {
v, _ := p.CPUPercent()
//if v != 0.0 {
if v > 0 {
fmt.Printf("该进程的cpu占用率:%v, 时间:%v\n", v, time.Now().Format(time.DateTime))
name, _ := p.Name()
fmt.Println("进程名称:", name)
fmt.Println("p.String():", p.String())
cpuTime, _ := p.Times()
spew.Dump("p.Times()", cpuTime)
mem, _ := p.MemoryInfo()
fmt.Println("内存信息:", mem)
memPercent, _ := p.MemoryPercent()
fmt.Println("内存占用:", memPercent)
fmt.Println("---------------")
}
time.Sleep(5 * time.Second)
}
}()
最初!程序中goroutine的数量为:3,allg大小为 8
当前程序的进程号为: 37782
该进程的cpu占用率:10.473671807493911, 时间:2023-05-12 17:58:31
进程名称: 1
p.String(): {"pid":37782}
(string) (len=9) "p.Times()"
(*cpu.TimesStat)(0x14000268060)({"cpu":"cpu","user":0.1,"system":0.1,"idle":0.0,"nice":0.0,"iowait":0.0,"irq":0.0,"softirq":0.0,"steal":0.0,"guest":0.0,"guestNice":0.0})
内存信息: {"rss":74186752,"vms":419716349952,"hwm":0,"data":0,"stack":0,"locked":0,"swap":0}
内存占用: 0.51259995
---------------
该进程的cpu占用率:73.0484377701357, 时间:2023-05-12 17:58:37
进程名称: 1
p.String(): {"pid":37782}
(string) (len=9) "p.Times()"
(*cpu.TimesStat)(0x140000b1560)({"cpu":"cpu","user":2.4,"system":2.0,"idle":0.0,"nice":0.0,"iowait":0.0,"irq":0.0,"softirq":0.0,"steal":0.0,"guest":0.0,"guestNice":0.0})
内存信息: {"rss":2442985472,"vms":422265225216,"hwm":0,"data":0,"stack":0,"locked":0,"swap":0}
内存占用: 14.220333
---------------
最后!程序中goroutine的数量为:1000003,allg大小为 1000021
该进程的cpu占用率:42.14652907018322, 时间:2023-05-12 17:58:42
进程名称: 1
p.String(): {"pid":37782}
(string) (len=9) "p.Times()"
(*cpu.TimesStat)(0x14000268ea0)({"cpu":"cpu","user":2.5,"system":2.2,"idle":0.0,"nice":0.0,"iowait":0.0,"irq":0.0,"softirq":0.0,"steal":0.0,"guest":0.0,"guestNice":0.0})
内存信息: {"rss":2261975040,"vms":422265225216,"hwm":0,"data":0,"stack":0,"locked":0,"swap":0}
内存占用: 13.166618
---------------
5s后程序中goroutine的数量为:64095,allg大小为 1000021
该进程的cpu占用率:36.76002032437266, 时间:2023-05-12 17:58:47
进程名称: 1
p.String(): {"pid":37782}
(string) (len=9) "p.Times()"
(*cpu.TimesStat)(0x14001b175c0)({"cpu":"cpu","user":3.0,"system":2.9,"idle":0.0,"nice":0.0,"iowait":0.0,"irq":0.0,"softirq":0.0,"steal":0.0,"guest":0.0,"guestNice":0.0})
内存信息: {"rss":2648489984,"vms":422265225216,"hwm":0,"data":0,"stack":0,"locked":0,"swap":0}
内存占用: 15.416431
---------------
10s后程序中goroutine的数量为:3,allg大小为 1000021
该进程的cpu占用率:28.051251152138803, 时间:2023-05-12 17:58:52
进程名称: 1
p.String(): {"pid":37782}
(string) (len=9) "p.Times()"
(*cpu.TimesStat)(0x140006b59e0)({"cpu":"cpu","user":3.0,"system":3.0,"idle":0.0,"nice":0.0,"iowait":0.0,"irq":0.0,"softirq":0.0,"steal":0.0,"guest":0.0,"guestNice":0.0})
内存信息: {"rss":2625159168,"vms":422265225216,"hwm":0,"data":0,"stack":0,"locked":0,"swap":0}
内存占用: 15.280724
---------------
15s后程序中goroutine的数量为:3,allg大小为 1000021
该进程的cpu占用率:22.689585162832593, 时间:2023-05-12 17:58:57
进程名称: 1
p.String(): {"pid":37782}
(string) (len=9) "p.Times()"
(*cpu.TimesStat)(0x140006b5f80)({"cpu":"cpu","user":3.0,"system":3.0,"idle":0.0,"nice":0.0,"iowait":0.0,"irq":0.0,"softirq":0.0,"steal":0.0,"guest":0.0,"guestNice":0.0})
内存信息: {"rss":2352971776,"vms":422265225216,"hwm":0,"data":0,"stack":0,"locked":0,"swap":0}
内存占用: 13.696194
---------------
20s后程序中goroutine的数量为:3,allg大小为 1000021
该进程的cpu占用率:19.40899638100816, 时间:2023-05-12 17:59:02
进程名称: 1
p.String(): {"pid":37782}
(string) (len=9) "p.Times()"
(*cpu.TimesStat)(0x140013564e0)({"cpu":"cpu","user":3.0,"system":3.0,"idle":0.0,"nice":0.0,"iowait":0.0,"irq":0.0,"softirq":0.0,"steal":0.0,"guest":0.0,"guestNice":0.0})
内存信息: {"rss":2301083648,"vms":422265290752,"hwm":0,"data":0,"stack":0,"locked":0,"swap":0}
内存占用: 13.39426
---------------
25s后程序中goroutine的数量为:50003,allg大小为 1000021
该进程的cpu占用率:16.710765594472644, 时间:2023-05-12 17:59:07
进程名称: 1
p.String(): {"pid":37782}
(string) (len=9) "p.Times()"
(*cpu.TimesStat)(0x140002696e0)({"cpu":"cpu","user":3.0,"system":3.0,"idle":0.0,"nice":0.0,"iowait":0.0,"irq":0.0,"softirq":0.0,"steal":0.0,"guest":0.0,"guestNice":0.0})
内存信息: {"rss":2254815232,"vms":422265290752,"hwm":0,"data":0,"stack":0,"locked":0,"swap":0}
内存占用: 13.124943
---------------
30s后程序中goroutine的数量为:3,allg大小为 1000021
该进程的cpu占用率:14.962746157181199, 时间:2023-05-12 17:59:12
进程名称: 1
p.String(): {"pid":37782}
(string) (len=9) "p.Times()"
(*cpu.TimesStat)(0x140005ac060)({"cpu":"cpu","user":3.1,"system":3.1,"idle":0.0,"nice":0.0,"iowait":0.0,"irq":0.0,"softirq":0.0,"steal":0.0,"guest":0.0,"guestNice":0.0})
内存信息: {"rss":2255355904,"vms":422265290752,"hwm":0,"data":0,"stack":0,"locked":0,"swap":0}
内存占用: 13.128185
---------------
该进程的cpu占用率:13.378509902863806, 时间:2023-05-12 17:59:17
进程名称: 1
p.String(): {"pid":37782}
(string) (len=9) "p.Times()"
(*cpu.TimesStat)(0x140001c2840)({"cpu":"cpu","user":3.1,"system":3.1,"idle":0.0,"nice":0.0,"iowait":0.0,"irq":0.0,"softirq":0.0,"steal":0.0,"guest":0.0,"guestNice":0.0})
内存信息: {"rss":2214690816,"vms":422265290752,"hwm":0,"data":0,"stack":0,"locked":0,"swap":0}
内存占用: 12.891483
---------------
^Csignal: interrupt
{"rss":2214690816,"vms":422265290752,"hwm":0,"data":0,"stack":0,"locked":0,"swap":0}什么意思
这个是一个进程的内存信息,各个字段的含义如下:
-
rss(Resident Set Size):进程使用的物理内存大小,包含共享库占用的内存。 -
vms(Virtual Memory Size):进程使用的虚拟内存大小,包括堆、栈、共享库和映射文件占用的内存。 -
hwm(High Water Mark):进程使用的最大物理内存大小。 -
data:进程数据段(.data 和 .bss)的大小。 -
stack:进程使用的栈内存大小。 -
locked:进程锁定的内存大小。 -
swap:进程使用的交换空间大小。
rss和vms有什么区别?哪个指标更重要
在psutil中,rss代表“常驻集大小(Resident Set Size)”,它是进程使用的物理内存的大小(即实际占用的内存大小),单位为字节(bytes)。而vms则代表“虚拟内存大小(Virtual Memory Size)”,它是进程使用的虚拟内存的大小,包括进程使用的物理内存和交换空间(swap space)大小,单位也是字节。
简单来说,rss是进程实际占用的物理内存大小,而vms则是进程使用的虚拟内存大小。因此,两者的区别在于vms包括了除物理内存外的其他资源,例如交换空间等。
对于进程的性能监控,两个指标都很重要,具体哪个指标更重要取决于具体情况。如果系统中物理内存资源紧张,那么rss可能更重要,因为它反映了进程占用的实际物理内存大小。如果系统中交换空间紧张,那么vms可能更重要,因为它反映了进程占用的虚拟内存大小,包括了交换空间。
VSS、RSS、PSS、USS 内存使用分析
oom是指哪个指标超出了限制
OOM(Out of Memory)通常指进程或系统内存不足,导致无法继续分配所需的内存空间。在Linux系统中,OOM Killer 是一个内核特性,可以在系统内存不足时选择杀死某些进程,以便释放更多内存。
OOM Killer 选择杀死哪个进程通常取决于多个因素,包括进程使用的内存总量、进程使用的虚拟内存(VMS)总量、进程使用的物理内存(RSS)总量等。如果进程使用的内存超出了系统的限制,则可能会触发 OOM Killer 来杀死进程,以便释放内存。因此,OOM 不是指哪个具体的指标超出了限制,而是指内存使用总量超出了系统限制。
Go-1-12-关于内存释放的一个改进
Go语言版本演
{"cpu":"cpu","user":3.1,"system":3.1,"idle":0.0,"nice":0.0,"iowait":0.0,"irq":0.0,"softirq":0.0,"steal":0.0,"guest":0.0,"guestNice":0.0})什么意思?
这是一个关于 CPU 使用率的数据,包含了各个方面的使用情况:
-
cpu 表示整个 CPU 的使用情况 -
user 表示用户空间程序的 CPU 使用率 -
system 表示内核空间程序的 CPU 使用率 -
idle 表示 CPU 空闲的时间比例 -
nice 表示带有优先级的用户空间程序的 CPU 使用率 -
iowait 表示 CPU 等待 I/O 的时间比例 -
irq 表示硬件中断的 CPU 使用率 -
softirq 表示软件中断的 CPU 使用率 -
steal 表示被虚拟机偷走的 CPU 时间比例 -
guest 表示虚拟 CPU 的 CPU 使用率 -
guestNice 表示带有优先级的虚拟 CPU 的 CPU 使用率
其中,user 和 system 表示的是 CPU 真正执行的用户程序和内核程序的 CPU 使用率,nice 表示的是优先级较低的用户程序的 CPU 使用率,这三个指标通常被称为 CPU 的总体使用率。idle 则表示 CPU 空闲的时间比例,越高表示 CPU 的利用率越低。
这个数据格式可以用来实时监控 CPU 的使用率,对于优化系统性能有很大的帮助。
想要了解Go更多内容,欢迎扫描下方👇关注公众号,回复关键词 [实战群] ,就有机会进群和我们进行交流