Dashboards & Visualizations

Why doesn't the kb and tcp_KBps numbers line up?

briancronrath
Contributor

I'm reading through https://docs.splunk.com/Documentation/Splunk/7.0.1/Troubleshooting/Aboutmetricslog trying to put together some analysis of forwarders in a timechart. I'm noticing that the tcp_KBps numbers are always higher than I would expect them to be. Shouldn't they essentially just be kb/60, if my bucket were 1 minute for instance?

Take the following two timecharts:

index=_internal sourcetype=splunkd host=*hf* group=tcpin_connections hostname=*  | timechart span=1m sum(tcp_KBps) as "KBps" by host limit=50

index=_internal sourcetype=splunkd host=*hf* group=tcpin_connections hostname=*  | timechart span=1m sum(kb) as "KB" by host limit=50

Shouldn't I expect in this case that the bottom results should be essentially 60x per host per bucket compared to the top? That's not what I'm seeing. I see them follow the same trends however the numbers do not add up. For instance I will see a kb value of 676,000 and a kbps of 27,500 for the same host on the same minutely time bucket. Shouldn't the kbps be around 11,266? What am I missing here?

0 Karma

smichalski
Explorer

Sorry guys for bringing this old topic up, but as the main question remained kinda unexplained, I'd be glad to see it finally clarified. I've to deal with the same confusion about the values and it drives me crazy, as it makes thruput troubeshooting really annoying. I've got a Splunk 7.3.3 in front of me running for several hours with Metric events that are gathered within a 60s time interval:

[...] kb=95143.5849609375, _tcp_Bps=2064499.2670550928, _tcp_KBps=2016.112565483489, _tcp_avg_thruput=2016.112565483489, _tcp_Kprocessed=95143.5849609375, _tcp_eps=2806.537391302746 [...]

Latest docs (currently 8.01) still say what brian has quoted above:
https://docs.splunk.com/Documentation/Splunk/latest/Troubleshooting/Aboutmetricslog#Tcpout_Connectio...

But no matter how I try to align _tcp_KBps and kb (bits or bytes), they don't fit:
(95143 / 8 bit) / 60 sec ~ 198
95143 / 60 sec ~ 1586, which is still far away from the 2016
Funny to mention: _tcp_avg_thruput is identical to _tcp_KBps in my example, but should be measured in bytes(!) according to the documentation.

Any idea, why these values don't line up and which one to trust?

0 Karma

micahkemp
Champion

I think you have a units mismatch. Kbps is kilo-bits per second. kb is kilobytes (with no rate).

0 Karma

mayurr98
Super Champion

By the way,actually it is opposite, KBps is kilo-bytes and kb is kilo-bit.

0 Karma

micahkemp
Champion

I certainly would have expected B=bytes, b=bits, but the paste from the docs suggests otherwise.

0 Karma

briancronrath
Contributor

Are you sure about that? From the doc:

_tcp_Bps is the bytes transmitted during the metrics interval divided by the duration of the interval (in seconds)
_tcp_KBps is the same value divided by 1024
_tcp_avg_thruput is an average rate of bytes sent since the last time the tcp output processor was reinitialized/reconfigured. Typically this means an average since Splunk started.
_tcp_KProcessed is the total number of bytes written since the processor was reinitialized/reconfigured, divided by 1024.
_tcp_eps is the number of items transmitted during the interval divided by the direction of the interval (in seconds). Note that items will frequently not be events for universal/light forwarders (instead, data chunks)
kb is the bytes transmitted during the metrics interval divided by 1024.

0 Karma

micahkemp
Champion

You're right, according to that _tcp_KBps is indeed kilobytes per second.

0 Karma

micahkemp
Champion

Is it possible that the metrics intervals don't line up? Maybe there is only one kb value every 10 minutes, but kbps every minute?

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...