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

16 Commits

Author SHA1 Message Date
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
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.
2016-08-22 14:15:30 -07:00
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.
2016-08-11 00:51:07 -07:00
Sean Chittenden
fcd296ea11
Merge branch 'master' of github.com:shirou/gopsutil 2016-07-11 01:15:11 -05:00
Sean Chittenden
69f7f8eaeb
Update host.Info() to return the number of processes on all platforms.
Fixes: #227
2016-07-10 23:47:29 -05:00
WAKAYAMA Shirou
53406b2832 [host]Windows: BootTime and Uptime are reversed on Windows. 2016-06-12 23:20:51 +09:00
WAKAYAMA shirou
e864f2a037 [disk]freebsd: update 386. 2016-04-23 23:43:00 +09:00
Shirou WAKAYAMA
4bb84648bf JSON representation is renamed to fit Google JSON style, camelCase. 2016-03-23 10:52:46 +09:00
Shirou WAKAYAMA
ea152ea901 [BREAKING CHANGE] rename functions to pass golint. ex) net.NetIOCounters -> net.IOCounters 2016-03-22 23:09:12 +09:00
Shirou WAKAYAMA
0afd653fab host[all]: fix #114 String() issue. 2015-11-24 09:30:17 +09:00
Shirou WAKAYAMA
3bd9ace228 [linux] fix Host.BootTime(). It was seconds from Booted, not from epoch. 2015-06-19 12:00:04 +09:00
WAKAYAMA shirou
64f1a93c00 forget to add. 2014-12-31 22:47:22 +09:00
WAKAYAMA shirou
b0c9f81246 host_freebsd now use godefs 2014-12-31 00:30:55 +09:00
Shirou WAKAYAMA
13cd195a7e change package name. 2014-12-30 22:09:05 +09:00
Shirou WAKAYAMA
1cb67eb4c2 merge 039b9defabe2fba35c9d3a4dbf7edc3fad812227 2014-12-27 23:43:18 +09:00
Shirou WAKAYAMA
a4671fcc2a move subdirectories. refer to issue #24 2014-11-27 10:18:15 +09:00