Commit Graph

95 Commits (6e221c482653ef05c9f6a7bf71ddceea0e40bac5)

Author SHA1 Message Date
Yoshio HANAWA a889bcce1a Add type definitions for mips and mipsle 8 years ago
WAKAYAMA Shirou 114c78c777 [host]: add not implemented methods. 8 years ago
WAKAYAMA Shirou 9c5b318e0d [host] windows: define Virtualization() 8 years ago
Sean Chittenden 42a72cbfae
Add HostID support to the `solaris` build target. 8 years ago
Sean Chittenden 635b971c0e
Move from the `syscall` package to the `golang.org/x/sys/{unix,windows}` 8 years ago
Frank Schroeder a9e803ef6a
Fix data race in host.BootTime 8 years ago
Shirou WAKAYAMA cdcb9bb2ed [linux] host: fix typo 8 years ago
WAKAYAMA Shirou 25d50d5bc3 [linux]host: change to use filepath.Join 8 years ago
WAKAYAMA Shirou dfbb3e40da fix build bugs. 8 years ago
Shirou WAKAYAMA fee973abda [linux]host: fix HostTempreture func 8 years ago
shirou 8e36fe6d8f Merge pull request #334 from dotpy3/macos-linux-temperatures
Added temperatures sensors for macOS and Linux
8 years ago
WAKAYAMA Shirou e49a95f3d5 [host]darwin: PlatformInformation has been 5 values other is 4. 8 years ago
itnihao 490dbd4ea4 Add hostinfo Virtualization vmware 8 years ago
Eric Gourlaouen 22aefb460a Replaced sys by HostSys
Added TemperatureStat string test
8 years ago
Eric Gourlaouen 8b08ca5fdc added temperatures 8 years ago
WAKAYAMA Shirou f8ef680a47 error strings change to lowercase 8 years ago
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`.
8 years ago
shirou 23f4b7eb14 Merge pull request #323 from molecul/patch-2
Fix for getMachineGuid() return value
8 years ago
Shirou WAKAYAMA 85d3530ae8 fix test. 8 years ago
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
8 years ago
Alexey Galkin 2287b035c8 Add new test 'TestHostGuid'
For issue: https://github.com/shirou/gopsutil/issues/322
8 years ago
tycho garen 22c56d292e close open files 8 years ago
Sean Chittenden 36f5033d97
Unconditionally lowercase the `HostID` from all supported platforms. 8 years ago
Sean Chittenden 650c4d595f
Use `HKLM/SOFTWARE\Microsoft\Cryptography`'s `MachineGuid` registry key to enable `HostID` support on Windows. 8 years ago
Cameron Sparr a213bf5e6d
run go fmt ./... 8 years ago
Sean Chittenden 955821b5ab
Add Go-native structs for Darwin/386 and FreeBSD/arm 8 years ago
Sam Kleinman 488c56586b add platform compatibility 8 years ago
shirou a2257218e1 Merge pull request #289 from DataDog/conor/cache-boot-time
Cache the boot time after first query.
8 years ago
Marco Pfatschbacher b4846b445b Add support for OpenBSD/amd64
This code is based on the FreeBSD version
and implements roughly the same feature set.
8 years ago
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.
9 years ago
Shirou WAKAYAMA b9067179ef [host]darwin: change to use sw_vers to get platform version 9 years ago
shirou a8e24d70f9 Merge pull request #247 from lfittl/fallback-for-unsupported-architectures
Add fallback code for all unsupported operating systems
9 years ago
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.
9 years ago
Lukas Fittl 13aedadcde Add separate kernelVersion field to host information.
This is mostly intended for Linux, where we are returning the OS version
in the PlatformVersion field, which seems reasonable. Often it is still
useful to know which Linux kernel is running.

For FreeBSD and Darwin the kernel version matches the platform version,
since they previously used the kernel version for the platform version.

For Windows the kernel version is empty, since there is no clear way
to determine it.
9 years ago
Sean Chittenden d490d634ca
On Linux, attempt to read from /sys/class/dmi/id/product_uuid first
before falling back to kernel.random.boot_id.

`/sys/class/dmi/id/product_uuid` is still managed by permissions, so
for root-run processes where `/sys/class/dmi/id/product_uuid` is
available, the host's UUID will be used instead, otherwise the UUID
from kernel.random.boot_id will be used instead.
9 years ago
Sean Chittenden 59094cd5b7
Add HostID to the Host InfoStat struct returned from host.Info().
On supported hosts the value returned is a UUID (case preserving
from the value of the underlying OS).

For Linux this is generated once, randomly per boot.  For FreeBSD and
Darwin this is a more durable value that should persist across reboots.
9 years ago
Sean Chittenden 4f79984afe
Remove redefined import name for common. 9 years ago
Sean Chittenden a3f57b1314
Resolve cyclic import and create a common helper func, NumProcs() 9 years ago
Sean Chittenden fcd296ea11
Merge branch 'master' of github.com:shirou/gopsutil 9 years ago
Sean Chittenden 69f7f8eaeb
Update host.Info() to return the number of processes on all platforms.
Fixes: #227
9 years ago
Shirou WAKAYAMA dd9b50926c [host]linux: add coreos to Info() and Virtualization(). 9 years ago
WAKAYAMA Shirou 53406b2832 [host]Windows: BootTime and Uptime are reversed on Windows. 9 years ago
Shirou WAKAYAMA e9afb36ccf [host] linux: detect docker and rkt correctly 9 years ago
Shirou WAKAYAMA c0d1185809 [host]linux: add alpine linux to detect host.Info(). 9 years ago
Shirou WAKAYAMA 57f6aebc7e add Timeout to invoke command and use common.Invoke refs: #201 9 years ago
Johannes 'fish' Ziemke 2a69690d62 Add type definitions for arm64 and ppc64le 9 years ago
WAKAYAMA shirou e864f2a037 [disk]freebsd: update 386. 9 years ago
WAKAYAMA shirou 01832c6a58 [host]freebsd: add freebsd_386. 9 years ago
WAKAYAMA shirou d9e994bec8 [host]freebsd: update freebsd_amd64 9 years ago
Shirou WAKAYAMA ce98590a35 [host]linux: forgot to add sizeOfUtmp. 9 years ago