Overview
gopsutil provides strong support for BSD-family operating systems and Solaris. Each BSD variant has different levels of support based on community contributions and system-specific APIs.Supported Platforms
FreeBSD
Comprehensive support for i386, amd64, and arm architectures
OpenBSD
Wide architecture support including i386, amd64, armv7, arm64, and riscv64
Solaris
Support for amd64 on SmartOS/Illumos
DragonFly BSD
Limited support - CPU monitoring only
FreeBSD
Supported Architectures
- i386: 32-bit Intel/AMD
- amd64: 64-bit Intel/AMD
- arm: ARM processors
Feature Support
Fully Supported
- CPU: Times, count, percent, times_percent, info (detailed)
- Memory: Virtual memory, swap memory
- Disk: Partitions, usage, I/O counters
- Network: I/O counters
- System: Boot time, users, PIDs, PID exists, connections
- Load: Load averages (1, 5, 15 minutes)
Process Information
- Basic: pid, ppid, name, cmdline, status, cwd, exe
- User/Group: uids, gids, username
- Resources: memory_info, num_threads
- Priority: nice
- Relations: children
- Control: send_signal, suspend, resume, terminate, kill
Not Supported
- Temperature sensors
- Network protocols
- Process: create_time, terminal, io_counters, num_fds, cpu_times, open_files, threads, cpu_percent, memory_percent, parent, connections
Code Example
OpenBSD
Supported Architectures
- i386: 32-bit Intel/AMD
- amd64: 64-bit Intel/AMD
- armv7: 32-bit ARM v7
- arm64: 64-bit ARM
- riscv64: 64-bit RISC-V
OpenBSD support was contributed by @mpfz0r. The wide architecture support, including riscv64, makes OpenBSD one of the most portable platforms for gopsutil.
Feature Support
Fully Supported
- CPU: Times, count, percent, times_percent, info
- Memory: Virtual memory, swap memory
- Disk: Partitions, usage, I/O counters
- Network: I/O counters
- System: Boot time, users, PIDs, PID exists, connections
- Load: Load averages
Process Information
- Basic: pid, ppid, name, cmdline, status, cwd, exe
- User/Group: uids, gids, username
- Resources: memory_info, num_threads, cpu_percent
- Priority: nice
- Relations: parent, children, connections
- Control: send_signal, suspend, resume, terminate, kill
Not Supported
- Temperature sensors
- Network protocols
- Process: create_time, terminal, io_counters, num_fds, cpu_times, open_files, memory_percent, threads
Code Example
Solaris
Supported Architecture
- amd64: 64-bit Intel/AMD
Solaris support was developed and tested on SmartOS/Illumos. Thanks to @jen20 for the implementation!
Feature Support
Fully Supported
- Network: I/O counters
- Load: Load averages
- Host: Hostname, platform, platform family
- Sensors: Temperature sensors
Partially Supported
- Memory: Virtual memory (marked as ‘b’ - almost works with some issues)
Not Supported
- CPU: times, count, percent, times_percent
- Memory: swap_memory
- Disk: partitions, usage, I/O counters
- System: boot_time, users, PIDs, connections
- Network: protocols
- All process information
Code Example
DragonFly BSD
Limited Support
Supported: CPU monitoring only (thanks to @gballet!) Not supported: All other featuresCode Example
Host Information Details
BSD systems provide rich host information throughhost.Info():
FreeBSD Example
OpenBSD Example
Solaris/Illumos Example
BSD-Specific Considerations
sysctl Interface
BSD systems usesysctl extensively for system information:
kvm Interface
Some BSD features may require the kvm (kernel virtual memory) interface:- Process information uses
kvm_getprocs - May require elevated privileges
- Performance can vary
File Descriptor Limits
Security Levels
BSD security levels may restrict certain operations:Performance Considerations
FreeBSD
- CPU and memory monitoring are efficient
- Network statistics are updated frequently
- Process monitoring can be intensive with many processes
OpenBSD
- Generally efficient across all supported features
- RISC-V performance depends on hardware
- Security features may add overhead
Solaris
- Network monitoring is performant
- Limited feature set reduces overhead
- Virtual memory queries may be slow
Best Practices
Check Platform Support
Handle Unsupported Features
Use Feature Detection
Contributing BSD Support
BSD support relies heavily on community contributions. If you use gopsutil on a BSD system, consider contributing improvements!
Areas for Improvement
- DragonFly BSD: Memory, disk, and network support
- Solaris: CPU and process information
- FreeBSD: Process I/O counters and file descriptors
- All platforms: Temperature sensor support (except Solaris)
How to Contribute
- Fork the repository
- Implement missing features for your BSD platform
- Test thoroughly on your target OS/architecture
- Submit a pull request
Related Resources
Platform Overview
Compare BSD support with other platforms
Cross-Platform Development
Learn how to write cross-platform code