raboof / nethogs

Linux 'net top' tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unintelligible units

hramrach opened this issue · comments

What I see in the output is

31837 hramra.. ssh tun0 0.355 7.717 KB/s

what does that mean?

There is no unit prefix known to me corresponding to the symbol K.

In networking and storage B is interchangeably used for bits and bytes giving interpretations that differ in order of magnitude.

The documentation says on this: -v view mode (0 = KB/s, 1 = total KB, 2 = total B, 3 = total MB, 4 = MB/s, 5 = GB/s). default is 0.

Nothing new to be learned there.

I'm pretty sure uppercase 'B' always means 'byte', can you reference any widely accepted convention where this is not the case?

Of course this still leaves the 1024 vs 1000 confusion. https://github.com/raboof/nethogs/blob/main/src/process.cpp#L73-L82 shows in our case it's multiples of 1024. I agree it would be nice to make this less ambiguous. Whoever contributes that improvement gets to choose the way they'd like to approach that.

Where is that specified?

As far as I can tell b and B are used interchangeably, there is no convention to speak of in this area.

I searched around a bit but I only see uppercase-B used to mean 'bytes'. Can you even find one credible source using uppercase B to mean 'bits'?

Credible is not relevant. The fact that people use it that way remains. I do not trust any random tool author to get this right. Consequently, output that relies on B capitalization for interpreting the result is unintelligible.

Can you even find one source using uppercase B to mean 'bits'?

Damn, you got me there!

Anyway, let's keep it friendly - I admit I got a bit frustrated as your "unintelligible", "Nothing new to be learned there.", "Where is that specified?" and "any random tool author" seemed a bit harsh.

You're very welcome to propose any clarification!