Closed stargieg closed 6 months ago
The $warn_factor in line 960 is only for the new reported interface speed. I have tested it with and without -B.
my $warn_factor = (defined($o_meg)) ? 1000000 : (defined($o_gig)) ? 1000000000 : 1000;
Unfortunately I still don't see it: meg and gig are set, then immediately the default assumption is k. Where is b?
Don't understand. "-B, --kbits" Make the warning and critical levels in K|M|G Bits/s instead of K|M|G Bytes/s There is no option for bit. The default is K. The performance output at line 1066 is in bit.
When I first took a quick look at it, it seemed strange to me. When testing, as you wrote, I couldn't find any significant difference.
Thanks for the pr, it's merged.
If I interpret line 960 correctly, there are only G, M and K in the units. This means there is no backwards compatibility with the current B. So everyone who previously used bps and updated the check would get undesirable results. This case should be avoided, please correct accordingly.