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

933 Commits

Author SHA1 Message Date
HeChuan
c818f7b647 set win cpu total name to "cpu-total"
set the name of windows cpu total percent to "cpu-total"
keep the same with Linux, Freebsd system
2017-07-20 11:47:15 +08:00
WAKAYAMA Shirou
66b0ca3121 [disk] Add comment to disk.Usage(). 2017-07-14 15:33:53 +09:00
WAKAYAMA Shirou
09e9859714 [net]linux: return err. 2017-07-10 16:48:47 +09:00
shirou
53dcbf48b4 Merge pull request #395 from better88/patch-1
err omit in getProcInodes
2017-07-10 16:47:42 +09:00
better88
86af477d1a err omit in getProcInodes 2017-07-10 15:03:52 +08:00
shirou
ae1481820a Merge pull request #392 from derekwbrown/add_username
[windows] add implementation for process.Username()
2017-07-09 00:54:15 +09:00
Derek Brown
a3ae2ed411 Add domain to username (rather than naked username) 2017-07-06 15:08:46 -07:00
shirou
aa0a3bce9d Merge pull request #382 from acd/master
Only read /proc/stat once when cpu.Times(true) is called on Linux
v2.17.06
2017-07-03 00:10:39 +09:00
Derek Brown
5157f03748 [windows] add implementation for process.Username() 2017-06-28 11:16:01 -07:00
Andrew Danforth
484470889f Only read /proc/stat once when cpu.Times(true) is called on Linux 2017-06-09 22:34:58 -04:00
shirou
3dd8bd46d9 Merge pull request #376 from ContinuumLLC/win_percpu_feature
Windows: Read processor performance metrics overall, per cpu and per core
2017-06-05 22:30:45 +09:00
Rajkumar Gupta
b657e83fed Added comments for structs and functions 2017-06-05 15:46:35 +05:30
Rajkumar Gupta
2d2db4203f Change to adapt current cpu.Times API for per cpu and core time stats 2017-06-05 14:18:20 +05:30
shirou
60a0ef9c82 Merge pull request #380 from sean-/retire-syscall
Move from the `syscall` package to the `golang.org/x/sys/{unix,windows}`
2017-06-04 21:55:23 +09:00
Sean Chittenden
cb12fba4f4
windows.Syscall doesn't exist: use syscall.Syscall() 2017-06-03 08:07:30 -07:00
Sean Chittenden
3e79194fe2
windows.EINVAL doesn't exist, only syscall.EINVAL. 2017-06-03 07:48:40 -07:00
Sean Chittenden
635b971c0e
Move from the syscall package to the golang.org/x/sys/{unix,windows} 2017-06-02 13:51:00 -07:00
shirou
e30b7839cd Merge pull request #379 from magiconair/fix-host-boottime-race
Fix data race in host.BootTime
v2.17.05
2017-06-02 09:51:11 +09:00
Frank Schroeder
a9e803ef6a
Fix data race in host.BootTime 2017-06-01 18:11:14 +02:00
Rajkumar Gupta
ea683cd370 Read processor performance metrics per cpu and per core 2017-05-25 17:54:43 +05:30
shirou
3e0b91b57e Merge pull request #375 from astj/linux-reduce-lstat-syscalls
Reduce unnecessary syscalls on common.NumProcs() in Linux
2017-05-25 09:57:39 +09:00
Asato Wakisaka
16a38100b3 NumProcs() just counts files under f, so use f.Readdirnames to avoid lstat syscall inside f.Readdir. 2017-05-25 00:04:41 +09:00
shirou
fd7db8b441 Merge pull request #372 from tmm1/linux-proc-mounts
Read disk partitions on linux from /proc/mounts instead of /etc/mtab
2017-05-19 12:41:14 +09:00
Aman Gupta
a08587b348 Update disk_linux.go 2017-05-18 23:38:11 -04:00
Aman Gupta
e346d3829a remove obsolete comment 2017-05-18 19:36:48 -07:00
Aman Gupta
5e1770d1f2 read disk partitions on linux from /proc/mounts intead of /etc/mtab 2017-05-18 19:19:31 -07:00
WAKAYAMA shirou
b6da2bd76e [freebsd] cpu: fix CPUInfo on 10.3R
Related: #307
2017-05-10 11:47:26 +09:00
shirou
37c114fe6c Merge pull request #366 from tmm1/patch-2
Ignore GetVolumeInformation errors on DRIVE_REMOVABLE volumes
2017-05-09 10:15:49 +09:00
shirou
19b101bb53 Merge pull request #365 from tmm1/patch-1
Include "DRIVE_REMOTE" volumes on windows
2017-05-09 10:14:29 +09:00
Aman Gupta
f2cbbac707 Ignore GetVolumeInformation errors on DRIVE_REMOVABLE volumes 2017-05-08 14:23:46 -07:00
Aman Gupta
b59c2a2be3 Include "DRIVE_REMOTE" volumes on windows 2017-05-08 09:50:38 -07:00
shirou
f7c38fa2f8 Merge pull request #361 from ablagoev/read-proc-files-with-a-single-read
Read /proc/net files with a single read syscall.
2017-05-04 21:34:56 +09:00
Alexander Blagoev
b32353f094 Add comments with a short explanation and link to the PR request 2017-05-04 14:52:34 +03:00
Alexander Blagoev
531f9507d2 Read /proc/net files with a single read syscall.
The /proc/net files are not guaranteed to be consistent, they are only
consitent on the row level. This is probably one of the reasons why
consequent read calls might return duplicate entries - the kernel is
changing the file as it is being read. In certain situations this might
lead to loop like situations - the same net entry is being returned when
reading the file as new connections are added to the kernel tcp table, i.e
there can be a lot of duplications.

This commit is trying to reduce the duplications, by fetching the contents
of the net files with a single read syscall.
2017-05-01 20:59:02 +03:00
shirou
119305b4ce Merge pull request #359 from shirou/fix_circleci
trying to fix CircleCI
2017-05-01 22:59:42 +09:00
WAKAYAMA Shirou
12c6e9d755 add chown golang pkg dir. 2017-05-01 22:54:27 +09:00
WAKAYAMA Shirou
8ef142ddde remove unnecessary circle.yml 2017-05-01 22:44:56 +09:00
WAKAYAMA Shirou
b9227ed559 fix typo of circle.yml 2017-05-01 22:37:18 +09:00
WAKAYAMA Shirou
f5cd65356f update circle.yml to use golang1.8 2017-05-01 22:34:13 +09:00
WAKAYAMA Shirou
ad1f130d0f update README about golang 1.8 is required. 2017-05-01 22:31:55 +09:00
shirou
c251591dc7 Merge pull request #355 from sean-/fix-lint-errors
Fix lint errors
2017-05-01 22:28:17 +09:00
shirou
772ab1fdbc Merge pull request #354 from sean-/fix-cmd-leak
Improve Command() handling and signal handling for launched processes.
2017-05-01 22:28:06 +09:00
shirou
9af92986dd Merge pull request #358 from ablagoev/optimize-net-connections
Fromat socketType properly in tcp duplication check key
v2.17.04
2017-04-30 23:39:46 +09:00
Alexander Blagoev
5a0a97f400 Fromat socketType properly in tcp duplication check key 2017-04-30 16:55:03 +03:00
shirou
b066db40c7 Merge pull request #356 from ablagoev/optimize-net-connections
Optimize memory usage for net.Connections on Linux
2017-04-30 20:22:54 +09:00
Alexander Blagoev
11e78812ae Build duplicate tcp connection ID in Connections for better readbility 2017-04-30 14:19:54 +03:00
shirou
9a4a9167ad Merge pull request #357 from ablagoev/fix-proc-net-dev-parsing
Improve /proc/net/dev parsing to include all edge cases
2017-04-30 10:40:06 +09:00
shirou
1f6e626a22 Merge pull request #353 from shirou/fix_352
[linux]host: change to use filepath.Join
2017-04-30 10:03:14 +09:00
Alexander Blagoev
f7dd4f97c7 Improve /proc/net/dev parsing to include all edge cases 2017-04-29 18:57:54 +03:00
Alexander Blagoev
51e4fb77cf Add socket state to TCP connection key 2017-04-28 19:34:08 +03:00