Alexey Galkin
2287b035c8
Add new test 'TestHostGuid'
...
For issue: https://github.com/shirou/gopsutil/issues/322
2017-03-03 16:28:49 +04:00
shirou
d371ba1293
Merge pull request #320 from tychoish/close-files-more-often
...
close open files
2017-02-22 23:42:03 +09:00
tycho garen
22c56d292e
close open files
2017-02-22 08:46:23 -05:00
shirou
f8610342e4
Merge pull request #319 from toshipiazza/master
...
Fixes memory leak
2017-02-22 17:38:10 +09:00
Toshi Piazza
5e1c2fa23b
Fixes memory leak
2017-02-22 02:53:45 -05:00
shirou
c14b242c60
Merge pull request #316 from tychoish/cpu-fix-linux
...
fix panic in starvation situations
2017-02-21 22:11:56 +09:00
shirou
654255b974
Merge pull request #317 from pdcleyn/support-alias-interfaces
...
Added support to alias interfaces (e.g., ifname0:1)
2017-02-21 17:19:09 +09:00
Peter De Cleyn
e8fc31359b
Added support to alias interfaces (e.g., ifname0:1)
2017-02-21 08:19:22 +01:00
Sam Kleinman
915d1e930e
fix panic in starvation situations
2017-02-15 11:25:49 -05:00
shirou
35c783ec7d
Merge pull request #314 from tychoish/fix-ppid-darwin
...
error earlier on darwin for get parent pid
2017-02-15 10:43:17 +09:00
tycho garen
6110db7ab5
error earlier on darwin for get parent pid
2017-02-14 17:36:34 -05:00
shirou
b62e301a8b
Merge pull request #313 from sean-/lowercase-hostid
...
Unconditionally lowercase the `HostID` from all supported platforms.
2017-02-08 11:55:55 +09:00
Sean Chittenden
36f5033d97
Unconditionally lowercase the `HostID` from all supported platforms.
2017-02-06 16:10:46 -08:00
shirou
32b6636de0
Merge pull request #312 from sean-/windows-machine-guid
...
Add HostID support to Windows.
2017-02-04 14:36:48 +09:00
Sean Chittenden
650c4d595f
Use `HKLM/SOFTWARE\Microsoft\Cryptography`'s `MachineGuid` registry key to enable `HostID` support on Windows.
2017-02-02 16:08:58 -08:00
shirou
77b5d0080a
Merge pull request #311 from sparrc/cpu-times-panic
...
fix panic when /proc/stat is empty
2017-02-02 09:16:45 +09:00
shirou
53c0262e32
Merge pull request #310 from sparrc/go-fmt
...
run go fmt ./...
2017-02-02 09:13:55 +09:00
shirou
1495f0bf31
Merge pull request #309 from sean-/process-no-cgo
...
Add native struct support for FreeBSD/arm.
2017-02-02 09:12:03 +09:00
Cameron Sparr
0c9a1d33cb
fix panic when /proc/stat is empty
...
don't really know why this would be the case, but I suppose there are
always edge-cases.
see https://github.com/influxdata/telegraf/issues/2356
2017-02-01 23:13:59 +00:00
Cameron Sparr
a213bf5e6d
run go fmt ./...
2017-02-01 23:05:29 +00:00
Sean Chittenden
b68f0fdb25
Add native struct support for FreeBSD/arm.
...
This was ported by hand and not machine generated, but appears to get
software to build. Material was sourced from the following and a pile
of `grep(1)`:
[1] https://wiki.freebsd.org/EdMaste/ArchitectureSpecifics
[2] https://svnweb.freebsd.org/base/head/sys/sys/user.h?revision=309676&view=markup#l119
2017-02-01 08:25:48 -08:00
shirou
3b18639664
Merge pull request #308 from sean-/host-no-cgo
...
Add Go-native structs for Darwin/386 and FreeBSD/arm
2017-02-01 21:49:02 +09:00
Sean Chittenden
955821b5ab
Add Go-native structs for Darwin/386 and FreeBSD/arm
2017-01-31 22:56:31 -08:00
shirou
70a1b78fe6
Merge pull request #307 from shirou/freebsd_cpu_cores_num
...
[cpu]freebsd: cpu.Info() now returns CPUInfos same number as CPU nums.
2017-01-31 00:34:44 +09:00
WAKAYAMA shirou
dc8102185d
separate freebsd specific test code.
2017-01-29 01:43:24 +09:00
WAKAYAMA shirou
a54f700f00
fix test other than freebsd.
2017-01-29 01:38:52 +09:00
WAKAYAMA shirou
eb5bfca902
[cpu]freebsd: cpu.Info() now returns CPUInfos same number as CPU nums.
2017-01-29 01:23:21 +09:00
shirou
d28b003411
Merge pull request #305 from tychoish/platform-0
...
add platform compatibility #297
2017-01-29 00:41:28 +09:00
Sam Kleinman
488c56586b
add platform compatibility
2017-01-27 20:35:58 -05:00
WAKAYAMA shirou
7783018b9d
[cpu]freebsd: CPU.CPU now indicates CPU num instead of MHz.
2017-01-22 22:31:05 +09:00
WAKAYAMA Shirou
1123132e5a
[mem]darwin: swap memory was Kbytes, since linux is bytes.
2017-01-17 22:38:46 +09:00
shirou
26dae1bdee
Merge pull request #303 from jcaberio/master
...
fix truncated process name of linux
2017-01-17 22:23:17 +09:00
Jorick Caberio
c432d48337
fix truncated process name of linux
2017-01-17 09:38:25 +08:00
shirou
80a8502305
Merge pull request #296 from smith3v/master
...
Implemented resource limits function
2017-01-12 00:12:22 +09:00
Vyacheslav Kuznetsov
a35c32b028
Commented the constants origin.
2017-01-11 19:05:34 +04:00
Vyacheslav Kuznetsov
4de4e17f06
Added limit constants. Implemented function to parse process limits from /proc.
2017-01-11 00:04:05 +04:00
shirou
93564b3142
Merge pull request #271 from botherder/master
...
Obtain executable path from macOS process (fix #270 )
2017-01-02 14:11:51 +09:00
shirou
aa5843400e
Merge pull request #293 from HeChuanXUPT/patch-1
...
fix: division by zero possible
2016-12-24 21:49:11 +09:00
HeChuan
c73b6685be
fix: division by zero possible
...
some filesystem have zero Inode
2016-12-23 15:50:28 +08:00
shirou
a0f760ef63
Merge pull request #291 from hush-hush/master
...
Add 'SwapCached' to the VirtualMemoryStat informations on linux
2016-12-22 13:22:00 +09:00
Maxime Mouial
4a1d5da977
Add 'SwapCached' to the VirtualMemoryStat informations on linux
2016-12-21 15:42:09 +01:00
shirou
bc9d8fac2b
Merge pull request #290 from DataDog/conor/connections-perf
...
Fast duplication check in inodes processing.
2016-12-21 14:21:05 +09:00
shirou
a2257218e1
Merge pull request #289 from DataDog/conor/cache-boot-time
...
Cache the boot time after first query.
2016-12-21 14:15:45 +09:00
Conor Branagan
276c873f0d
Fast duplication check in inodes processing.
...
Instead of encoding a JSON string of each connection (non-trivial at high
connection volumes) we can use the connTmp struct for map look-ups if we
eliminate the unused `uids` field.
Also switches to using the empty struct instead of bool for zero memory
overhead.
2016-12-20 12:38:54 -05:00
WAKAYAMA Shirou
42156fdf0d
[net]linux: fix NetFilterCounters filename
2016-12-20 23:59:53 +09:00
shirou
09887d1cba
Merge pull request #287 from hush-hush/master
...
Add Slab, Shared and PageTables metric for VirtualMemory under linux
2016-12-20 14:24:33 +09:00
Maxime Mouial
44e27c6972
Add Slab, Shared and PageTables metric for VirtualMemory under linux
2016-12-19 14:01:27 +01:00
shirou
c42889c313
Merge pull request #268 from DataDog/conor/connections-max
...
Add ConnectionsMax function that limits connections per pid.
2016-12-12 22:47:19 +09:00
Conor Branagan
df61ef6d5f
Add stub functions for ConnectionsMax in other OS versions.
2016-12-11 13:06:56 -05:00
Conor Branagan
198e65c801
Add ConnectionsMax function that limits connections per pid.
...
The goal is to improve performance of connection fetching connections across
all processes when some processes can have several hundred or thousands of file
descriptors. Right now when you have many thousands of fds the process spends
lots of time inside the syscalls from Readdir and Readlink.
The public API works as before with two new functions:
- `ConnectionsMax`
- `ConnectionsPidMax`
Each function takes an additional int argument that sets the max number of fds
read per process.
2016-12-11 13:05:40 -05:00