Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Performance counters
#1
Macro
Code:
Select All      Help
;Performance counter functions.
;Can be used, for example, to create performance triggers.
;The counters are the same as you can see in Performance Monitor (perfmon.exe).
;At first call Open. Then repeatedly call Query. The first Query does not get results.

;EXAMPLES
out
#compile CPerformanceCounter
CPerformanceCounter c
c.Open("\LogicalDisk(C:)\% Disk Time") ;;logical disk C:
;c.Open("\PhysicalDisk(_Total)\% Disk Time") ;;all physical disks (the same as GetDiskUsage)
;c.Open("\Memory\Available MBytes") ;;free physical memory
;c.Open("\Network Interface(*)\Bytes Received/sec") ;;bytes received/s by all network adapters.
c.Query
rep 3
,1
,out c.Query

2014-01-12. Supports Unicode.


Attached Files
.qml   CPerformanceCounter.qml (Size: 2.75 KB / Downloads: 293)
Reply
#2
error in PDH_MORE_DATA
Reply
#3
Thank you. I used another winapi reference file.

def PDH_MORE_DATA 0x800007D2
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)