Lomanic
c729bbd6a8
[host][windows] Refactor code to query registry via golang.org/x/sys/windows/registry
2018-06-17 23:48:45 +02:00
Lomanic
eb11fd6e2f
[host][windows] Completely remove slow wmi calls to retrieve OS version, use registry and RtlGetVersion
2018-06-17 23:41:32 +02:00
Lomanic
df331c7615
[host][windows] Use win32 API to get host's uptime instead of (slow) wmi
2018-06-10 18:30:22 +02:00
shirou
c95755e4bc
[host]darwin: remove GPL code
2018-04-27 10:21:16 +09:00
Maddie Zhan
8c8eeb32d3
[host] linux/mips: mips64le definition from mipsle
...
Same as commit fc04d2d, but for mips64le from mipsle definition.
It would be nice if anyone can check with the correctness, since the
qemu environment for mips64/mips64le can't run Go properly due to this
issue: https://github.com/golang/go/issues/15416
2018-04-08 09:21:08 +08:00
shirou
cd915bdc31
Merge pull request #508 from shirou/issue507
...
[host] Fix docker uptime parsing (fix #507 )
2018-04-06 17:26:13 +09:00
Lomanic
1b47825dcb
[host] Fix docker uptime parsing ( fix #507 )
2018-04-06 10:11:58 +02:00
shirou
fc04d2dd9a
[host]linux/mips: copy mips64 definition from mips.
...
It just copy from mips, so it may be corrupt, but I can not check it.
If something wrong, please open an issue.
2018-03-31 22:05:15 +09:00
shirou
145dca90f7
change to use CommandContext.
2018-03-31 21:35:53 +09:00
shirou
b99342a9ce
[host] fallback: implement PlatformInformation()
2018-03-24 15:57:29 +09:00
shirou
ebe614f6e1
[solaris] host: add PlatformInformation() which is missing.
2018-03-22 00:28:00 +09:00
Laurie Clark-Michalek
413cb32b6c
Use static initialisation for invoke instances, instead of init funcs
...
The order of init function execution is dependant on the order that the
source files are passed to the compiler. This causes issues when
building under other build systems, such as bazel or buck, as they are
not guarenteed to maintain the same file order as the default go tool.
2018-03-21 14:08:39 +00:00
linuxhe
ee5d6a3d8f
fix docker uptime
2018-03-13 14:46:16 +08:00
shirou
d76e8c18d8
Merge pull request #496 from shirou/add_docker_to_use_btime
...
[host] linux: use uptime even if docker guest.
2018-03-12 21:39:33 +09:00
Steven Hartland
f846eda923
Eliminate call to uname on FreeBSD
...
Improve performance by eliminating the fork out to uname on FreeBSD which also helps prevent crashes / hangs due to the outstanding fork crash bug:
golang/go#15658
Also added a test for PlatformInformation.
2018-03-11 23:08:04 +00:00
shirou
28f7cb0d63
[host] linux: use uptime even if docker guest.
2018-03-11 13:22:13 +09:00
sada
8dd42707e2
windows: fix WithContext functions
...
set timeout only if parent context doesn't set.
2018-02-12 13:26:17 -08:00
CHEVY S. HUNGERFORD
29f8dfa1ad
fixing SensorKey output
2018-01-27 10:11:51 -06:00
CHEVY S. HUNGERFORD
1c4fa5628c
giving temperature more verbose output
2018-01-26 20:40:34 -06:00
shirou
4ac6b5b4d3
Revert "Merge pull request #470 from improbable-io/bug-darwin-build-2"
...
This reverts commit bb09b4e7d97d450a7836ae174cf812bbdbfe5e9d, reversing
changes made to 6a368fb7cd1221fa6ea90facc9447c9a2234c255.
2018-01-27 00:58:16 +09:00
shirou
bb09b4e7d9
Merge pull request #470 from improbable-io/bug-darwin-build-2
...
Fix build with bazel on OSX attempt 2 (add stub for host_cgo.go)
2018-01-27 00:53:26 +09:00
Tatiana Borisova
945c2f41de
Fix host_cgo file
2018-01-25 18:25:11 +00:00
Tatiana Borisova
a271cb7c1c
Fix package name in host_cgo.go
2018-01-25 17:39:00 +00:00
shirou
a97abd3450
Merge branch 'master' into feature/add_context_support
2018-01-09 11:34:48 +09:00
shirou
d1fb05a30b
Skip some test if CircleCI.
2018-01-09 11:30:38 +09:00
shirou
cd61c36c4f
Merge branch 'master' into feature/add_context_support
2018-01-09 11:18:25 +09:00
shirou
8b2468f1e7
Merge branch 'master' of github.com:shirou/gopsutil into feature/lxd_boot_time
2018-01-09 11:16:18 +09:00
shirou
4c73494c78
Add WithContext functions.
2017-12-31 15:25:49 +09:00
Lomanic
e3ae39aa5b
Fix #442 , trim sensor names and properly handle CentOS in host.SensorsTemperatures()
2017-12-19 23:02:10 +01:00
Tatiana Borisova
1be443f398
Fix build attempt 3 (add stub for host_cgo.go)
2017-12-14 17:27:08 +00:00
leaf
65598d98cc
To prevent hang if wmi.Query hangs, add a context-aware wrapper for it.
2017-11-20 10:13:27 -08:00
shawnps
befc2c3d92
call Fatal if length of Users() is 0
2017-11-08 13:29:49 +09:00
shirou
dc3a09c1d0
[host] linux: change file if in a lxc container.
2017-10-22 16:39:36 +09:00
Daniel Nelson
df2f1a8dd1
Add HOST_VAR envvar and use to locate utmp on Linux.
2017-10-16 14:53:14 -07:00
Steven Hartland
6450c60b61
Eliminate use of sysctl command on FreeBSD
...
In order to improve performance and help prevent crashes due to the outstanding fork crash bug:
https://github.com/golang/go/issues/15658
Replace string parsed values from the sysctl command with native reads of sysctl values using unix.SysctlRaw and unix.SysctlUint32.
This also merges OpenBSD and FreeBSD load implementations which are identical.
2017-10-05 08:45:56 +01:00
Yoshio HANAWA
a889bcce1a
Add type definitions for mips and mipsle
2017-08-27 02:36:33 +09:00
WAKAYAMA Shirou
114c78c777
[host]: add not implemented methods.
2017-08-03 11:08:35 +09:00
WAKAYAMA Shirou
9c5b318e0d
[host] windows: define Virtualization()
2017-08-03 10:14:20 +09:00
Sean Chittenden
42a72cbfae
Add HostID support to the solaris
build target.
2017-07-31 20:04:43 -07:00
Sean Chittenden
635b971c0e
Move from the syscall
package to the golang.org/x/sys/{unix,windows}
2017-06-02 13:51:00 -07:00
Frank Schroeder
a9e803ef6a
Fix data race in host.BootTime
2017-06-01 18:11:14 +02:00
Shirou WAKAYAMA
cdcb9bb2ed
[linux] host: fix typo
2017-04-22 17:06:35 +09:00
WAKAYAMA Shirou
25d50d5bc3
[linux]host: change to use filepath.Join
2017-04-22 17:02:33 +09:00
WAKAYAMA Shirou
dfbb3e40da
fix build bugs.
2017-04-10 22:24:36 +09:00
Shirou WAKAYAMA
fee973abda
[linux]host: fix HostTempreture func
2017-04-10 22:06:37 +09:00
shirou
8e36fe6d8f
Merge pull request #334 from dotpy3/macos-linux-temperatures
...
Added temperatures sensors for macOS and Linux
2017-04-10 21:54:07 +09:00
WAKAYAMA Shirou
e49a95f3d5
[host]darwin: PlatformInformation has been 5 values other is 4.
2017-04-06 22:17:56 +09:00
itnihao
490dbd4ea4
Add hostinfo Virtualization vmware
2017-03-25 00:19:22 +08:00
Eric Gourlaouen
22aefb460a
Replaced sys by HostSys
...
Added TemperatureStat string test
2017-03-20 19:01:28 +01:00
Eric Gourlaouen
8b08ca5fdc
added temperatures
2017-03-19 02:08:19 +01:00