spark

spark

26M Downloads

healthreport --network returns "1,0 bytes/s / 0 pps (lo rx)"

velnias75 opened this issue · 13 comments

commented

It seems that healthreport --network doesn't work as it should do:

> TPS from last 5s, 10s, 1m, 5m, 15m:
    16.25, 17.93, 19.62, 19.92, 19.76

> Tick durations (min/med/95%ile/max ms) from last 10s, 1m:
    4,1/4,4/7,0/85,0; 4,1/4,4/5,3/85,0

> CPU usage from last 10s, 1m, 15m:
    15%, 10%, 12%  (system)
    15%, 10%, 12%  (process)

> Memory usage:
    803,1 MB / 1,4 GB   (55%)
    [┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃╻╻╻╻╻╻╻╻╻╻╻╻╻╻╻╻╻╻╻╻╻╻╻╻╻╻╻]

> Network usage: (system, last 15m)
    1,0 bytes/s / 0 pps (lo rx)
    1,0 bytes/s / 0 pps (lo tx)

> Disk usage:
    136,4 GB / 165,3 GB   (82%)
    [┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃╻╻╻╻╻╻╻╻╻╻╻]

It always stays at 1,0 bytes/s / 0 pps or 0 KB/s / 0 pps

Here is an example of my cat /proc/dev:

Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
    lo: 2920616    3000    0    0    0     0          0         0  2920616    3000    0    0    0     0       0          0
enp2s0: 48367676  160158    0 4886    0     0          0       162 64374816  177433    3    0    0     0       0          0

My system:

uname -a:
Linux yasmina 5.13.0-39-generic #44~20.04.1-Ubuntu SMP Thu Mar 24 16:43:35 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -a:

Distributor ID: Ubuntu
Description:    Ubuntu 20.04.4 LTS
Release:        20.04
Codename:       focal
commented

I tested/debugged locally - it seems to be parsing ok:
Screenshot 2022-04-20 at 20 26 15

commented

Oh, I know why!

commented

Please could you give that a try :)

commented

Looks more realistic now :-)

> Network usage: (system, last 15m)
    2.0 bytes/s / 0 pps (lo rx)
    2.0 bytes/s / 0 pps (lo tx)
    7.0 KB/s / 34 pps (enp2s0 rx)
    25.9 KB/s / 45 pps (enp2s0 tx)

One other minor thing: could it be possible to show the network stats only if explicitely called with --network, esp. if a player calls it (client)?

commented

That should fix it :)

lemme know if it works!

> Network usage: (system, last 15m)
    4.0 bytes/s / 0 pps (lo rx)
    4.0 bytes/s / 0 pps (lo tx)

looks a bit less, but I don't know how much bandwidth Minecraft actually uses :-O

But you'r right, I forgot to mention my locale.

commented

That should fix it :)

lemme know if it works!

commented

This RegEx would catch up my cat /proc/net/dev: (Tested with Qt's Regex)

^\s*([a-z\d]+):\s(\d+)\s+(\d+)\s+(\d+\s+){6,6}(\d+)\s+(\d+)\s+(\d+\s*){6,6}$

With

  • Group \1: interface name
  • Group \2: bytes (rx)
  • Group \3: packets (rx)
  • Group \5: bytes (tx)
  • Group \6: packets (tx)
commented

Hmm the current one seems to work?

https://regex101.com/r/GSdfd3/1

commented

Hmm the current one seems to work?

https://regex101.com/r/GSdfd3/1

Regarding Regexes: There are many roads leading to Rome :-D

But 4 to 11 byres/s seems to be a bit low?

commented

Could you save the exact output of /proc/net/dev to a file and upload it here? (ideally preserving any newlines / line endings) :D

commented

Could you save the exact output of /proc/net/dev to a file and upload it here? (ideally preserving any newlines / line endings) :D

Ok, but pls give me a few minutes.
Currently the server is getting a kernel upgrade. After starting the server and playing a few minutes I'll provide you one

commented
commented

Hmm I'll have a think :)

closing as the issue is resolved.