mirror of https://github.com/shirou/gopsutil
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.pull/361/head
parent
119305b4ce
commit
531f9507d2
Loading…
Reference in New Issue