Merge pull request #1766 from shirou/feat/update_readme

[doc]: Update README for supported metrics.
pull/1768/head
shirou 6 months ago committed by GitHub
commit b8e1b282ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -70,29 +70,16 @@ The output is below.
Total: 3179569152, Free:284233728, UsedPercent:84.508194% Total: 3179569152, Free:284233728, UsedPercent:84.508194%
{"total":3179569152,"available":492572672,"used":2895335424,"usedPercent":84.50819439828305, (snip...)} {"total":3179569152,"available":492572672,"used":2895335424,"usedPercent":84.50819439828305, (snip...)}
You can set an alternative location to `/proc` by setting the `HOST_PROC` You can set alternative locations for various system directories by using the following environment variables:
environment variable.
You can set an alternative location to `/sys` by setting the `HOST_SYS` - /proc: `HOST_PROC`
environment variable. - /sys: `HOST_SYS`
- /etc: `HOST_ETC`
You can set an alternative location to `/etc` by setting the `HOST_ETC` - /var: `HOST_VAR`
environment variable. - /run: `HOST_RUN`
- /dev: `HOST_DEV`
You can set an alternative location to `/var` by setting the `HOST_VAR` - /: `HOST_ROOT`
environment variable. - /proc/N/mountinfo: `HOST_PROC_MOUNTINFO`
You can set an alternative location to `/run` by setting the `HOST_RUN`
environment variable.
You can set an alternative location to `/dev` by setting the `HOST_DEV`
environment variable.
You can set an alternative location to `/` by setting the `HOST_ROOT`
environment variable.
You can set an alternative location to `/proc/N/mountinfo` by setting the
`HOST_PROC_MOUNTINFO` environment variable.
### Adding settings using `context` (from v3.23.6) ### Adding settings using `context` (from v3.23.6)
@ -207,7 +194,6 @@ Some code is ported from Ohai. Many thanks.
- x: works - x: works
- b: almost works, but something is broken - b: almost works, but something is broken
- c: works in CGO only
|name |Linux |FreeBSD |OpenBSD |macOS |Windows |Solaris |Plan 9 |AIX | |name |Linux |FreeBSD |OpenBSD |macOS |Windows |Solaris |Plan 9 |AIX |
|----------------------|-------|---------|---------|--------|---------|---------|---------|---------| |----------------------|-------|---------|---------|--------|---------|---------|---------|---------|
@ -218,9 +204,9 @@ Some code is ported from Ohai. Many thanks.
|virtual\_memory |x |x |x |x |x |b |x |x | |virtual\_memory |x |x |x |x |x |b |x |x |
|swap\_memory |x |x |x |x | | |x |X | |swap\_memory |x |x |x |x | | |x |X |
|disk\_partitions |x |x |x |x |x | | |x | |disk\_partitions |x |x |x |x |x | | |x |
|disk\_io\_counters |x |x |x | | | | | | |disk\_io\_counters |x |x |x |x |x | | | |
|disk\_usage |x |x |x |x |x | | |x | |disk\_usage |x |x |x |x |x | | |x |
|net\_io\_counters |x |x |x |b |x | | | | |net\_io\_counters |x |x |x |b |x |x | | |
|boot\_time |x |x |x |x |x | | |X | |boot\_time |x |x |x |x |x | | |X |
|users |x |x |x |x |x | | |x | |users |x |x |x |x |x | | |x |
|pids |x |x |x |x |x | | | | |pids |x |x |x |x |x | | | |
@ -230,6 +216,7 @@ Some code is ported from Ohai. Many thanks.
|net\_if\_addrs | | | | | | | |x | |net\_if\_addrs | | | | | | | |x |
|net\_if\_stats | | | | | | | |x | |net\_if\_stats | | | | | | | |x |
|netfilter\_conntrack |x | | | | | | | | |netfilter\_conntrack |x | | | | | | | |
|sensors_temperature |x | | |x |x |x | | |
### Process class ### Process class
@ -239,27 +226,26 @@ Some code is ported from Ohai. Many thanks.
|pid |x |x |x |x |x | |pid |x |x |x |x |x |
|ppid |x |x |x |x |x | |ppid |x |x |x |x |x |
|name |x |x |x |x |x | |name |x |x |x |x |x |
|cmdline |x |x | |x |x | |cmdline |x |x |x |x |x |
|create\_time |x | | |x |x | |create\_time |x | | |x |x |
|status |x |x |x |x | | |status |x |x |x |x | |
|cwd |x | | |x |x | |cwd |x |x |x |x |x |
|exe |x |x |x | |x | |exe |x |x |x | |x |
|uids |x |x |x |x | | |uids |x |x |x |x | |
|gids |x |x |x |x | | |gids |x |x |x |x | |
|terminal |x |x |x | | | |terminal |x |x |x | | |
|io\_counters |x |x |x | |x | |io\_counters |x |x |x | |x |
|nice |x |x |x |x |x | |nice |x |x |x |x |x |
|num\_fds |x | | | | | |num\_fds |x | | | |x |
|num\_ctx\_switches |x | | | | | |num\_ctx\_switches |x | | | | |
|num\_threads |x |x |x |x |x | |num\_threads |x |x |x |x |x |
|cpu\_times |x | | | |x | |cpu\_times |x | | | |x |
|memory\_info |x |x |x |x |x | |memory\_info |x |x |x |x |x |
|memory\_info\_ex |x | | | | |
|memory\_maps |x | | | | | |memory\_maps |x | | | | |
|open\_files |x | | | | | |open\_files |x | | | |x |
|send\_signal |x |x |x |x | | |send\_signal |x |x |x |x | |
|suspend |x |x |x |x | | |suspend |x |x |x |x |x |
|resume |x |x |x |x | | |resume |x |x |x |x |x |
|terminate |x |x |x |x |x | |terminate |x |x |x |x |x |
|kill |x |x |x |x | | |kill |x |x |x |x | |
|username |x |x |x |x |x | |username |x |x |x |x |x |
@ -276,10 +262,10 @@ Some code is ported from Ohai. Many thanks.
|is\_running | | | | | | |is\_running | | | | | |
|page\_faults |x | | | | | |page\_faults |x | | | | |
### Original Metrics ### gopsutil Original Metrics
|item |Linux |FreeBSD |OpenBSD |macOS |Windows |Solaris |AIX | |item |Linux |FreeBSD |OpenBSD |macOS |Windows |Solaris |AIX |
|-----------------|-------|---------|---------|--------|--------|---------|---------| |------------------------|-------|---------|---------|--------|--------|---------|---------|
|**HostInfo** | | | | | | | | |**HostInfo** | | | | | | | |
|hostname |x |x |x |x |x |x |X | |hostname |x |x |x |x |x |x |X |
|uptime |x |x |x |x | |x |x | |uptime |x |x |x |x | |x |x |
@ -295,20 +281,20 @@ Some code is ported from Ohai. Many thanks.
|Stepping |x |x |x |x |x |x | | |Stepping |x |x |x |x |x |x | |
|PhysicalID |x | | | | |x | | |PhysicalID |x | | | | |x | |
|CoreID |x | | | | |x | | |CoreID |x | | | | |x | |
|Cores |x | | | |x |x |x | |Cores |x | | |x |x |x |x |
|ModelName |x |x |x |x |x |x |x | |ModelName |x |x |x |x |x |x |x |
|Microcode |x | | | | |x | | |Microcode |x | | | | |x | |
|**LoadAvg** | | | | | | | | |**LoadAvg** | | | | | | | |
|Load1 |x |x |x |x | | |x | |Load1 |x |x |x |x |x |x |x |
|Load5 |x |x |x |x | | |x | |Load5 |x |x |x |x |x |x |x |
|Load15 |x |x |x |x | | |x | |Load15 |x |x |x |x |x |x |x |
|**GetDockerID** | | | | | | | | |**Docker GetDockerID** | | | | | | | |
|container id |x |no |no |no |no | | | |container id |x |no |no |no |no |no |no |
|**CgroupsCPU** | | | | | | | | |**Docker CgroupsCPU** | | | | | | | |
|user |x |no |no |no |no | | | |user |x |no |no |no |no |no |no |
|system |x |no |no |no |no | | | |system |x |no |no |no |no |no |no |
|**CgroupsMem** | | | | | | | | |**Docker CgroupsMem** | | | | | | | |
|various |x |no |no |no |no | | | |various |x |no |no |no |no |no |no |
- future work - future work
- process_iter - process_iter

Loading…
Cancel
Save