<?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: Data normalization for bandwidth from Mbps to Gbps in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Data-normalization-for-bandwidth-from-Mbps-to-Gbps/m-p/189189#M54517</link>
    <description>&lt;P&gt;You can make use of the built-in &lt;CODE&gt;convert memk(field)&lt;/CODE&gt; command &lt;EM&gt;if your kilos are 2^10 rather than 10^3&lt;/EM&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count | eval bw = "6.55 Gbps,5.66 Mbps" | makemv delim="," bw | mvexpand bw | eval bw = replace(bw, " (\w)bps$", "\1") | convert memk(bw) | eval bw = tostring(round(bw/1048576, 2))+" Gbps"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That fiddles with the bandwidth field to make it read "6.55G" and "5.66M" instead of the spaced Gbps, converts to K using power-of-two, converts from K to G, adds back the fancy unit.&lt;/P&gt;</description>
    <pubDate>Fri, 14 Mar 2014 22:45:44 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2014-03-14T22:45:44Z</dc:date>
    <item>
      <title>Data normalization for bandwidth from Mbps to Gbps</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Data-normalization-for-bandwidth-from-Mbps-to-Gbps/m-p/189185#M54513</link>
      <description>&lt;P&gt;I have some logs that list the bandwidth in either Mbps or Gbps. I want to make some reports that show everything as Gbps so I need to normailze the data so Mbps is converted to Gbps. I would like to take the Gbps and perform evals etc.&lt;/P&gt;

&lt;P&gt;Any help would be appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2014 20:51:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Data-normalization-for-bandwidth-from-Mbps-to-Gbps/m-p/189185#M54513</guid>
      <dc:creator>sswansonchtr</dc:creator>
      <dc:date>2014-03-14T20:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Data normalization for bandwidth from Mbps to Gbps</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Data-normalization-for-bandwidth-from-Mbps-to-Gbps/m-p/189186#M54514</link>
      <description>&lt;P&gt;Howz the log look like? means how the field is populated? any sample value?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2014 21:29:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Data-normalization-for-bandwidth-from-Mbps-to-Gbps/m-p/189186#M54514</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2014-03-14T21:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: Data normalization for bandwidth from Mbps to Gbps</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Data-normalization-for-bandwidth-from-Mbps-to-Gbps/m-p/189187#M54515</link>
      <description>&lt;P&gt;Here is an example:&lt;/P&gt;

&lt;P&gt;"6.55 Mbps/7.42 Kpps"&lt;BR /&gt;
or&lt;BR /&gt;
"6.55 Gbps/72.4 Kpps"&lt;/P&gt;

&lt;P&gt;They are extracted in the same field. Just need to be converted to similar types of data.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2014 21:38:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Data-normalization-for-bandwidth-from-Mbps-to-Gbps/m-p/189187#M54515</guid>
      <dc:creator>sswansonchtr</dc:creator>
      <dc:date>2014-03-14T21:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: Data normalization for bandwidth from Mbps to Gbps</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Data-normalization-for-bandwidth-from-Mbps-to-Gbps/m-p/189188#M54516</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
Assuming you have your values are coming as mention in the field say "a" the search would go like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=x  |eval b=if(like(a,"%Gb%"),1,0)|eval c=split(a," ")|eval d=mvindex(c,0)|eval d1=mvindex(c,1)|eval d1=replace(d1,"M","G")|eval d2=mvindex(c,2)|eval d=d/1000|eval d=d." ".d1." ".d2|eval a=if(b==0,d,a)|table a
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2014 22:41:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Data-normalization-for-bandwidth-from-Mbps-to-Gbps/m-p/189188#M54516</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2014-03-14T22:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Data normalization for bandwidth from Mbps to Gbps</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Data-normalization-for-bandwidth-from-Mbps-to-Gbps/m-p/189189#M54517</link>
      <description>&lt;P&gt;You can make use of the built-in &lt;CODE&gt;convert memk(field)&lt;/CODE&gt; command &lt;EM&gt;if your kilos are 2^10 rather than 10^3&lt;/EM&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count | eval bw = "6.55 Gbps,5.66 Mbps" | makemv delim="," bw | mvexpand bw | eval bw = replace(bw, " (\w)bps$", "\1") | convert memk(bw) | eval bw = tostring(round(bw/1048576, 2))+" Gbps"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That fiddles with the bandwidth field to make it read "6.55G" and "5.66M" instead of the spaced Gbps, converts to K using power-of-two, converts from K to G, adds back the fancy unit.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2014 22:45:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Data-normalization-for-bandwidth-from-Mbps-to-Gbps/m-p/189189#M54517</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-03-14T22:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: Data normalization for bandwidth from Mbps to Gbps</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Data-normalization-for-bandwidth-from-Mbps-to-Gbps/m-p/189190#M54518</link>
      <description>&lt;P&gt;The above solutions appear to work but I actually did it in the props.conf as a new field:&lt;/P&gt;

&lt;P&gt;EVAL-bandwidth_mbps = case(substr(bandwidth,len(bandwidth)-3,4)="Gbps",tonumber(substr(bandwidth,1,len(bandwidth)-5))*1000,substr(bandwidth,len(bandwidth)-3,4)="Mbps",tonumber(substr(bandwidth,1,len(bandwidth)-5)))&lt;/P&gt;

&lt;P&gt;EVAL-pps_kpps = case(substr(pps,len(pps)-3,4)="Kpps",tonumber(substr(pps,1,len(pps)-5)),substr(pps,len(pps)-2,3)="pps",tonumber(substr(pps,1,len(pps)-4)))&lt;/P&gt;

&lt;P&gt;This was better for my application.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2014 16:51:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Data-normalization-for-bandwidth-from-Mbps-to-Gbps/m-p/189190#M54518</guid>
      <dc:creator>sswansonchtr</dc:creator>
      <dc:date>2014-07-25T16:51:37Z</dc:date>
    </item>
  </channel>
</rss>

