![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
powershell
Wangcy.
一名知识搬运工。
展开
-
Windows通过命令行powershell获取单个进程读写IO
Windows通过命令行powershell获取单个进程读写IOPS C:\Users\wangchongyang\Desktop> get-counter "\Process(chrome*)\IO Read Bytes/sec" -Continuous | foreach { [math]::round((($_.countersamples.cookedvalue | measure -sum).sum / 1KB), 2) }原创 2020-09-01 11:32:04 · 1101 阅读 · 0 评论 -
windows查看进程CPU占用(powershell版本)
编写脚本cpu.ps1echo "cpu.ps1 {process name}"write-host "task list:" (get-process -name $args*).name$ids = (get-process -name $args*).id$sleepseconds = 1$numcores = 4$id = 11564while($true) {$cpu1=0$cpu2=0foreach ($id in $ids){ $cpu = (get-process原创 2020-08-13 17:57:59 · 4903 阅读 · 0 评论