shirou
64d607539e
add FreeBSD ARM support. copied from i386
6 years ago
shirou
7675aac4b0
Merge pull request #631 from shirou/add_created_time_on_windows_to_readme
...
add created_time on Windows to README
6 years ago
shirou
4a5a3cb6da
add created_time on Windows to README
6 years ago
shirou
457f04671d
[process] move PageFaultsStat to process.go
6 years ago
shirou
98c84ed30a
[process]: move HWM to MemoryInfo
...
at least FreeBSD and Darwin has HWM.
6 years ago
shirou
a33a26bd97
Merge pull request #567 from tagirb/grouped_memorymaps
...
implement grouped memorymaps output
6 years ago
shirou
48b37fa45e
Merge pull request #616 from nefeli/linux_page_faults
...
[process][linux] Export process page fault info
6 years ago
shirou
d94da856e5
Merge pull request #624 from ajacoutot/cpu-openbsd
...
cpu: implement Mhz and Cores on OpenBSD
6 years ago
shirou
faf242fefc
Merge pull request #625 from wcc526/patch-1
...
Add VmHWM
6 years ago
chi-chi weng
ec5a8b2a50
Add VmHWM
...
VmHWM: Peak resident set size ("high water mark").
http://man7.org/linux/man-pages/man5/proc.5.html
6 years ago
Antoine Jacoutot
67297c8791
cpu: prefer cpuonline on OpenBSD
...
This gives us the value of actual online CPUs (as opposed to the
found ones which may not be able active).
6 years ago
Antoine Jacoutot
7276e963eb
cpu: implement Mhz and Cores
...
Adapted from the FreeBSD code.
Successfully tested with Nomad.
6 years ago
Lomanic
db425313bf
Merge pull request #623 from Lomanic/issue621
...
Fix #621 Add OpenBSD 6.4+ CPU States
6 years ago
Lomanic
56acda8a5b
[process][openbsd] Fix compilation on OpenBSD
6 years ago
Lomanic
5f8353c741
[cpu][openbsd] Fix #621 , define CPU states according to OpenBSD version
6 years ago
Lomanic
738b966ed1
[host][darwin] Use unix.Sysctl to get kernel version and platform name
6 years ago
Lomanic
8294f67566
[host][openbsd] Remove external calls to uname in PlatformInformation()
6 years ago
Lomanic
ccc1c1016b
[mem][darwin] Fix #622 include Inactive memory in total calculation in TestVirtual_memory
6 years ago
Lomanic
4104adff3e
[process][windows] Fix #466 add SeDebugPrivilege to current process
6 years ago
Lomanic
a5ace91cce
[process][windows] Propagate context internally
6 years ago
Lomanic
e5ca4477a1
[process][windows] WIP #586 use win32 API in process.Exe but fallback on WMI
...
This method only lets a 32bit program get other 32bit processes exe path
and a 64bit program get other 64bit processes exe path, so we fallback to
the slow (but kind of reliable) WMI calls if we can't access to the other
process module.
6 years ago
shirou
51e6519305
Merge pull request #619 from remeh/dm-name-trim
...
disk: trim the device mapper name.
6 years ago
Remy Mathieu
fda98ebc34
disk: trim the device mapper name.
...
While reading the value of the file with `ioutil.ReadFile`,
the name is suffixed with a `\n`
Tested on Ubuntu 18.10
6 years ago
shirou
d6b9922e03
Merge pull request #617 from mznet/master
...
SReclaimable should be summed to Cached Memory
6 years ago
David Naylor
414c76f159
[process][linux] Export process page fault info
...
Add a function for retrieving page fault counts from /proc/[pid]/stat on
Linux.
6 years ago
Minje Park
f9e238c38b
SReclaimable should be added to Cached Memory
6 years ago
shirou
cce2d16538
[process]: add missing argment to process_fallback.
6 years ago
Lomanic
eead265362
Merge pull request #611 from marcospedreiro/master
...
[cpu][windows] cpu.Times(true) should not return percent values
6 years ago
Lomanic
21ddb4f6d5
Merge pull request #605 from Lomanic/issue596
...
Fix #596 Implement process.Background and process.Foreground functions
6 years ago
Lomanic
8002bddf3f
Merge branch 'master' into issue596
6 years ago
shirou
35815938bf
Merge pull request #614 from joestringer/netns
...
[net][linux] Support socket tables in nested namespaces
6 years ago
Joe Stringer
f87d9813da
[net][linux] Support socket tables in nested namespaces
...
Signed-off-by: Joe Stringer <joe@cilium.io>
6 years ago
Lomanic
0f70a4a06f
Merge pull request #609 from Lomanic/windows-process-children
...
[process][windows] Use win32 API in process.Children() instead of slow WMI call
6 years ago
shirou
852c7686b5
Merge pull request #613 from tmm1/allow-a-b-windows-drives
...
do not ignore A: and B: drives on windows
6 years ago
Lomanic
3b882b034c
Merge pull request #612 from tmm1/fix-typo
...
fix minor typo in disk_windows
6 years ago
marcospedreiro
f0ebb60b86
handle pr comments: use assert.InEpsilon
6 years ago
Aman Gupta
d021425af3
do not ignore A: and B: drives on windows
...
from https://www.howtogeek.com/122891/what-are-the-windows-a-and-b-drives-used-for/
>if your computer does not have floppy disk drives, you can assign A and B to volumes
6 years ago
Aman Gupta
ab57d4a5fe
fix minor typo in disk_windows
6 years ago
marcospedreiro
d47801b68b
revert imports
6 years ago
marcospedreiro
3cc34ebf18
windows cpu time (true) should return cpu time not percentages
6 years ago
Lomanic
b0c24b4251
Merge pull request #610 from Lomanic/issue555
...
[disk][linux] Fix #555 Unescape escaped sequences in fstab path in disk.Partitions
6 years ago
marcospedreiro
45aeaebda5
test windows cpu.Time(true) returning time instead of percentages
6 years ago
Lomanic
8888537497
[disk][linux] Fix #555 Unescape escaped sequences in fstab path in disk.Partitions
6 years ago
Lomanic
6b539051d2
[process][windows] Use win32 API in process.Children() instead of slow WMI call
...
The CreateToolhelp32Snapshot+Process32First+Process32Next combo already
iterates over all processes, so it would be inefficient to enumerate all
processes with process.Processes() and then calling p.Ppid() on each of
them: we just use this combo to get all processes and their ppid in a
single iteration.
This is faster by a factor of 25 compared to the previous WMI call.
6 years ago
Lomanic
8ffa453390
#596 Amend last commit, add missing strconv pkg in process_freebsd.go
6 years ago
Lomanic
8ef9b01052
Fix process.Foreground for BSDs, add openbsd implementation
6 years ago
Lomanic
878e0a701b
Fix #596 Implement process.Background and process.Foreground functions
6 years ago
shirou
48177ef5f8
Merge pull request #603 from pierresouchay/host_id_fixed_on_linux
...
Have a real fixed HostID on Linux
6 years ago
Pierre Souchay
890eb80501
Better comments for fallback on /etc/machine-id
6 years ago
Pierre Souchay
be2b25a7c6
Have a real fixed HostID on Linux
...
On Linux, most golang programs do not run as root (or at least, they should not),
by default, the kernels uses strict permissions, so most userland programs cannot
read `/sys/class/dmi/id/product_uuid`. However, programs such as Consul are relying
on it to get fixed IDs, instead they have a different ID on each boot.
We propose to use `/etc/machine-id` as fallback https://www.freedesktop.org/software/systemd/man/machine-id.html
In order to fix this, this patch does the following:
- if `/sys/class/dmi/id/product_uuid` can be read, use it for HostID
- else if `/etc/machine-id` exists and has 32 chars, use it and add '-' to have the same format as product_uuid
- finally, if notthing works, use the `kernel.random.boot_id`
This will greatly increase the number of programs having correct behaviour when
those rely on having a fixed HostID.
This will fix the following issues:
- https://github.com/shirou/gopsutil/issues/350
- https://github.com/hashicorp/consul/issues/4741
6 years ago