Commit Graph

49 Commits (97e1d050842860568fadc494d212e09d801a3d87)

Author SHA1 Message Date
WAKAYAMA shirou e864f2a037 [disk]freebsd: update 386.
WAKAYAMA shirou 01832c6a58 [host]freebsd: add freebsd_386.
WAKAYAMA shirou d9e994bec8 [host]freebsd: update freebsd_amd64
Shirou WAKAYAMA ce98590a35 [host]linux: forgot to add sizeOfUtmp.
Shirou WAKAYAMA 15ff7e19df [host]linux: fix i386 and gofmt.
Shirou WAKAYAMA b1df5a912c [host]linux: type file changed.
Shirou WAKAYAMA 0787e8ba3e [host]linux-arm: update type_liux.go. Test will fail.
Shirou WAKAYAMA bce9212def fix build bugs.
Shirou WAKAYAMA d21ed2b40d search path via exec.LookPath before actual invoke.
Shirou WAKAYAMA 4bb84648bf JSON representation is renamed to fit Google JSON style, camelCase.
Shirou WAKAYAMA ea152ea901 [BREAKING CHANGE] rename functions to pass golint. ex) net.NetIOCounters -> net.IOCounters
Shirou WAKAYAMA fa3e1cc196 [common]linux: add HostEtc to switch '/etc' See #175.
Robin Burchell 55cacb4730 host_darwin: Use a named constant for USER_PROCESS.
Matches the host_linux change.
Robin Burchell 3fc7bc1ef7 host_linux: Skip everything that isn't a normal process.
host_darwin does the same filtering. Not doing this gives us some rather strange
entries that likely aren't what we want.

Before:
    {"user":"reboot","terminal":"~","host":"3.10.0-327.4.5.el7.x86_64","started":1454378260}
    {"user":"LOGIN","terminal":"ttyS0","host":"","started":1454378270}
    {"user":"LOGIN","terminal":"tty1","host":"","started":1454378270}
    {"user":"runlevel","terminal":"~","host":"3.10.0-327.4.5.el7.x86_64","started":1454378276}
    {"user":"root","terminal":"pts/0","host":"vpn","started":1454404513}

After:
    {"user":"root","terminal":"pts/0","host":"vpn","started":1454404513}
Paul Querna 008f2b4e18 Get Arch Linux Version from LSB
WAKAYAMA shirou 54a6c186c1 host[freebsd]: BREAKING CHANGE. Boottime() should return uint64 same as other.
Shirou WAKAYAMA 0afd653fab host[all]: fix #114 String() issue.
Cameron Sparr 444ee723c3 Fix HostInfo.Uptime, which has been returning boot time
Also adding a HostInfo.BootTime field for holding the boot time
Shirou WAKAYAMA 7288e9a5af common[all]: add internal
Daniel Theophanes 0af895258e common: rename package common to internal/common. Add ENV helper funcs.
Package common wasn't used for public functions. Place it in an
internal directory to prevent other packages from using.

Remove the distributed references to "HOST_PROC" and "HOST_SYS"
consts and combine into a common function. This also helps so that
if a env var is defined with a trailing slash all will continue to
work as expected.

Fixes #100
Jonathan Chauncey 0461c50666 chore(*): Fixes #94
Added the ability to fetch an alternative location for /proc via an
environment variable. If the env var is not set it will return /proc as
the default value.
Nick Galbreath 99d93f93b2 shirou/gopsutil#90 make hostinfo more robust
Shirou WAKAYAMA 3303647209 host[linux]: fix utmp struct on arm.
mayowa bf16d0a6a7 modified PlatformVersion and PlatformFamily string to (somewhat) match the output from sysinfo
mayowa ee43e655c2 implemented GetPlatformInfo and refactored HostInfo() to use it
mayowa 56d70ecc5e implemented HostStatInfo.Platform* for windows
WAKAYAMA shirou abb4086531 host[freebsd]: change to use utmpx for 9.0 or later.
Shirou WAKAYAMA ba88128af1 host_linux: change some virtualization check StringsContains to StringsHas.`
Shirou WAKAYAMA b5ffc220a6 common: Rename StringContains to StringsContains and add StringsHas.
Shirou WAKAYAMA 3bd9ace228 [linux] fix Host.BootTime(). It was seconds from Booted, not from epoch.
Fabian Ruff 91a97374c4 Add SuSe platform detection
WAKAYAMA shirou 64357f04e7 use StackExchange/wmi instead of invoking wmic process.
Note: This may not work on some old Windows XP.
WAKAYAMA Shirou 5f8b99aa65 windows: GetWmic returns [][]string where string split by ","
Shirou WAKAYAMA 8f05d68a09 host: forget to convert to uint64.
Shirou WAKAYAMA 515398a6f6 host: Boottime return type was wrong on darwin #40
WAKAYAMA Shirou 4b0f5a03dc host: use wmic OS instead of calling GetTickCount on Windows.
若山史郎 f2435bc8de host: skip if utmp.Type is not USERPROCESS (defined in utmpx.h)
若山史郎 a5d366a70c host: Users() on darwin works. but Started is not correct.
rekby 29807862fb + host and process for linux 386
Shirou WAKAYAMA cfb473f810 host linux now use godefs.
WAKAYAMA shirou 64f1a93c00 forget to add.
WAKAYAMA shirou b0c9f81246 host_freebsd now use godefs
Shirou WAKAYAMA 13cd195a7e change package name.
Shirou WAKAYAMA 1cb67eb4c2 merge 039b9defab
Shirou WAKAYAMA 16de570414 merge 039b9defab
WAKAYAMA Shirou 9f2c985a28 fix windows build.
Shirou WAKAYAMA a1c1d7b25f fix on Linux.
WAKAYAMA shirou d11680c773 fix bugs on FreeBSD.
Shirou WAKAYAMA a4671fcc2a move subdirectories. refer to issue #24