mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
This tag of hcsshim brings in a couple welcome features/improvements. One being exposing a way to query for hns endpoint statistics (Packets received/sent etc.). This tag also contains some optimizations for querying whether a certain HCN feature is supported, which is a common workflow in kube-proxy on Windows. The first result from querying HCN is now cached so further calls can skip the hcn query as well as the version range parsing that was performed. This also gets rid of some redundant logs that used to hit everytime the version range parsing occurred. The Go-winio dep bump, and all of the ctrd deps are transitive only. Nothing new is needed/intended to be used. Signed-off-by: Daniel Canter <dcanter@microsoft.com>
53 lines
2.5 KiB
Go
53 lines
2.5 KiB
Go
package winapi
|
|
|
|
import "golang.org/x/sys/windows"
|
|
|
|
const SystemProcessInformation = 5
|
|
|
|
const STATUS_INFO_LENGTH_MISMATCH = 0xC0000004
|
|
|
|
// __kernel_entry NTSTATUS NtQuerySystemInformation(
|
|
// SYSTEM_INFORMATION_CLASS SystemInformationClass,
|
|
// PVOID SystemInformation,
|
|
// ULONG SystemInformationLength,
|
|
// PULONG ReturnLength
|
|
// );
|
|
//sys NtQuerySystemInformation(systemInfoClass int, systemInformation uintptr, systemInfoLength uint32, returnLength *uint32) (status uint32) = ntdll.NtQuerySystemInformation
|
|
|
|
type SYSTEM_PROCESS_INFORMATION struct {
|
|
NextEntryOffset uint32 // ULONG
|
|
NumberOfThreads uint32 // ULONG
|
|
WorkingSetPrivateSize int64 // LARGE_INTEGER
|
|
HardFaultCount uint32 // ULONG
|
|
NumberOfThreadsHighWatermark uint32 // ULONG
|
|
CycleTime uint64 // ULONGLONG
|
|
CreateTime int64 // LARGE_INTEGER
|
|
UserTime int64 // LARGE_INTEGER
|
|
KernelTime int64 // LARGE_INTEGER
|
|
ImageName UnicodeString // UNICODE_STRING
|
|
BasePriority int32 // KPRIORITY
|
|
UniqueProcessID windows.Handle // HANDLE
|
|
InheritedFromUniqueProcessID windows.Handle // HANDLE
|
|
HandleCount uint32 // ULONG
|
|
SessionID uint32 // ULONG
|
|
UniqueProcessKey *uint32 // ULONG_PTR
|
|
PeakVirtualSize uintptr // SIZE_T
|
|
VirtualSize uintptr // SIZE_T
|
|
PageFaultCount uint32 // ULONG
|
|
PeakWorkingSetSize uintptr // SIZE_T
|
|
WorkingSetSize uintptr // SIZE_T
|
|
QuotaPeakPagedPoolUsage uintptr // SIZE_T
|
|
QuotaPagedPoolUsage uintptr // SIZE_T
|
|
QuotaPeakNonPagedPoolUsage uintptr // SIZE_T
|
|
QuotaNonPagedPoolUsage uintptr // SIZE_T
|
|
PagefileUsage uintptr // SIZE_T
|
|
PeakPagefileUsage uintptr // SIZE_T
|
|
PrivatePageCount uintptr // SIZE_T
|
|
ReadOperationCount int64 // LARGE_INTEGER
|
|
WriteOperationCount int64 // LARGE_INTEGER
|
|
OtherOperationCount int64 // LARGE_INTEGER
|
|
ReadTransferCount int64 // LARGE_INTEGER
|
|
WriteTransferCount int64 // LARGE_INTEGER
|
|
OtherTransferCount int64 // LARGE_INTEGER
|
|
}
|