aboutsummaryrefslogtreecommitdiffstats
path: root/src/firemon/netstats.c
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@protonmail.com>2022-04-29 09:31:04 -0400
committerLibravatar netblue30 <netblue30@protonmail.com>2022-04-29 09:31:04 -0400
commit54baf62b58d71b79a5c2c103cf729ffb56a6a1cf (patch)
treea28caaeae5a47952c1b1c0b5e78dc58fb56571c0 /src/firemon/netstats.c
parentremove inode warning from fcopy - long list of warnings for /etc/alternatives... (diff)
downloadfirejail-54baf62b58d71b79a5c2c103cf729ffb56a6a1cf.tar.gz
firejail-54baf62b58d71b79a5c2c103cf729ffb56a6a1cf.tar.zst
firejail-54baf62b58d71b79a5c2c103cf729ffb56a6a1cf.zip
fix firemon, speed-up
Diffstat (limited to 'src/firemon/netstats.c')
-rw-r--r--src/firemon/netstats.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/firemon/netstats.c b/src/firemon/netstats.c
index 0a1b7e0c4..7d86ca45e 100644
--- a/src/firemon/netstats.c
+++ b/src/firemon/netstats.c
@@ -47,7 +47,7 @@ static char *get_user_name(uid_t uid) {
47 47
48static char *get_header(void) { 48static char *get_header(void) {
49 char *rv; 49 char *rv;
50 if (asprintf(&rv, "%-5.5s %-9.9s %-10.10s %-10.10s %s", 50 if (asprintf(&rv, "%-7.7s %-9.9s %-10.10s %-10.10s %s",
51 "PID", "User", "RX(KB/s)", "TX(KB/s)", "Command") == -1) 51 "PID", "User", "RX(KB/s)", "TX(KB/s)", "Command") == -1)
52 errExit("asprintf"); 52 errExit("asprintf");
53 53
@@ -183,7 +183,7 @@ static void print_proc(int index, int itv, int col) {
183 sprintf(ptrtx, "%.03f", tx_kbps); 183 sprintf(ptrtx, "%.03f", tx_kbps);
184 184
185 char buf[1024 + 1]; 185 char buf[1024 + 1];
186 snprintf(buf, 1024, "%-5.5s %-9.9s %-10.10s %-10.10s %s", 186 snprintf(buf, 1024, "%-7.7s %-9.9s %-10.10s %-10.10s %s",
187 pidstr, ptruser, ptrrx, ptrtx, ptrcmd); 187 pidstr, ptruser, ptrrx, ptrtx, ptrcmd);
188 if (col < 1024) 188 if (col < 1024)
189 buf[col] = '\0'; 189 buf[col] = '\0';