Leonid Podolny
4269f19b1b
process.go: reformat whitespaces to keep gofmt happy
2017-10-04 15:46:49 -04:00
WAKAYAMA shirou
1ba77cdb3d
[load] freebsd: change to use x/sys/unix.SysctlRaw.
...
This implementation is borrowed from NodeExporter.
https://github.com/prometheus/node_exporter/blob/master/collector/loadavg_freebsd.go
2017-10-04 22:34:47 +09:00
shirou
fcba942e03
Merge pull request #426 from disq/cpu-NaN-fix
...
Fix NaN percentage if process was created too soon
2017-10-04 21:47:34 +09:00
Kemal Hadimli
826e63acbc
Never divide by zero
2017-09-28 15:54:06 +03:00
Kemal Hadimli
a3144a6850
Remove parens
2017-09-28 14:43:04 +03:00
Kemal Hadimli
696e1e0123
Fix NaN percentage if process was created too soon
2017-09-28 14:34:12 +03:00
shirou
6e221c4826
Merge pull request #423 from derekwbrown/db/windows_swap_memory
...
Add implementation of SwapMemory() for windows
v2.17.09
2017-09-24 15:54:40 +09:00
WAKAYAMA Shirou
4c9fd1f200
[cpu]linux: add testcode with testdata.
2017-09-20 15:58:30 +09:00
Derek Brown
7c807c86e4
Add implementation of SwapMemory() for windows
2017-09-18 18:14:29 -07:00
shirou
084e5f47b4
Merge pull request #421 from sypher7/patch-1
...
Update README / required go version
2017-09-13 08:06:34 +09:00
Daniel Lynn
e5a4a82a13
Update README / required go version
...
Adding the `context` package import in 3834908232bba96806f9c9e9a07403c55c813ba4 bumps the required go version to 1.7.
2017-09-12 17:30:11 -05:00
shirou
a452de7c73
Merge pull request #346 from phemmer/rlimit-current
...
add current values to rlimit retrieval
v2.17.08
2017-08-31 11:58:10 +09:00
shirou
2a3465ebd9
Merge pull request #419 from hnw/add-type-definitons-mips
...
Add type definitions for mips and mipsle
2017-08-27 21:58:55 +09:00
Yoshio HANAWA
a889bcce1a
Add type definitions for mips and mipsle
2017-08-27 02:36:33 +09:00
shirou
1c211f0807
Merge pull request #417 from schmichael/remove-setenv
...
Alter subprocess's environment instead of the hosts
2017-08-17 12:45:37 +09:00
Michael Schurter
042305ee4a
Remove SetEnv on all platforms
2017-08-16 15:32:21 -07:00
Michael Schurter
565f5c8c5e
Alter subprocess's environment instead of the hosts
...
Fixes #415
2017-08-16 14:54:50 -07:00
Shirou WAKAYAMA
3aa2ffab12
[process] linux: fix NumFD type inconversion.
2017-08-04 03:09:34 +00:00
shirou
ce4a32091a
Merge pull request #412 from DataDog/conor/faster-numfds
...
Just look at filenames for linux NumFDs call
2017-08-04 09:39:23 +09:00
WAKAYAMA Shirou
114c78c777
[host]: add not implemented methods.
v2.17.07
2017-08-03 11:08:35 +09:00
WAKAYAMA Shirou
9c5b318e0d
[host] windows: define Virtualization()
2017-08-03 10:14:20 +09:00
Conor Branagan
7b058c7436
Just look at filenames for linux NumFDs call.
...
In NumFDs we don't care about the contents of the fields, just how many
there are.
2017-08-02 13:49:55 -04:00
shirou
d97b1c368a
Merge pull request #408 from sean-/solaris_zone_host_id
...
Add HostID support to the `solaris` build target.
2017-08-02 23:09:19 +09:00
Sean Chittenden
42a72cbfae
Add HostID support to the solaris
build target.
2017-07-31 20:04:43 -07:00
shirou
42b5d5abb2
Merge pull request #406 from jen20/fix-osx-build
...
disk: Remove -mmacosx-version-min from darwin+cgo
2017-07-28 11:04:42 +09:00
James Nugent
95e4816cce
disk: Remove -mmacosx-version-min from darwin+cgo
...
The presence of the -mmacosx-version-min flag in disk_darwin_cgo.go
makes it impossible to build the other cgo components on modern Mac OS X
(10.12), since the object files with which they must link are not built
with that flag. Errors present from Go Tip (1.9, effectively) in the
form:
ld: warning: object file (whatever.o) was built for newer OSX version
(10.12) than being linked (10.10)
This commit removes the minimum version flag, instead targeting the
version of OS X on which a binary is compiled as the minimum. Without
this, I believe (though have not verified it actually works) that the
only way to build without without warnings/undefined behaviour if the OS
X 10.10 headers and objects are installed and configured correctly.
2017-07-27 17:16:27 -05:00
WAKAYAMA Shirou
906b00fc23
add features to README. Thank you for all of great contributors!
2017-07-26 22:42:13 +09:00
shirou
f6b70e303c
Merge pull request #387 from tychoish/windows-data-collection
...
collect more data on windows
2017-07-26 22:36:00 +09:00
WAKAYAMA Shirou
5329f8ba79
[process] fix Document of CreatTime seconds -> milliseconds
2017-07-26 22:33:15 +09:00
shirou
1da5000996
Merge pull request #402 from chrisroberts/fix-exe-macos
...
Fix process.Exe() on macOS 10.12
2017-07-26 22:28:07 +09:00
shirou
33f117e433
Merge pull request #405 from Aditya267/cpu_percent
...
added function for calculation of CPU usage percentage of a process
2017-07-26 22:25:02 +09:00
Aditya Choudhary (c)
533161c2ed
added funtion for calculation of CPU usage percentage of a process
2017-07-23 02:39:35 +05:30
shirou
f8e4e2ca16
Merge pull request #403 from HeChuanXUPT/patch-2
...
set win cpu total name to "cpu-total"
2017-07-22 12:47:38 +09:00
HeChuan
c818f7b647
set win cpu total name to "cpu-total"
...
set the name of windows cpu total percent to "cpu-total"
keep the same with Linux, Freebsd system
2017-07-20 11:47:15 +08:00
Chris Roberts
9c998f664a
Fix process.Exe() on macOS 10.12
...
The `lsof` command on macOS < 10.12 always selects the `p` field
when using the `-F` option. On macOS 10.12 the `f` field is also
always selected causing an incorrect result. This modification adds
both options which are always selected to maintain consistency.
2017-07-16 08:13:49 -07:00
WAKAYAMA Shirou
66b0ca3121
[disk] Add comment to disk.Usage().
2017-07-14 15:33:53 +09:00
WAKAYAMA Shirou
09e9859714
[net]linux: return err.
2017-07-10 16:48:47 +09:00
shirou
53dcbf48b4
Merge pull request #395 from better88/patch-1
...
err omit in getProcInodes
2017-07-10 16:47:42 +09:00
better88
86af477d1a
err omit in getProcInodes
2017-07-10 15:03:52 +08:00
shirou
ae1481820a
Merge pull request #392 from derekwbrown/add_username
...
[windows] add implementation for process.Username()
2017-07-09 00:54:15 +09:00
Derek Brown
a3ae2ed411
Add domain to username (rather than naked username)
2017-07-06 15:08:46 -07:00
tycho garen
d522bf5b7e
collect more data on windows
2017-07-02 14:42:22 -04:00
shirou
aa0a3bce9d
Merge pull request #382 from acd/master
...
Only read /proc/stat once when cpu.Times(true) is called on Linux
v2.17.06
2017-07-03 00:10:39 +09:00
Derek Brown
5157f03748
[windows] add implementation for process.Username()
2017-06-28 11:16:01 -07:00
Andrew Danforth
484470889f
Only read /proc/stat once when cpu.Times(true) is called on Linux
2017-06-09 22:34:58 -04:00
shirou
3dd8bd46d9
Merge pull request #376 from ContinuumLLC/win_percpu_feature
...
Windows: Read processor performance metrics overall, per cpu and per core
2017-06-05 22:30:45 +09:00
Rajkumar Gupta
b657e83fed
Added comments for structs and functions
2017-06-05 15:46:35 +05:30
Rajkumar Gupta
2d2db4203f
Change to adapt current cpu.Times API for per cpu and core time stats
2017-06-05 14:18:20 +05:30
shirou
60a0ef9c82
Merge pull request #380 from sean-/retire-syscall
...
Move from the `syscall` package to the `golang.org/x/sys/{unix,windows}`
2017-06-04 21:55:23 +09:00
Sean Chittenden
cb12fba4f4
windows.Syscall doesn't exist: use syscall.Syscall()
2017-06-03 08:07:30 -07:00