2016-10-05 15 views

Trả lời

0

Mỗi thống kê rằng Windows đã có thể được acessed sử dụng API Powershell của nó:

Get-Counter https://technet.microsoft.com/en-us/library/hh849685.aspx

Vì vậy, ví dụ , nếu bạn làm:

Set-Alias grep Select-String 
(Get-Counter -List PhysicalDisk).PathsWithInstances | grep "C:" 

bạn sẽ nhận được một danh sách của tất cả các thống kê cho bạn ổ C:

\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 

Từ trang người đàn ông của 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. 

Tôi làm theo các cách giải thích:
https://unix.stackexchange.com/questions/104192/iostat-await-vs-svctm
http://www.xaprb.com/blog/2010/09/06/beware-of-svctm-in-linuxs-iostat/

Bao gồm các cuộc thảo luận rằng svctm không nên được sử dụng nữa.

Nếu bạn thấy https://blogs.technet.microsoft.com/askcore/2012/02/07/measuring-disk-latency-with-windows-performance-monitor-perfmon/, bạn sẽ thấy rằng Windows có nội dung tương tự.

Bộ đếm tên "\ PhysicalDisk (*) \ Avg đĩa giây/Transfer." Biện pháp thời gian dành cho:
- Class driver
- Port Driver
- Device Miniport driver
- Đĩa Subsystem

vì vậy, ví dụ chúng ta có thể theo dõi những thống kê này với:

Get-Counter -Counter "\PhysicalDisk(0 C:)\% Disk Time" 
Get-Counter -Counter "\PhysicalDisk(0 C:)\Avg. Disk sec/Transfer" 

hoặc nếu bạn thích, phiên bản "pipelined" hơn:

"\PhysicalDisk(0 C:)\% Disk Time","\PhysicalDisk(0 C:)\Avg. Disk sec/Transfer" >> counters.txt 
cat counters.txt | Get-Counter 

Đối với một lời giải thích chi tiết hơn về từng truy cập xem:
https://blogs.technet.microsoft.com/askcore/2012/03/16/windows-performance-monitor-disk-counters-explained/

Các vấn đề liên quan