1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-26 13:48:59 +08:00

212 Commits

Author SHA1 Message Date
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
WAKAYAMA Shirou
f8ef680a47 error strings change to lowercase 2017-03-15 22:43:20 +09:00
James Nugent
408005be94 host: Add Solaris support for Info, {Boot,Up}time
This commit adds support for Info(), BootTime() and Uptime() in package
Host. It uses no cgo, preferring to parse the output of `kstat -p`
instead.

Thanks go to @gfrey for the parsing logic for `/etc/release` and `uname`.
2017-03-14 16:05:17 -05:00
shirou
23f4b7eb14 Merge pull request #323 from molecul/patch-2
Fix for getMachineGuid() return value
2017-03-03 22:53:34 +09:00
Shirou WAKAYAMA
85d3530ae8 fix test. 2017-03-03 22:35:18 +09:00
Alexey Galkin
b1f19a76c7 Fix for getMachineGuid() return value
getMachineGuid() function return a empty value in x86 windows builds.
Issue: https://github.com/shirou/gopsutil/issues/322
2017-03-03 16:30:53 +04:00
Alexey Galkin
2287b035c8 Add new test 'TestHostGuid'
For issue: https://github.com/shirou/gopsutil/issues/322
2017-03-03 16:28:49 +04:00
tycho garen
22c56d292e close open files 2017-02-22 08:46:23 -05:00
Sean Chittenden
36f5033d97
Unconditionally lowercase the HostID from all supported platforms. 2017-02-06 16:10:46 -08: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
Cameron Sparr
a213bf5e6d
run go fmt ./... 2017-02-01 23:05:29 +00:00
Sean Chittenden
955821b5ab
Add Go-native structs for Darwin/386 and FreeBSD/arm 2017-01-31 22:56:31 -08:00
Sam Kleinman
488c56586b add platform compatibility 2017-01-27 20:35:58 -05: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
Marco Pfatschbacher
b4846b445b Add support for OpenBSD/amd64
This code is based on the FreeBSD version
and implements roughly the same feature set.
2016-11-24 22:30:29 +01:00
Conor Branagan
5afd6f21c9 Cache the boot time after first query.
When fetching stats on all processes at once there's a non-trivial amount of
time spent in the `BootTime` call. But since this value should never change
during a live process, we can use a cached version for all subsequent calls.
2016-10-13 11:24:29 -04:00
Shirou WAKAYAMA
b9067179ef [host]darwin: change to use sw_vers to get platform version 2016-09-12 08:07:12 +09:00
shirou
a8e24d70f9 Merge pull request #247 from lfittl/fallback-for-unsupported-architectures
Add fallback code for all unsupported operating systems
2016-08-27 00:58:16 +09:00
Lukas Fittl
da9fa1162b Add fallback code for all unsupported operating systems.
This enables using gopsutil in a codebase that gets built on other OSes
than the ones supported. Instead of a build failure as before, due to
the build tags, gopsutil will now throw an "not implemented" runtime
error.

Fixes #234.
2016-08-22 15:31:26 -07:00