Author Topic: SYSTEM_PERFORMANCE_INFORMATION documented  (Read 4083 times)

guga

  • Moderator
  • Member
  • *****
  • Posts: 1196
  • Assembly is a state of art.
    • RosAsm
SYSTEM_PERFORMANCE_INFORMATION documented
« on: July 13, 2014, 08:23:44 PM »
SYSTEM_PERFORMANCE_INFORMATION structure documented by me

Quote
SYSTEM_PERFORMANCE_INFORMATION

This structure can be used to generate an unpredictable seed for a random number generator. Use the CryptGenRandom function instead.

RosAsm Syntax:

There are 2 versions in RosAsm. One for Win8 and above and other for older versions.
The only differences is that on the win8 version there are 3 members added: CcTotalDirtyPages, CcDirtyPageThreshold, ResidentAvailablePages as described below:

; WinNT, WinXP, WinVista, Win7

[SYSTEM_PERFORMANCE_INFORMATION:
 SYSTEM_PERFORMANCE_INFORMATION.IdleProcessTime: Q$ 0
 SYSTEM_PERFORMANCE_INFORMATION.IoReadTransferCount: Q$ 0
 SYSTEM_PERFORMANCE_INFORMATION.IoWriteTransferCount: Q$ 0
 SYSTEM_PERFORMANCE_INFORMATION.IoOtherTransferCount: Q$ 0
 SYSTEM_PERFORMANCE_INFORMATION.IoReadOperationCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.IoWriteOperationCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.IoOtherOperationCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.AvailablePages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CommittedPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CommitLimit: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.PeakCommitment: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.PageFaultCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CopyOnWriteCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.TransitionCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CacheTransitionCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.DemandZeroCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.PageReadCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.PageReadIoCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CacheReadCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CacheIoCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.DirtyPagesWriteCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.DirtyWriteIoCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.MappedPagesWriteCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.MappedWriteIoCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.PagedPoolPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.NonPagedPoolPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.PagedPoolAllocs: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.PagedPoolFrees: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.NonPagedPoolAllocs: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.NonPagedPoolFrees: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.FreeSystemPtes: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.ResidentSystemCodePage: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.TotalSystemDriverPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.TotalSystemCodePages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.NonPagedPoolLookasideHits: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.PagedPoolLookasideHits: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.AvailablePagedPoolPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.ResidentSystemCachePage: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.ResidentPagedPoolPage: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.ResidentSystemDriverPage: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcFastReadNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcFastReadWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcFastReadResourceMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcFastReadNotPossible: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcFastMdlReadNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcFastMdlReadWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcFastMdlReadResourceMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcFastMdlReadNotPossible: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcMapDataNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcMapDataWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcMapDataNoWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcMapDataWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcPinMappedDataCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcPinReadNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcPinReadWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcPinReadNoWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcPinReadWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcCopyReadNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcCopyReadWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcCopyReadNoWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcCopyReadWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcMdlReadNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcMdlReadWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcMdlReadNoWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcMdlReadWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcReadAheadIos: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcLazyWriteIos: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcLazyWritePages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcDataFlushes: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcDataPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.ContextSwitches: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.FirstLevelTbFills: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.SecondLevelTbFills: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.SystemCalls: D$ 0]

; Win8 and above

[SYSTEM_PERFORMANCE_INFORMATION_WIN8:
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.IdleProcessTime: Q$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.IoReadTransferCount: Q$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.IoWriteTransferCount: Q$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.IoOtherTransferCount: Q$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.IoReadOperationCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.IoWriteOperationCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.IoOtherOperationCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.AvailablePages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CommittedPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CommitLimit: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.PeakCommitment: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.PageFaultCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CopyOnWriteCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.TransitionCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CacheTransitionCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.DemandZeroCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.PageReadCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.PageReadIoCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CacheReadCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CacheIoCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.DirtyPagesWriteCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.DirtyWriteIoCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.MappedPagesWriteCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.MappedWriteIoCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.PagedPoolPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.NonPagedPoolPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.PagedPoolAllocs: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.PagedPoolFrees: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.NonPagedPoolAllocs: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.NonPagedPoolFrees: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.FreeSystemPtes: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.ResidentSystemCodePage: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.TotalSystemDriverPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.TotalSystemCodePages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.NonPagedPoolLookasideHits: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.PagedPoolLookasideHits: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.AvailablePagedPoolPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.ResidentSystemCachePage: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.ResidentPagedPoolPage: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.ResidentSystemDriverPage: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcFastReadNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcFastReadWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcFastReadResourceMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcFastReadNotPossible: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcFastMdlReadNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcFastMdlReadWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcFastMdlReadResourceMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcFastMdlReadNotPossible: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcMapDataNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcMapDataWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcMapDataNoWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcMapDataWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcPinMappedDataCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcPinReadNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcPinReadWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcPinReadNoWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcPinReadWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcCopyReadNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcCopyReadWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcCopyReadNoWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcCopyReadWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcMdlReadNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcMdlReadWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcMdlReadNoWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcMdlReadWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcReadAheadIos: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcLazyWriteIos: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcLazyWritePages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcDataFlushes: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcDataPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.ContextSwitches: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.FirstLevelTbFills: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.SecondLevelTbFills: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.SystemCalls: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcTotalDirtyPages: Q$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcDirtyPageThreshold: Q$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.ResidentAvailablePages: Q$ 0]

C Syntax:
typedef struct _SYSTEM_PERFORMANCE_INFORMATION { // Information Class 2
LARGE_INTEGER IdleProcessTime;
LARGE_INTEGER IoReadTransferCount;
LARGE_INTEGER IoWriteTransferCount;
LARGE_INTEGER IoOtherTransferCount;
ULONG IoReadOperationCount;
ULONG IoWriteOperationCount;
ULONG IoOtherOperationCount;
ULONG AvailablePages;
ULONG CommittedPages;
ULONG CommitLimit;
ULONG PeakCommitment;
ULONG PageFaultCount;
ULONG CopyOnWriteCount;
ULONG TransitionCount;
ULONG CacheTransitionCount;
ULONG DemandZeroCount;
ULONG PageReadCount;
ULONG PageReadIoCount;
ULONG CacheReadCount;
ULONG CacheIoCount;
ULONG DirtyPagesWriteCount;
ULONG DirtyWriteIoCount;
ULONG MappedPagesWriteCount;
ULONG MappedWriteIoCount;
ULONG PagedPoolPages;
ULONG NonPagedPoolPages;
ULONG PagedPoolAllocs;
ULONG PagedPoolFrees;
ULONG NonPagedPoolAllocs;
ULONG NonPagedPoolFrees;
ULONG FreeSystemPtes;
ULONG ResidentSystemCodePage;
ULONG TotalSystemDriverPages;
ULONG TotalSystemCodePages;
ULONG NonPagedPoolLookasideHits;
ULONG PagedPoolLookasideHits;
ULONG AvailablePagedPoolPages;
ULONG ResidentSystemCachePage;
ULONG ResidentPagedPoolPage;
ULONG ResidentSystemDriverPage;
ULONG CcFastReadNoWait;
ULONG CcFastReadWait;
ULONG CcFastReadResourceMiss;
ULONG CcFastReadNotPossible;
ULONG CcFastMdlReadNoWait;
ULONG CcFastMdlReadWait;
ULONG CcFastMdlReadResourceMiss;
ULONG CcFastMdlReadNotPossible;
ULONG CcMapDataNoWait;
ULONG CcMapDataWait;
ULONG CcMapDataNoWaitMiss;
ULONG CcMapDataWaitMiss;
ULONG CcPinMappedDataCount;
ULONG CcPinReadNoWait;
ULONG CcPinReadWait;
ULONG CcPinReadNoWaitMiss;
ULONG CcPinReadWaitMiss;
ULONG CcCopyReadNoWait;
ULONG CcCopyReadWait;
ULONG CcCopyReadNoWaitMiss;
ULONG CcCopyReadWaitMiss;
ULONG CcMdlReadNoWait;
ULONG CcMdlReadWait;
ULONG CcMdlReadNoWaitMiss;
ULONG CcMdlReadWaitMiss;
ULONG CcReadAheadIos;
ULONG CcLazyWriteIos;
ULONG CcLazyWritePages;
ULONG CcDataFlushes;
ULONG CcDataPages;
ULONG ContextSwitches;
ULONG FirstLevelTbFills;
ULONG SecondLevelTbFills;
ULONG SystemCalls;
; Below are only available in Windows 8, windows web server 8 or above
UINT64 CcTotalDirtyPages;
UINT64 CcDirtyPageThreshold;
INT64 ResidentAvailablePages;
} SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION;

Members
IdleProcessTime
   The total idle time, measured in units of 100-nanoseconds, of all the processors in the system.
IoReadTransferCount
   The number of bytes read by all calls to ZwReadFile.
IoWriteTransferCount
   The number of bytes written by all calls to ZwWriteFile.
IoOtherTransferCount
   The number of bytes transferred to satisfy all other I/O operations, such as ZwDeviceIoControlFile.
IoReadOperationCount
   The number of calls to ZwReadFile.
IoWriteOperationCount
   The number of calls to ZwWriteFile.
IoOtherOperationCount
   The number of calls to all other I/O system services such as ZwDeviceIoControlFile.
AvailablePages
   The number of pages of physical memory available to processes running on the system.
CommittedPages
   The number of pages of committed virtual memory.
CommitLimit
   The number of pages of virtual memory that could be committed without extending the system’s pagefiles.
PeakCommitment
   The peak number of pages of committed virtual memory.
PageFaultCount
   The number of page faults (both soft and hard).
CopyOnWriteCount
   The number of page faults arising from attempts to write to copy-on-write pages.
TransitionCount
   The number of soft page faults (excluding demand zero faults).
CacheTransitionCount
   The number of cached pages fault
DemandZeroCount
   The number of demand zero faults.
PageReadCount
   The number of pages read from disk to resolve page faults.
PageReadIoCount
   The number of read operations initiated to resolve page faults.
CacheReadCount
   The number of cached pages read from disk to resolve page faults.
CacheIoCount
   The number of cached read operations initiated to resolve page faults.
DirtyPagesWriteCount
   The number of pages written to the system’s pagefiles.
DirtyWriteIoCount
   The number of write operations performed on the system’s pagefiles.
MappedPagesWriteCount
   The number of pages written to mapped files.
MappedWriteIoCount
   The number of write operations performed on mapped files.
PagedPoolPages
   The number of pages of virtual memory used by the paged pool.
NonPagedPoolPages
   The number of pages of virtual memory used by the nonpaged pool.
PagedPoolAllocs
   The number of allocations made from the paged pool.
PagedPoolFrees
   The number of allocations returned to the paged pool.
NonPagedPoolAllocs
   The number of allocations made from the nonpaged pool.
NonPagedPoolFrees
   The number of allocations returned to the nonpaged pool.
FreeSystemPtes
   The number of available System Page Table Entries.
ResidentSystemCodePage
   The number of pages of pageable operating system code and static data in physical memory.The meaning of “operating system code and static data” is defined by address range (lowest system address to start of system cache) and includes a contribution from win32k.sys.
TotalSystemDriverPages
   The number of pages of pageable device driver code and static data.
TotalSystemCodePages
   The number of pages of pageable operating system code and static data.The meaning of “operating system code and static data” is defined by load time (SERVICE_BOOT_START driver or earlier) and does not include a contribution from win32k.sys.
NonPagedPoolLookasideHits
   The number of times an allocation could be satisfied by one of the small nonpaged lookaside lists.
PagedPoolLookasideHits
   The number of times an allocation could be satisfied by one of the small-paged lookaside lists.
AvailablePagedPoolPages
   The number of available page pools.
ResidentSystemCachePage
   The number of pages of the system cache in physical memory.
ResidentPagedPoolPage
   The number of pages of paged pool in physical memory.
ResidentSystemDriverPage
   The number of pages of pageable device driver code and static data in physical memory.
CcFastReadNoWait
   The number of asynchronous fast read operations.
CcFastReadWait
   The number of synchronous fast read operations.
CcFastReadResourceMiss
   The number of fast read operations not possible because of resource conflicts.
CcFastReadNotPossible
   The number of fast read operations not possible because file system intervention required.
CcFastMdlReadNoWait
   The number of asynchronous fast read operations requesting a Memory Descriptor List (MDL) for the data.
CcFastMdlReadWait
   The number of synchronous fast read operations requesting an MDL for the data.
CcFastMdlReadResourceMiss
   The number of synchronous fast read operations requesting an MDL for the data not possible because of resource conflicts.
CcFastMdlReadNotPossible
   The number of synchronous fast read operations requesting an MDL for the data not possible because file system intervention required.
CcMapDataNoWait
   The number of asynchronous data map operations.
CcMapDataWait
   The number of synchronous data map operations.
CcMapDataNoWaitMiss
   The number of asynchronous data map operations that incurred page faults.
CcMapDataWaitMiss
   The number of synchronous data map operations that incurred page faults.
CcPinMappedDataCount
   The number of requests to pin mapped data.
CcPinReadNoWait
   The number of asynchronous requests to pin mapped data.
CcPinReadWait
   The number of synchronous requests to pin mapped data.
CcPinReadNoWaitMiss
   The number of asynchronous requests to pin mapped data that incurred page faults when pinning the data.
CcPinReadWaitMiss
   The number of synchronous requests to pin mapped data that incurred page faults when pinning the data.
CcCopyReadNoWait
   The number of asynchronous copy read operations.
CcCopyReadWait
   The number of synchronous copy read operations.
CcCopyReadNoWaitMiss
   The number of asynchronous copy read operations that incurred page faults when reading from the cache.
CcCopyReadWaitMiss
   The number of synchronous copy read operations that incurred page faults when reading from the cache.
CcMdlReadNoWait
   The number of synchronous read operations requesting an MDL for the cached data.
CcMdlReadWait
   The number of synchronous read operations requesting an MDL for the cached data.
CcMdlReadNoWaitMiss
   The number of synchronous read operations requesting an MDL for the cached data that incurred page faults.
CcMdlReadWaitMiss
   The number of synchronous read operations requesting an MDL for the cached data that incurred page faults.
CcReadAheadIos
   The number of read ahead operations performed in anticipation of sequential access.
CcLazyWriteIos
   The number of write operations initiated by the Lazy Writer.
CcLazyWritePages
   The number of pages written by the Lazy Writer.
CcDataFlushes
   The number of cache flushes in response to flush requests.
CcDataPages
   The number of cache pages flushed in response to flush requests.
ContextSwitches
   The number of context switches.
FirstLevelTbFills
   The number of first level translation buffer fills.
SecondLevelTbFills
   The number of second level translation buffer fills.
SystemCalls
   The number of system calls executed.
CcTotalDirtyPages
   The total amount of logical sequence number (LSN) found in the set of dirty pages. The values can also be retrieved with CcGetDirtyPages function
CcDirtyPageThreshold
   The number of pages, the dirty page threshold value. This value can be defined in CcSetDirtyPageThreshold function
ResidentAvailablePages
   The number of free pages there would be if everything that needs to be resident in ram actually was present at the same time (ie, all kernel thread stacks have been swapped in, all processes are at their working set minimums, etc).

Remarks
   Slightly longer descriptions of many of the members of this structure can be found in the Win32 documentation for the NT Performance Counters.

See Also:
CryptGenRandom
CcSetDirtyPageThreshold
CcGetDirtyPages


This structure is to be used with SYS_NFO_SYSTEM_PERFORMANCE_INFORMATION equate (Aka: SystemPerformanceInformation. Value = 02) in NtQuerySystemInformation function.
Coding in Assembly requires a mix of:
80% of brain, passion, intuition, creativity
10% of programming skills
10% of alcoholic levels in your blood.

My Code Sites:
http://rosasm.freeforums.org
http://winasm.tripod.com

guga

  • Moderator
  • Member
  • *****
  • Posts: 1196
  • Assembly is a state of art.
    • RosAsm
Re: SYSTEM_PERFORMANCE_INFORMATION documented
« Reply #1 on: July 13, 2014, 08:24:05 PM »
Example of usage:
For WinNT, WinXP, WinVista, Win7
Code: [Select]
[SYSTEM_PERFORMANCE_INFORMATION:
 SYSTEM_PERFORMANCE_INFORMATION.IdleProcessTime: Q$ 0
 SYSTEM_PERFORMANCE_INFORMATION.IoReadTransferCount: Q$ 0
 SYSTEM_PERFORMANCE_INFORMATION.IoWriteTransferCount: Q$ 0
 SYSTEM_PERFORMANCE_INFORMATION.IoOtherTransferCount: Q$ 0
 SYSTEM_PERFORMANCE_INFORMATION.IoReadOperationCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.IoWriteOperationCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.IoOtherOperationCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.AvailablePages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CommittedPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CommitLimit: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.PeakCommitment: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.PageFaultCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CopyOnWriteCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.TransitionCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CacheTransitionCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.DemandZeroCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.PageReadCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.PageReadIoCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CacheReadCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CacheIoCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.DirtyPagesWriteCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.DirtyWriteIoCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.MappedPagesWriteCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.MappedWriteIoCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.PagedPoolPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.NonPagedPoolPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.PagedPoolAllocs: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.PagedPoolFrees: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.NonPagedPoolAllocs: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.NonPagedPoolFrees: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.FreeSystemPtes: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.ResidentSystemCodePage: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.TotalSystemDriverPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.TotalSystemCodePages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.NonPagedPoolLookasideHits: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.PagedPoolLookasideHits: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.AvailablePagedPoolPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.ResidentSystemCachePage: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.ResidentPagedPoolPage: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.ResidentSystemDriverPage: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcFastReadNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcFastReadWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcFastReadResourceMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcFastReadNotPossible: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcFastMdlReadNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcFastMdlReadWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcFastMdlReadResourceMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcFastMdlReadNotPossible: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcMapDataNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcMapDataWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcMapDataNoWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcMapDataWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcPinMappedDataCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcPinReadNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcPinReadWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcPinReadNoWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcPinReadWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcCopyReadNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcCopyReadWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcCopyReadNoWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcCopyReadWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcMdlReadNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcMdlReadWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcMdlReadNoWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcMdlReadWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcReadAheadIos: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcLazyWriteIos: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcLazyWritePages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcDataFlushes: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.CcDataPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.ContextSwitches: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.FirstLevelTbFills: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.SecondLevelTbFills: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION.SystemCalls: D$ 0]

[Size_of_SYSTEM_PERFORMANCE_INFORMATION 312]

call 'ntdll.NtQuerySystemInformation' &SYS_NFO_SYSTEM_PERFORMANCE_INFORMATION, SYSTEM_PERFORMANCE_INFORMATION, Size_of_SYSTEM_PERFORMANCE_INFORMATION, 0

For Win8 and above
Code: [Select]
[SYSTEM_PERFORMANCE_INFORMATION_WIN8:
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.IdleProcessTime: Q$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.IoReadTransferCount: Q$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.IoWriteTransferCount: Q$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.IoOtherTransferCount: Q$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.IoReadOperationCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.IoWriteOperationCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.IoOtherOperationCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.AvailablePages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CommittedPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CommitLimit: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.PeakCommitment: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.PageFaultCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CopyOnWriteCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.TransitionCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CacheTransitionCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.DemandZeroCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.PageReadCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.PageReadIoCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CacheReadCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CacheIoCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.DirtyPagesWriteCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.DirtyWriteIoCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.MappedPagesWriteCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.MappedWriteIoCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.PagedPoolPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.NonPagedPoolPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.PagedPoolAllocs: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.PagedPoolFrees: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.NonPagedPoolAllocs: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.NonPagedPoolFrees: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.FreeSystemPtes: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.ResidentSystemCodePage: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.TotalSystemDriverPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.TotalSystemCodePages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.NonPagedPoolLookasideHits: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.PagedPoolLookasideHits: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.AvailablePagedPoolPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.ResidentSystemCachePage: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.ResidentPagedPoolPage: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.ResidentSystemDriverPage: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcFastReadNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcFastReadWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcFastReadResourceMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcFastReadNotPossible: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcFastMdlReadNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcFastMdlReadWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcFastMdlReadResourceMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcFastMdlReadNotPossible: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcMapDataNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcMapDataWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcMapDataNoWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcMapDataWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcPinMappedDataCount: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcPinReadNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcPinReadWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcPinReadNoWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcPinReadWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcCopyReadNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcCopyReadWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcCopyReadNoWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcCopyReadWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcMdlReadNoWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcMdlReadWait: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcMdlReadNoWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcMdlReadWaitMiss: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcReadAheadIos: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcLazyWriteIos: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcLazyWritePages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcDataFlushes: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcDataPages: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.ContextSwitches: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.FirstLevelTbFills: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.SecondLevelTbFills: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.SystemCalls: D$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcTotalDirtyPages: Q$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.CcDirtyPageThreshold: Q$ 0
 SYSTEM_PERFORMANCE_INFORMATION_WIN8.ResidentAvailablePages: Q$ 0]

[Size_of_SYSTEM_PERFORMANCE_INFORMATION_WIN8 336]

call 'ntdll.NtQuerySystemInformation' &SYS_NFO_SYSTEM_PERFORMANCE_INFORMATION, SYSTEM_PERFORMANCE_INFORMATION_WIN8, Size_of_SYSTEM_PERFORMANCE_INFORMATION_WIN8, 0
Coding in Assembly requires a mix of:
80% of brain, passion, intuition, creativity
10% of programming skills
10% of alcoholic levels in your blood.

My Code Sites:
http://rosasm.freeforums.org
http://winasm.tripod.com