Commit Graph

735 Commits (145e48efdb566d3dba93c959acc7c846658a120b)
 

Author SHA1 Message Date
Bruno Clermont 145e48efdb actually there is 13 columns, not 12 9 years ago
Bruno Clermont 57ffe3b1ef Support interface with multiple digits 9 years ago
shirou 859c81da50 Merge pull request #253 from dvusboy/standardize_mhz
Standardize `Mhz` to mean maximum CPU frequency on Linux platform
9 years ago
K.C. Wong 3dc4e52844 Handle the case when the `cpufreq` sysfs does not exist
* on virtualized host, this may happen.
* but we may have a value from parsing `/proc/cpuinfo`
* in this case, we do not return the error if we fail to extra
  a value from `cpufreq/cpuinfo_max_freq`
9 years ago
K.C. Wong 10a1ae2123 Standardize `Mhz` to mean maximum CPU frequency on Linux platform
* resolve #249
* in `cpu_windows.go`, `Mhz` is the value of `MaxClockSpeed`
* on Linux platform, the `Mhz` value is extracted from `/proc/cpuinfo`
  which reflects the current clock speed; treat this as the fallback
  value instead
* read from `cpufreq/cpuinfo_max_freq` under sysfs to get the
  maximum clock speed for `Mhz`, just like for Windows platform
* also fix the path to `cpu.CoreID` value; the filename is `core_id`
9 years ago
shirou 79184fee44 Merge pull request #251 from theothertomelliott/master
Correctly handle long running processes on OSX
9 years ago
Shirou WAKAYAMA 08a6ab66b0 disk: If could not get Inodes, return empty. 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
Tom Elliott 1435987652 Correctly handle long running processes on OSX
The full etime format is dd-hh:mm:ss. Replacing '-' with ':' fixes parsing of this format.
9 years ago
shirou 0130d5f088 Merge pull request #248 from dvusboy/cpu_freq_unit
Addressing frequency unit discrepancies
9 years ago
K.C. Wong 123a6c9b0d Addressing frequency unit discrepancies
* for Darwin, it is a minor tweak for readability: the value
  returned is in Hz, so using a variable named 'hz' makes more
  sense than 'mhz'
* for Linux, the unit is in kHz so we need to divide the value
  from `cpuinfo_max_freq` by 10^3 to get MHz (see
  cpu-freq/user-guide.txt of the kernel documentation)
9 years ago
shirou 3562fb8aa2 Merge pull request #241 from lfittl/add-host-kernel-version
Add separate kernelVersion field to host information
9 years ago
shirou 58133410ec Merge pull request #240 from lfittl/fix-osx-linter-warning
CPU: Fix linter warning on OSX
9 years ago
shirou 41852ca459 Merge pull request #246 from theothertomelliott/master
Implement CreateTime for darwin.
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 74541ba4a5 CPU: Fix linter warning on OSX. 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
Tom Elliott 3855e7ba0e Implement CreateTime for darwin. Parses elapsed time and converts this to epoch time. 9 years ago
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
9 years ago
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
9 years ago
Lukas Fittl 8f2153dfcf Add missing disk IO statistics for merged reads/writes, IOPS in progress. 9 years ago
Lukas Fittl fc27f01654 Ensure "make check" can succeeed if it doesn't find any golint errors. 9 years ago
shirou e997d2e3db Merge pull request #238 from kthommandra/add_linux_mem_fields
Added fields to VirtualMemoryStat
9 years ago
kthommandra 1fd3a4dbad Added the writeback, dirty and writebacktmp fields from /proc/meminfo on Linux 9 years ago
shirou 1cc18d94d9 Merge pull request #237 from sean-/f-host-id
Add HostID to Host
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 e4f857a9ca
Fix a linter issue: s/TimeoutErr/ErrTimeout/g 9 years ago
Sean Chittenden 613ada987d
Add DoSysctrl() to Linux's common utilities. 9 years ago
shirou 4d0c402af6 Merge pull request #236 from ncabatoff/master
fix incorrect names for fields in proc/pid/io
9 years ago
Nick Cabatoff 28640e5d73 fix incorrect names for fields in proc/pid/io 9 years ago
shirou ee66bc560c Merge pull request #232 from phemmer/io_time_freebsd
add disk IoTime on freebsd and fix read & write time calculation
9 years ago
Patrick Hemmer 3cfaee3a93 add disk IoTime on freebsd and fix read & write time calculation 9 years ago
shirou 14f42a28f1 Merge pull request #231 from msingle/patch-1
Fix typo
9 years ago
Matt Singletary 072f1a3574 Fix typo
misspelling of family in 'platformfamiliy'
9 years ago
shirou ca63fa830d Merge pull request #228 from sean-/master
Correctly detect host Procs on all platforms.
9 years ago
Sean Chittenden 4f79984afe
Remove redefined import name for common. 9 years ago
Sean Chittenden e0b5f86113
Spell `error` like `err`. *facepalm* 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 2728d81cde copied from golang LICENSE. 9 years ago
shirou bbb9025bfa Merge pull request #222 from diptanu/master
Casting the values of working set and page file to uint64
9 years ago
Diptanu Choudhury af4c8608c9 Casting the values of working set and page file to uint64 9 years ago
shirou 5c1bfed855 Merge pull request #219 from sean-/freebsd-cpu-info
Improve FreeBSD's CPU InfoStat collection
9 years ago
Sean Chittenden 14b2ce8b81
Don't be lossy re: CPU model number. 9 years ago
Sean Chittenden 606680edc5
Improve the accuracy of CPU detection on FreeBSD. 9 years ago
shirou 22a03b5be3 Merge pull request #218 from zstyblik/patch-1
Fix typos in README.rst
9 years ago
Zdenek Styblik c184d5359e Fix typos in README.rst
Commit fixes some typos in README.rst
9 years ago
shirou 1a490a2491 Merge pull request #217 from sandlbn/master
[net]linux Add support for linux net interface fifo errors
9 years ago