aboutsummaryrefslogtreecommitdiffstats
path: root/src/firemon/netstats.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/firemon/netstats.c')
-rw-r--r--src/firemon/netstats.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/firemon/netstats.c b/src/firemon/netstats.c
index 89e4202bd..534d783cb 100644
--- a/src/firemon/netstats.c
+++ b/src/firemon/netstats.c
@@ -26,6 +26,10 @@
26 26
27#define MAXBUF 4096 27#define MAXBUF 4096
28 28
29// ip -s link: device stats
30// ss -s: socket stats
31
32
29static char *get_header(void) { 33static char *get_header(void) {
30 char *rv; 34 char *rv;
31 if (asprintf(&rv, "%-5.5s %-9.9s %-10.10s %-10.10s %s", 35 if (asprintf(&rv, "%-5.5s %-9.9s %-10.10s %-10.10s %s",
@@ -166,9 +170,6 @@ static void print_proc(int index, int itv, int col) {
166} 170}
167 171
168void netstats(void) { 172void netstats(void) {
169 if (getuid() == 0)
170 firemon_drop_privs();
171
172 pid_read(0); // include all processes 173 pid_read(0); // include all processes
173 174
174 printf("Displaying network statistics only for sandboxes using a new network namespace.\n"); 175 printf("Displaying network statistics only for sandboxes using a new network namespace.\n");
@@ -215,6 +216,9 @@ void netstats(void) {
215 print_proc(i, itv, col); 216 print_proc(i, itv, col);
216 } 217 }
217 } 218 }
219#ifdef HAVE_GCOV
220 __gcov_flush();
221#endif
218 } 222 }
219} 223}
220 224