...

Source file src/github.com/Microsoft/hcsshim/internal/winapi/system.go

Documentation: github.com/Microsoft/hcsshim/internal/winapi

     1  //go:build windows
     2  
     3  package winapi
     4  
     5  import "golang.org/x/sys/windows"
     6  
     7  const SystemProcessInformation = 5
     8  
     9  const STATUS_INFO_LENGTH_MISMATCH = 0xC0000004
    10  
    11  // __kernel_entry NTSTATUS NtQuerySystemInformation(
    12  // 	SYSTEM_INFORMATION_CLASS SystemInformationClass,
    13  // 	PVOID                    SystemInformation,
    14  // 	ULONG                    SystemInformationLength,
    15  // 	PULONG                   ReturnLength
    16  // );
    17  //
    18  //sys NtQuerySystemInformation(systemInfoClass int, systemInformation unsafe.Pointer, systemInfoLength uint32, returnLength *uint32) (status uint32) = ntdll.NtQuerySystemInformation
    19  
    20  type SYSTEM_PROCESS_INFORMATION struct {
    21  	NextEntryOffset              uint32         // ULONG
    22  	NumberOfThreads              uint32         // ULONG
    23  	WorkingSetPrivateSize        int64          // LARGE_INTEGER
    24  	HardFaultCount               uint32         // ULONG
    25  	NumberOfThreadsHighWatermark uint32         // ULONG
    26  	CycleTime                    uint64         // ULONGLONG
    27  	CreateTime                   int64          // LARGE_INTEGER
    28  	UserTime                     int64          // LARGE_INTEGER
    29  	KernelTime                   int64          // LARGE_INTEGER
    30  	ImageName                    UnicodeString  // UNICODE_STRING
    31  	BasePriority                 int32          // KPRIORITY
    32  	UniqueProcessID              windows.Handle // HANDLE
    33  	InheritedFromUniqueProcessID windows.Handle // HANDLE
    34  	HandleCount                  uint32         // ULONG
    35  	SessionID                    uint32         // ULONG
    36  	UniqueProcessKey             *uint32        // ULONG_PTR
    37  	PeakVirtualSize              uintptr        // SIZE_T
    38  	VirtualSize                  uintptr        // SIZE_T
    39  	PageFaultCount               uint32         // ULONG
    40  	PeakWorkingSetSize           uintptr        // SIZE_T
    41  	WorkingSetSize               uintptr        // SIZE_T
    42  	QuotaPeakPagedPoolUsage      uintptr        // SIZE_T
    43  	QuotaPagedPoolUsage          uintptr        // SIZE_T
    44  	QuotaPeakNonPagedPoolUsage   uintptr        // SIZE_T
    45  	QuotaNonPagedPoolUsage       uintptr        // SIZE_T
    46  	PagefileUsage                uintptr        // SIZE_T
    47  	PeakPagefileUsage            uintptr        // SIZE_T
    48  	PrivatePageCount             uintptr        // SIZE_T
    49  	ReadOperationCount           int64          // LARGE_INTEGER
    50  	WriteOperationCount          int64          // LARGE_INTEGER
    51  	OtherOperationCount          int64          // LARGE_INTEGER
    52  	ReadTransferCount            int64          // LARGE_INTEGER
    53  	WriteTransferCount           int64          // LARGE_INTEGER
    54  	OtherTransferCount           int64          // LARGE_INTEGER
    55  }
    56  

View as plain text