1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-05-10 19:29:14 +08:00

718 Commits

Author SHA1 Message Date
Tom Elliott
3855e7ba0e Implement CreateTime for darwin. Parses elapsed time and converts this to epoch time. 2016-08-20 23:38:36 -04:00
shirou
2eb8f8bff8 Merge pull request #242 from lfittl/add-missing-linux-disk-io-statistics
Add missing disk IO statistics for merged reads/writes, IOPS in progress
2016-08-17 13:44:03 +09:00
shirou
188e6d5436 Merge pull request #239 from lfittl/fix-make-check-condition
Ensure "make check" can succeeed if it doesn't find any golint errors
2016-08-17 12:33:51 +09:00
Lukas Fittl
8f2153dfcf Add missing disk IO statistics for merged reads/writes, IOPS in progress. 2016-08-16 13:11:50 -07:00
Lukas Fittl
fc27f01654 Ensure "make check" can succeeed if it doesn't find any golint errors. 2016-08-16 13:04:47 -07:00
shirou
e997d2e3db Merge pull request #238 from kthommandra/add_linux_mem_fields
Added fields to VirtualMemoryStat
2016-08-16 23:35:08 +09:00
kthommandra
1fd3a4dbad Added the writeback, dirty and writebacktmp fields from /proc/meminfo on Linux 2016-08-16 05:13:14 -07:00
shirou
1cc18d94d9 Merge pull request #237 from sean-/f-host-id
Add HostID to Host
2016-08-11 23:52:12 +09:00
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.
2016-08-11 01:29:46 -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
e4f857a9ca
Fix a linter issue: s/TimeoutErr/ErrTimeout/g 2016-08-11 00:49:29 -07:00
Sean Chittenden
613ada987d
Add DoSysctrl() to Linux's common utilities. 2016-08-11 00:48:24 -07:00
shirou
4d0c402af6 Merge pull request #236 from ncabatoff/master
fix incorrect names for fields in proc/pid/io
2016-07-25 17:59:33 +09:00
Nick Cabatoff
28640e5d73 fix incorrect names for fields in proc/pid/io 2016-07-24 11:19:59 -04:00
shirou
ee66bc560c Merge pull request #232 from phemmer/io_time_freebsd
add disk IoTime on freebsd and fix read & write time calculation
2016-07-22 10:13:42 +09:00
Patrick Hemmer
3cfaee3a93 add disk IoTime on freebsd and fix read & write time calculation 2016-07-21 17:22:52 -04:00
shirou
14f42a28f1 Merge pull request #231 from msingle/patch-1
Fix typo
2016-07-21 11:20:13 +09:00
Matt Singletary
072f1a3574 Fix typo
misspelling of family in 'platformfamiliy'
2016-07-20 15:03:53 -04:00
shirou
ca63fa830d Merge pull request #228 from sean-/master
Correctly detect host Procs on all platforms.
2016-07-12 08:19:29 +09:00
Sean Chittenden
4f79984afe
Remove redefined import name for common. 2016-07-11 14:27:50 -04:00
Sean Chittenden
e0b5f86113
Spell error like err. *facepalm* 2016-07-11 14:07:55 -04:00
Sean Chittenden
a3f57b1314
Resolve cyclic import and create a common helper func, NumProcs() 2016-07-11 14:05:30 -04: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
Shirou WAKAYAMA
2728d81cde copied from golang LICENSE. 2016-06-25 18:45:55 +09:00
shirou
bbb9025bfa Merge pull request #222 from diptanu/master
Casting the values of working set and page file to uint64
2016-06-23 15:14:09 +09:00
Diptanu Choudhury
af4c8608c9 Casting the values of working set and page file to uint64 2016-06-22 16:22:37 -07:00
shirou
5c1bfed855 Merge pull request #219 from sean-/freebsd-cpu-info
Improve FreeBSD's CPU InfoStat collection
2016-06-17 17:26:08 +09:00
Sean Chittenden
14b2ce8b81
Don't be lossy re: CPU model number. 2016-06-16 19:32:49 -07:00
Sean Chittenden
606680edc5
Improve the accuracy of CPU detection on FreeBSD. 2016-06-16 19:25:27 -07:00
shirou
22a03b5be3 Merge pull request #218 from zstyblik/patch-1
Fix typos in README.rst
v2.1
2016-06-14 18:28:26 +09:00
Zdenek Styblik
c184d5359e Fix typos in README.rst
Commit fixes some typos in README.rst
2016-06-14 11:06:54 +02:00
shirou
1a490a2491 Merge pull request #217 from sandlbn/master
[net]linux Add support for linux net interface fifo errors
2016-06-14 07:59:35 +09:00
shirou
93e9068485 Merge pull request #216 from zstyblik/add-documentation
[disk]linux: add documentation for GetDiskSerialNumber()
2016-06-13 22:54:23 +09:00
sandlbn
480ccb89e1 Added support for linux net interface fifo errors 2016-06-13 13:27:25 +01:00
Zdenek Styblik
70cbab7045 [disk]linux: add documentation for GetDiskSerialNumber()
Commit adds documentation for GetDiskSerialNumber(), because it wasn't clear
what was expected as a parameter.

Fixes #212
2016-06-13 11:11:12 +02:00
Shirou WAKAYAMA
dd9b50926c [host]linux: add coreos to Info() and Virtualization(). 2016-06-13 17:22:02 +09:00
Shirou WAKAYAMA
c916da2502 [process]linux: add linux_arm64.go explicitly 2016-06-13 16:17:40 +09:00
WAKAYAMA Shirou
53406b2832 [host]Windows: BootTime and Uptime are reversed on Windows. 2016-06-12 23:20:51 +09:00
Shirou WAKAYAMA
e9afb36ccf [host] linux: detect docker and rkt correctly 2016-06-06 23:50:19 +09:00
Shirou WAKAYAMA
c0d1185809 [host]linux: add alpine linux to detect host.Info(). 2016-06-06 22:57:17 +09:00
shirou
586bb697f3 Merge pull request #207 from sparrc/diskstats-panic-fix
Fix potential panic in linux disk IO counters
2016-06-03 22:00:04 +09:00
Cameron Sparr
da43049324 Fix potential panic in linux disk IO counters
Old kernels have a bug in diskstats where lines can have less than 14
fields. This applies to the kernel present in RHEL 5.2 and earlier.

It's a bit of a niche but probably best to patch to be safe from future
bugs too.

RHEL bug case:
https://bugzilla.redhat.com/show_bug.cgi?id=583285

Encountered in Telegraf:
https://github.com/influxdata/telegraf/issues/1322
2016-06-03 11:16:07 +01:00
shirou
ddc9f5a41c Merge pull request #205 from vrecan/calc_cpu_percent
Calc cpu percent using last variables if interval of 0 is given
2016-06-03 00:44:10 +09:00
Ben Aldrich
9dbebcf46e rename ALL to all 2016-06-01 16:03:11 -06:00
Ben Aldrich
a76195e088 fixed imports and spelling error 2016-06-01 15:53:54 -06:00
Ben Aldrich
c36f7ac8b0 rename var 2016-06-01 15:45:29 -06:00
Ben Aldrich
fcc1747d9f Merge branch 'master' of https://github.com/shirou/gopsutil into calc_cpu_percent
Conflicts:
	cpu/cpu.go
2016-06-01 15:24:23 -06:00
Ben Aldrich
c389989453 calculate cpu percentage compared to last call if 0 interval is given 2016-06-01 15:21:58 -06:00
shirou
6e9b0bbb1b Merge pull request #197 from shirou/process/add_memory_windows
Process/add memory windows
2016-05-30 14:06:48 +09:00