picosnitch icon indicating copy to clipboard operation
picosnitch copied to clipboard

Inaccurate Received Bytes

Open ossie-git opened this issue 4 months ago • 0 comments

Hi,

To test out picosnitch, I installed it and ran the following in a terminal:

wget https://ash-speed.hetzner.com/100MB.bin

After the download completes, the TUI shows a lot less than 100MB. Running the following SQL on snitch.db gave the following:

> SELECT SUM(recv) FROM connections WHERE name = "wget";
+-----------+
| SUM(recv) |
+-----------+
| 1234048   |
+-----------+
1 row in set
Time: 0.007s

So it claims that only 1234048 bytes were downloaded while 100MB were actually downloaded.

I re-ran the test after stopping the service, deleting the files in ~/.config/picosnitch, starting the service and then re-running the command. This time, it gave me the following:

> SELECT SUM(recv) FROM connections WHERE name = "wget";
+-----------+
| SUM(recv) |
+-----------+
| 1210048   |
+-----------+
1 row in set
Time: 0.004s

So again, it doesn't give the real value. Is there a reason for this? I tested this on Rocky 9 (and testing it on Fedora 40 gave similar results). This is using the latest version (installing it using pip for Rocky 9 and using the package manager for Fedora). Also, this is the same behavior for other applications as well, not just wget. Thanks

ossie-git avatar Sep 29 '24 12:09 ossie-git