Overview
gopsutil provides robust support for Windows operating systems with native implementations for most system monitoring features. The library supports multiple architectures including traditional x86/x64 and modern ARM processors.Supported Architectures
i386
32-bit x86 processors
amd64
64-bit x86-64 processors (most common)
arm
32-bit ARM processors
arm64
64-bit ARM processors (Windows on ARM)
Windows on ARM (arm64) support makes gopsutil compatible with modern ARM-based Windows devices.
Feature Support
Fully Supported Features
CPU Metrics
cpu.Times()- CPU time statisticscpu.Count()- Number of logical and physical CPUscpu.Percent()- CPU utilization percentagecpu.TimesPercent()- Per-CPU time percentagescpu.Info()- Detailed CPU information:- VendorID
- Family, Model, Stepping
- ModelName
- Number of cores
- CPU frequency
Memory Metrics
mem.VirtualMemory()- Physical memory statistics- Platform-specific extended information via
ExWindows(see below)
mem.SwapMemory() is not supported on Windows as the platform uses a different virtual memory model.Disk Metrics
disk.Partitions()- List all disk partitionsdisk.Usage()- Disk usage statistics per partitiondisk.IOCounters()- I/O statistics for disk drives
Network Metrics
net.IOCounters()- Network interface statistics
System Information
host.Info()- Host information:- Hostname
- OS (“windows”)
- Platform version (e.g., “Windows 10”, “Windows 11”, “Windows Server 2019”)
host.BootTime()- System boot timehost.Users()- Currently logged-in users
Some host information fields like
PlatformFamily are not available on Windows.Load Average
Temperature Sensors
Process Information
Windows provides good process monitoring support:Supported Process Features
- Basic: pid, ppid, name, cmdline, create_time, cwd
- Executable: exe (executable path)
- Resources: memory_info, memory_percent, cpu_times, cpu_percent
- I/O: io_counters, open_files, num_fds
- Priority: nice (process priority)
- Threads: num_threads
- Relations: parent, children
- Control: suspend, resume, terminate
- User: username
- Stats: page_faults
Unsupported Process Features
- status (process state)
- uids/gids (Unix-specific)
- terminal (Unix-specific)
- num_ctx_switches (context switches)
- memory_maps
- send_signal (Unix signals)
- kill (use terminate instead)
- rlimit (Unix resource limits)
- threads (detailed thread info)
- connections (per-process network connections)
Platform-Specific Information (ExWindows)
Windows provides extended virtual memory information through theExWindows struct:
Windows Virtual Memory Model
Windows uses a different memory management model compared to Unix systems:- VirtualTotal: Total virtual memory available to processes
- VirtualAvail: Available virtual memory
- VirtualUsed: Currently used virtual memory
- VirtualUsedPercent: Percentage of virtual memory in use
See the Platform-Specific Information page for more details on Ex structs.
Windows-Specific Considerations
WMI (Windows Management Instrumentation)
Many gopsutil functions on Windows use WMI to retrieve system information. This means:- WMI service must be running
- Appropriate permissions are required
- Performance may vary based on WMI query complexity
Administrator Privileges
Some operations may require elevated privileges:Process Termination
On Windows, useTerminate() instead of Kill():
Path Separators
Windows uses backslashes (\) as path separators:
Known Limitations
Swap Memory
Network Connections
Per-system and per-process network connection tracking is not currently supported:Process Status
The processStatus() method is not available on Windows:
Unix-Specific Features
The following Unix concepts don’t apply to Windows:- UIDs/GIDs (use Windows SIDs instead)
- Terminals (PTY/TTY)
- Unix signals
- Resource limits (rlimit)
Performance Considerations
WMI Query Performance
Context Timeouts
Code Examples
Basic System Monitoring
Windows-Specific Virtual Memory
Process Monitoring
Best Practices
Handle Platform Differences
Error Handling for Unsupported Features
Use Context for Long Operations
Related Resources
Platform Overview
Compare Windows support with other platforms
Platform-Specific
Learn about ExWindows structs