我们在UNIX中使用iostat在unix中获取所有这些信息。我在windows中可以做什么?目前我们使用typeperf。
答案 0 :(得分:1)
还有一个实用程序“logman”。 关于这个主题的链接: 克林特霍夫曼博客&书 http://blogs.technet.com/b/clinth/ http://www.amazon.com/dp/0124167012/ref=wl...=I2TOVTYHI6HDHC
答案 1 :(得分:0)
使用其Powershell API可以获取Windows所拥有的每个统计信息:
GET-计数器 https://technet.microsoft.com/en-us/library/hh849685.aspx
所以,例如,如果你这样做:
Set-Alias grep Select-String
(Get-Counter -List PhysicalDisk).PathsWithInstances | grep "C:"
您将获得所有统计信息的列表C:drive
\PhysicalDisk(0 C:)\Current Disk Queue Length
\PhysicalDisk(0 C:)\% Disk Time
\PhysicalDisk(0 C:)\Avg. Disk Queue Length
\PhysicalDisk(0 C:)\% Disk Read Time
\PhysicalDisk(0 C:)\Avg. Disk Read Queue Length
\PhysicalDisk(0 C:)\% Disk Write Time
\PhysicalDisk(0 C:)\Avg. Disk Write Queue Length
\PhysicalDisk(0 C:)\Avg. Disk sec/Transfer
\PhysicalDisk(0 C:)\Avg. Disk sec/Read
\PhysicalDisk(0 C:)\Avg. Disk sec/Write
\PhysicalDisk(0 C:)\Disk Transfers/sec
\PhysicalDisk(0 C:)\Disk Reads/sec
\PhysicalDisk(0 C:)\Disk Writes/sec
\PhysicalDisk(0 C:)\Disk Bytes/sec
\PhysicalDisk(0 C:)\Disk Read Bytes/sec
\PhysicalDisk(0 C:)\Disk Write Bytes/sec
\PhysicalDisk(0 C:)\Avg. Disk Bytes/Transfer
\PhysicalDisk(0 C:)\Avg. Disk Bytes/Read
\PhysicalDisk(0 C:)\Avg. Disk Bytes/Write
\PhysicalDisk(0 C:)\% Idle Time
\PhysicalDisk(0 C:)\Split IO/Sec
来自iostat的手册页(http://linuxcommand.org/man_pages/iostat1.html)
svctm
The average service time (in milliseconds) for I/O
requests that were issued to the device.
await
The average time (in milliseconds) for I/O requests
issued to the device to be served. This includes the time
spent by the requests in queue and the time spent servicing them.
我遵循以下解释:
https://unix.stackexchange.com/questions/104192/iostat-await-vs-svctm
http://www.xaprb.com/blog/2010/09/06/beware-of-svctm-in-linuxs-iostat/
包括不应再使用svctm的讨论。
如果看到https://blogs.technet.microsoft.com/askcore/2012/02/07/measuring-disk-latency-with-windows-performance-monitor-perfmon/,您会看到Windows有类似的内容。
名为" \ PhysicalDisk(*)\ Avg的计数器。磁盘秒/转移"衡量所花费的时间:
- 班级司机
- 港口司机
- 设备微型端口驱动器
- 磁盘子系统
因此,举例来说,我们可以通过以下方式监控这些统计数据:
Get-Counter -Counter "\PhysicalDisk(0 C:)\% Disk Time"
Get-Counter -Counter "\PhysicalDisk(0 C:)\Avg. Disk sec/Transfer"
或者如果您愿意,更多"流水线"版本:
"\PhysicalDisk(0 C:)\% Disk Time","\PhysicalDisk(0 C:)\Avg. Disk sec/Transfer" >> counters.txt
cat counters.txt | Get-Counter
有关每个计数器的更详细说明,请参阅:
https://blogs.technet.microsoft.com/askcore/2012/03/16/windows-performance-monitor-disk-counters-explained/