Age | Commit message (Collapse) | Author | Files | Lines |
|
Add process UI tab entry to show flows statistics per pid.
Also changed flow_entry which now has pointer to new struct proc_entry
object which contains process related info.
On each 1 second refresh proc_entry is checked if it exists by checking
/proc/<pid> path, and is deleted if there is no any flows related to it
(flows_count is 0), if the process exists then dst & src rates info is
zeroed and summed from the all related flows which are in the
proc_entry->flows list.
The bytes & pkts amount info is collected during all the time process
exists.
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Add proc_find_by_inode() in proc.c which finds pid by inode & gets
processe's command line and use it in the flowtop.c instead of
walk_processes().
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Fix the following warnings when building with glibc>=2.20:
proc.c:1:0: warning: "_GNU_SOURCE" redefined
ioops.c:1:0: warning: "_GNU_SOURCE" redefined
xmalloc.c:8:0: warning: "_GNU_SOURCE" redefined
Signed-off-by: Arch3y <arch3y@archstrike.org>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Add proc_exec function which executes given process with
argv list via fork + execvp.
It allows to replace 'system' call approach which is used
for invoking cpp and securely extend it with additional options
like -D.
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
flowtop and the netsniff-ng's netlink message dissector both need to get
the process name for a pid from /proc/<pid>/exe, thus move that
functionality to an own function.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Move them out of xutils, so that we can maintain them separately.
Also simplify things a bit.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|