<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Easy way to convert bits into bytes and kb in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Easy-way-to-convert-bits-into-bytes-and-kb/m-p/74100#M181180</link>
    <description>&lt;P&gt;Your App is not visible in Splunkbase.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Mar 2016 17:10:52 GMT</pubDate>
    <dc:creator>kenoski</dc:creator>
    <dc:date>2016-03-28T17:10:52Z</dc:date>
    <item>
      <title>Easy way to convert bits into bytes and kb</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Easy-way-to-convert-bits-into-bytes-and-kb/m-p/74096#M181176</link>
      <description>&lt;P&gt;one of the values in my log is sent and received I believe it's bytes. I would like to display those as Kb and Mb. Using commas would also be great. Is there any easy way to tell splunk to do this? &lt;/P&gt;

&lt;P&gt;here is my sample log:&lt;/P&gt;

&lt;P&gt;Jun 24 16:22:55 10.0.59.59 id=firewall sn=0017C569F354 time="2013-06-24 16:22:55" fw=10.0.59.59 pri=6 c=1024 m=537 msg="Connection Closed" app=49176 sess=Web n=3641361 usr="admin" src=10.103.62.80:32826:X1 dst=10.0.59.59:80:X1 proto=tcp/http sent=716 rcvd=472 &lt;/P&gt;

&lt;P&gt;near the end you see: sent=716 and rcvd=472. I would like to display those like&lt;/P&gt;

&lt;P&gt;Sent: 716 bytes&lt;BR /&gt;
Received: 472 bytes&lt;BR /&gt;
If they were larger like this log &lt;/P&gt;

&lt;P&gt;Jun 24 16:22:53 10.0.59.59 id=firewall sn=0017C569F354 time="2013-06-24 16:22:53" fw=10.0.59.59 pri=6 c=1024 m=537 msg="Connection Closed" app=49176 sess=Web n=3641359 usr="admin" src=10.103.62.80:32825:X1 dst=10.0.59.59:80:X1 proto=tcp/http sent=791 rcvd=3742  &lt;/P&gt;

&lt;P&gt;then it would be:&lt;BR /&gt;
sent: 791 bytes&lt;BR /&gt;
received: 3.6 Kb&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2013 23:26:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Easy-way-to-convert-bits-into-bytes-and-kb/m-p/74096#M181176</guid>
      <dc:creator>jalfrey</dc:creator>
      <dc:date>2013-06-24T23:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Easy way to convert bits into bytes and kb</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Easy-way-to-convert-bits-into-bytes-and-kb/m-p/74097#M181177</link>
      <description>&lt;P&gt;in order to have commas:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;fieldformat AVG=tostring(AVG,"commas") 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;in order to be showing Kb or bytes or any other you will need to play with eval and case to have your condition sentences. It all should work nice and pretty&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2013 00:33:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Easy-way-to-convert-bits-into-bytes-and-kb/m-p/74097#M181177</guid>
      <dc:creator>asimagu</dc:creator>
      <dc:date>2013-06-25T00:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Easy way to convert bits into bytes and kb</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Easy-way-to-convert-bits-into-bytes-and-kb/m-p/74098#M181178</link>
      <description>&lt;P&gt;One way to do it is with the eval command.&lt;/P&gt;

&lt;P&gt;...|eval kb_rcvd=(rcvd/1024)&lt;/P&gt;

&lt;P&gt;However, this would not scale with MB, etc. If the values are usally in the bytes/KB it might be worth a shot.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2013 00:36:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Easy-way-to-convert-bits-into-bytes-and-kb/m-p/74098#M181178</guid>
      <dc:creator>adrianathome</dc:creator>
      <dc:date>2013-06-25T00:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Easy way to convert bits into bytes and kb</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Easy-way-to-convert-bits-into-bytes-and-kb/m-p/74099#M181179</link>
      <description>&lt;P&gt;I wrote a Splunk app, "Humanize", to help with this situation: &lt;A href="https://splunkbase.splunk.com/app/3104/"&gt;https://splunkbase.splunk.com/app/3104/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;My app will convert a number in bytes to a human-friendly representation - KB, MB, GB, etc.&lt;/P&gt;

&lt;P&gt;Please let me know if you have any feedback so I can improve the app!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2016 13:57:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Easy-way-to-convert-bits-into-bytes-and-kb/m-p/74099#M181179</guid>
      <dc:creator>northben</dc:creator>
      <dc:date>2016-03-28T13:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Easy way to convert bits into bytes and kb</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Easy-way-to-convert-bits-into-bytes-and-kb/m-p/74100#M181180</link>
      <description>&lt;P&gt;Your App is not visible in Splunkbase.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2016 17:10:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Easy-way-to-convert-bits-into-bytes-and-kb/m-p/74100#M181180</guid>
      <dc:creator>kenoski</dc:creator>
      <dc:date>2016-03-28T17:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: Easy way to convert bits into bytes and kb</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Easy-way-to-convert-bits-into-bytes-and-kb/m-p/74101#M181181</link>
      <description>&lt;P&gt;I would use something like - eval bytes = round(bytes/1024/1024,2) | rename bytes as "total(MB)". For something like this, we can use a search macro - &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0.4/Search/Usesearchmacros"&gt;http://docs.splunk.com/Documentation/Splunk/6.0.4/Search/Usesearchmacros&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2016 18:30:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Easy-way-to-convert-bits-into-bytes-and-kb/m-p/74101#M181181</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2016-03-28T18:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Easy way to convert bits into bytes and kb</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Easy-way-to-convert-bits-into-bytes-and-kb/m-p/74102#M181182</link>
      <description>&lt;P&gt;Ahh, thanks for letting me know. I emailed support and they just released it. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 04:51:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Easy-way-to-convert-bits-into-bytes-and-kb/m-p/74102#M181182</guid>
      <dc:creator>northben</dc:creator>
      <dc:date>2016-03-29T04:51:40Z</dc:date>
    </item>
  </channel>
</rss>

