shirou
3d9d5e60ef
Merge pull request #688 from asnowfox/master
...
use /proc/buc/pci/devices to identify a VM is a guest
2019-06-01 11:18:40 +09:00
shirou
d8686bcd5c
Merge pull request #675 from marcv81/fix_665_v2
...
Fix for #665
2019-06-01 10:28:14 +09:00
shirou
4b629897d2
Merge pull request #647 from omar-polo/master
...
[OpenBSD][CPU] fix per-cpu
2019-06-01 10:24:59 +09:00
Lomanic
3af6e1ffe7
[host][linux] Properly handle double quotes in /etc/os-release in PlatformInformation
2019-05-31 18:04:45 +02:00
Lomanic
a0019d431c
Merge pull request #691 from ArtieReus/sles15
...
added sles to the suse platform family
2019-05-31 17:49:00 +02:00
Arturo Reuschenbach Puncernau
2a0b67d19c
added sles to the suse platform family
2019-05-24 11:33:07 +02:00
litong
6dfd8d56bb
Merge branch 'master' of https://github.com/asnowfox/gopsutil
2019-05-22 11:02:14 +08:00
litong
119f26c1df
use bus/pci/devices to identify a vm guest
2019-05-22 11:01:09 +08:00
Snow Fox
0cad0faa11
Merge pull request #1 from shirou/master
...
merge master
2019-05-22 10:46:50 +08:00
shirou
e146c2e08a
Merge pull request #677 from shirou/feature/remove_stolen_from_cpu
...
[cpu]: remove unused field Stolen
2019-05-12 18:43:21 +09:00
shirou
3e23fdab39
Merge pull request #684 from Lomanic/issue670
...
[process][darwin] Fix #670 remove call to common.Pipeline (prone to race condition)
2019-05-12 18:15:54 +09:00
Lomanic
0e0dd767df
[process][darwin] Fix #670 remove call to common.Pipeline (prone to race condition)
...
Also properly parse lsof to get second txt record instead of hoping the 5th line is the right one (wrong data returned for pid 57)
2019-05-08 18:17:56 +02:00
shirou
1b7d8ed295
Merge pull request #683 from Segflow/master
...
Fix: use filename in exec.LookPath instead of full path
2019-05-06 08:34:57 +09:00
litong
12005ab922
use /proc/bus/pci/devices to idenetify a kvm guest
2019-05-06 07:18:49 +08:00
Segflow
86c7289ccc
Fix: use filename in exec.LookPath instead of full path
...
exec.LookPath searches for the file in the $PATH, which mean giving it an absolute path is against it's own purposes.
2019-05-05 20:45:07 +01:00
shirou
01487156ff
Merge pull request #682 from pytimer/add-load-procstotal
...
add ProcsTotal in load
2019-05-05 21:37:46 +09:00
pytimer
9715668586
add ProcsTotal in load
2019-05-05 10:29:20 +08:00
Omar Polo
3cbb0873de
int32 is enough -- don't waste space
2019-05-02 12:24:16 +02:00
shirou
cae8efcffa
[cpu]: remove unused field Stolen
...
see #676
2019-04-27 13:45:12 +09:00
shirou
fa9845945e
Merge pull request #674 from lootek/more-vmstat
...
Add pages in/out/fault statistics (as read from vmstat)
v2.19.04
2019-04-27 12:13:43 +09:00
Marc
174b31f146
Fix for #665
...
Remains backward compatible.
When encountering non-fatal errors SensorsTemperatures() returns the
temperatures for all the sensor we could read successfully. In that
case the custom error contains a list of all the non-fatal errors
encountered.
Example usage:
_, err := SensorsTemperatures()
if err != nil {
warns, ok := err.(*Warnings)
if ok {
fmt.Printf("%v\n", err)
for i, w := range warns.List {
fmt.Printf("Warning %v: %v\n", i+1, w)
}
} else {
t.Errorf("%v", err)
}
}
2019-04-26 23:15:23 +08:00
lootek
1cbb212a6b
Add pages in/out/fault statistics (as read from vmstat)
2019-04-25 09:32:59 +02:00
shirou
2cbc9195c8
Merge pull request #659 from mingrammer/gofmt
...
Refactor with gofmt
v2.19.03
2019-03-23 22:16:28 +09:00
mingrammer
64a995aad4
Refactor with gofmt
2019-03-23 21:57:24 +09:00
shirou
68c6fbd367
Merge pull request #651 from mingrammer/go-modules
...
Support go modules
2019-03-23 10:02:08 +09:00
shirou
b2eb6640fb
[disk][windows]: does not define ret at begining of the function.
...
To reduce memory when error happend. commented on #653 .
2019-03-23 09:48:18 +09:00
shirou
2689fdca83
Merge pull request #655 from keefo/fix_654
...
[Darwin][process]Add hour handling in convertCPUTimes function
2019-03-23 09:42:38 +09:00
shirou
e1d4d987e0
Merge pull request #650 from mznet/physical-cpu-darwin
...
[Darwin][CPU] retrieve a cpu count depends on an boolean argument
2019-03-23 09:39:50 +09:00
Liam Xu
1b525b7c9c
Return cpu time format error
...
Return cpu time format error
2019-03-22 11:44:52 -07:00
Liam Xu
f2f18df9db
Use Swith to replace if else
...
Use Swith to replace if else
2019-03-22 10:21:01 -07:00
Minje Park
caebe5dbe4
returning 0 and error if SysctlUint32 raises an error
2019-03-21 23:52:34 +09:00
Omar Polo
53ce014b14
handle EOPNOTSUPP when checking for hw.smt
...
if hw.smt is not applicable for the current platform (e.g. i386),
pretend it's enabled
2019-03-19 20:06:12 +01:00
Xu Lian
6eb4d73bde
Fix an indentation issues
2019-03-18 20:36:12 -07:00
Liam Xu
b3670f8027
Add hour handling in convertCPUTimes function
...
This commit add hour handling in convertCPUTimes function.
The time string usually comes from macOS command line:
ps -a -o stime,utime -p <pid>
which could contain hour string.
2019-03-18 15:48:08 -07:00
Omar Polo
c28fe78291
forget to take addr
2019-03-18 19:58:50 +01:00
Lomanic
381f7cc0bf
Merge pull request #652 from mingrammer/fix-misspells
...
Fix typos
2019-03-18 12:30:02 +01:00
mingrammer
017c9f9cbc
Fix typos
2019-03-18 02:52:26 +09:00
mingrammer
ca89e7d77e
Support go modules
2019-03-18 02:45:14 +09:00
Minje Park
ca1fcad2aa
retrieve a cpu count depends on an boolean argument
2019-03-17 23:18:29 +09:00
shirou
533485542f
Merge pull request #649 from shirou/feature/fix_648_freebsd_mem
...
[mem][freebsd]: add SysctlUint which can adapt both 32 and 64 bit
2019-03-17 09:16:13 +09:00
WAKAYAMA shirou
bb15c85289
[mem][freebsd]: add SysctlUint which can adapt both 32 and 64 bit
2019-03-16 21:43:15 +09:00
Omar Polo
932f2f6049
Fix cpu stats when hw.smt is enabled
...
When hw.smt is enabled, and it's enabled by default from 6.4, the
number of cpus given by `runtime.NumCPU()` is half of the total: only
the cpuN with N = 0,2,4,... are used by the system. We need to detect
that and ask for the correct stats.
2019-03-16 12:26:03 +01:00
Lomanic
ebc97eefea
Merge pull request #644 from Lomanic/issue640
...
[cpu][linux] Add support for logical arg in Counts #640 #628
2019-03-13 18:43:15 +01:00
Omar Polo
12d92847cf
Get hw.ncpuonline without unix.SysctlUint32
...
unix.Sysctl always return an error when asking for hw.ncpuonline, so
revert to a direct unix.Syscall6 to get the cpu count.
2019-03-13 11:03:17 +01:00
Omar Polo
c2c7893509
fix logic error + little refactor
...
Fix: get cptime of n-th cpu when `percpu` instead of the average.
While there, rearrange the last if statement to make the code a bit
more homogeneous.
2019-03-12 21:29:10 +01:00
Lomanic
200e5fbeab
[cpu][linux] Remove regexp in Counts
...
Also remove some remaining debug print and unnecessary strings.Split
2019-03-06 19:41:26 +01:00
Lomanic
c0ca431bf1
[cpu][linux] Add support for logical arg in Counts #640 #628
2019-03-03 14:44:21 +01:00
Lomanic
27ec6a0789
[host][linux] Remove call to sysctl binary in host/host_linux.go #639
2019-03-02 23:22:53 +01:00
Lomanic
7e9e36b568
[host][openbsd] Remove calls to sysctl binary in host/host_openbsd.go #639
2019-03-02 23:22:53 +01:00
Lomanic
e3c878cc43
[mem][darwin] Remove calls to sysctl binary in mem/mem_darwin.go #639
2019-03-02 23:22:53 +01:00