|
|
@ -11,6 +11,11 @@ gopsutil: psutil for golang
|
|
|
|
This is a port of psutil (http://pythonhosted.org/psutil/). The challenge is porting all
|
|
|
|
This is a port of psutil (http://pythonhosted.org/psutil/). The challenge is porting all
|
|
|
|
psutil functions on some architectures...
|
|
|
|
psutil functions on some architectures...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. highlights:: Package Structure Changed!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Package (a.k.a. directory) structure has been changed!! see `#24 <https://github.com/shirou/gopsutil/issues/24`_
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Available Architectures
|
|
|
|
Available Architectures
|
|
|
|
------------------------------------
|
|
|
|
------------------------------------
|
|
|
|
|
|
|
|
|
|
|
@ -117,68 +122,105 @@ Some codes are ported from Ohai. many thanks.
|
|
|
|
Current Status
|
|
|
|
Current Status
|
|
|
|
------------------
|
|
|
|
------------------
|
|
|
|
|
|
|
|
|
|
|
|
- done
|
|
|
|
- x: work
|
|
|
|
|
|
|
|
- b: almost work but something broken
|
|
|
|
- cpu_times (linux, freebsd)
|
|
|
|
|
|
|
|
- cpu_count (linux, freebsd, windows)
|
|
|
|
================= ========= ========= =========== ====== =======
|
|
|
|
- virtual_memory (linux, freebsd, windows)
|
|
|
|
name Linux 686 Linux ARM FreeBSD 686 MacOSX Windows
|
|
|
|
- swap_memory (linux, freebsd)
|
|
|
|
cpu_times x x x x
|
|
|
|
- disk_partitions (linux, freebsd, windows)
|
|
|
|
cpu_count x x x x x
|
|
|
|
- disk_io_counters (linux)
|
|
|
|
cpu_percent x x x x x
|
|
|
|
- disk_usage (linux, freebsd, windows)
|
|
|
|
cpu_times_percent x x x x x
|
|
|
|
- net_io_counters (linux, freebsd, windows)
|
|
|
|
virtual_memory x x x x x
|
|
|
|
- boot_time (linux, freebsd, windows(but little broken))
|
|
|
|
swap_memory x x x x
|
|
|
|
- users (linux, freebsd)
|
|
|
|
disk_partitions x x x x
|
|
|
|
- pids (linux, freebsd)
|
|
|
|
disk_io_counters x x
|
|
|
|
- pid_exists (linux, freebsd)
|
|
|
|
disk_usage x x x x
|
|
|
|
- Process class
|
|
|
|
net_io_counters x x x x x
|
|
|
|
|
|
|
|
boot_time x x x x b
|
|
|
|
- pid (linux, freebsd, windows)
|
|
|
|
users x x x x x
|
|
|
|
- ppid (linux, freebsd, windows)
|
|
|
|
pids x x x x x
|
|
|
|
- name (linux)
|
|
|
|
pid_exists x x x x x
|
|
|
|
- cmdline (linux)
|
|
|
|
net_connections
|
|
|
|
- create_time (linux)
|
|
|
|
================= ========= ========= =========== ====== =======
|
|
|
|
- status (linux)
|
|
|
|
|
|
|
|
- cwd (linux)
|
|
|
|
Process class
|
|
|
|
- exe (linux, freebsd, windows)
|
|
|
|
^^^^^^^^^^^^^^^
|
|
|
|
- uids (linux, freebsd)
|
|
|
|
|
|
|
|
- gids (linux, freebsd)
|
|
|
|
================ ========= ========= =========== ====== =======
|
|
|
|
- terminal (linux, freebsd)
|
|
|
|
name Linux 686 Linux ARM FreeBSD 686 MacOSX Windows
|
|
|
|
- io_counters (linux)
|
|
|
|
pid x x x x x
|
|
|
|
- nice (linux)
|
|
|
|
ppid x x x x x
|
|
|
|
- num_fds (linux)
|
|
|
|
name x x x x
|
|
|
|
- num_ctx_switches (linux)
|
|
|
|
cmdline x x
|
|
|
|
- num_threads (linux, freebsd, windows)
|
|
|
|
create_time x x
|
|
|
|
- cpu_times (linux)
|
|
|
|
status x x x x
|
|
|
|
- memory_info (linux, freebsd)
|
|
|
|
cwd x x
|
|
|
|
- memory_info_ex (linux)
|
|
|
|
exe x x x x
|
|
|
|
- memory_maps() (linux)
|
|
|
|
uids x x x x
|
|
|
|
- open_files (linux)
|
|
|
|
gids x x x x
|
|
|
|
- send_signal (linux, freebsd)
|
|
|
|
terminal x x x x
|
|
|
|
- suspend (linux, freebsd)
|
|
|
|
io_counters x x
|
|
|
|
- resume (linux, freebsd)
|
|
|
|
nice x x
|
|
|
|
- terminate (linux, freebsd)
|
|
|
|
num_fds x x
|
|
|
|
- kill (linux, freebsd)
|
|
|
|
num_ctx_switches x x
|
|
|
|
|
|
|
|
num_threads x x x x
|
|
|
|
- not yet
|
|
|
|
cpu_times x x
|
|
|
|
|
|
|
|
memory_info x x x x
|
|
|
|
- cpu_percent
|
|
|
|
memory_info_ex x x
|
|
|
|
- cpu_times_percent
|
|
|
|
memory_maps x x
|
|
|
|
- net_connections
|
|
|
|
open_files x x
|
|
|
|
- Process class
|
|
|
|
send_signal x x x x
|
|
|
|
|
|
|
|
suspend x x x x
|
|
|
|
- username
|
|
|
|
resume x x x x
|
|
|
|
- ionice
|
|
|
|
terminate x x x x
|
|
|
|
- rlimit
|
|
|
|
kill x x x x
|
|
|
|
- num_handlers
|
|
|
|
username x x x x
|
|
|
|
- threads
|
|
|
|
ionice
|
|
|
|
- cpu_percent
|
|
|
|
rlimit
|
|
|
|
- cpu_affinity
|
|
|
|
num_handlres
|
|
|
|
- memory_percent
|
|
|
|
threads
|
|
|
|
- children
|
|
|
|
cpu_percent
|
|
|
|
- connections
|
|
|
|
cpu_affinity
|
|
|
|
- is_running
|
|
|
|
memory_percent
|
|
|
|
|
|
|
|
children
|
|
|
|
|
|
|
|
connections
|
|
|
|
|
|
|
|
is_running
|
|
|
|
|
|
|
|
================ ========= ========= =========== ====== =======
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Original Metrics
|
|
|
|
|
|
|
|
^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
================== ========= ========= =========== ====== =======
|
|
|
|
|
|
|
|
item Linux 686 Linux ARM FreeBSD 686 MacOSX Windows
|
|
|
|
|
|
|
|
**HostInfo**
|
|
|
|
|
|
|
|
hostname x x x
|
|
|
|
|
|
|
|
uptime x x x
|
|
|
|
|
|
|
|
proces x x x
|
|
|
|
|
|
|
|
os x x x x x
|
|
|
|
|
|
|
|
platform x x x
|
|
|
|
|
|
|
|
platformfamiliy x x x
|
|
|
|
|
|
|
|
virtualization x x
|
|
|
|
|
|
|
|
**CPU**
|
|
|
|
|
|
|
|
VendorID x x
|
|
|
|
|
|
|
|
Family x x
|
|
|
|
|
|
|
|
Model x x
|
|
|
|
|
|
|
|
Stepping x x
|
|
|
|
|
|
|
|
PhysicalID x x
|
|
|
|
|
|
|
|
CoreID x x
|
|
|
|
|
|
|
|
Cores x x
|
|
|
|
|
|
|
|
ModelName x x
|
|
|
|
|
|
|
|
**LoadAvg**
|
|
|
|
|
|
|
|
Load1 x x x
|
|
|
|
|
|
|
|
Load5 x x x
|
|
|
|
|
|
|
|
Load15 x x x
|
|
|
|
|
|
|
|
**GetDockerID**
|
|
|
|
|
|
|
|
container id x x
|
|
|
|
|
|
|
|
**CgroupsCPU**
|
|
|
|
|
|
|
|
user x x
|
|
|
|
|
|
|
|
system x x
|
|
|
|
|
|
|
|
**CgroupsMem**
|
|
|
|
|
|
|
|
various x x
|
|
|
|
|
|
|
|
================== ========= ========= =========== ====== =======
|
|
|
|
|
|
|
|
|
|
|
|
- future work
|
|
|
|
- future work
|
|
|
|
|
|
|
|
|
|
|
|