<?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: How to calculate  Total Bandwidth Usage using bytes,bytes_in and bytes_out in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-Total-Bandwidth-Usage-using-bytes-bytes-in-and/m-p/459332#M129667</link>
    <description>&lt;P&gt;You may want to use stats instead of Top as it does other logic. I did something a little different:&lt;/P&gt;

&lt;P&gt;search&lt;BR /&gt;
| eval MB=(BYTES/1024)&lt;BR /&gt;
| eval GB=(MB/1024)&lt;BR /&gt;
| stats sum(GB) by host&lt;/P&gt;</description>
    <pubDate>Wed, 15 May 2019 13:47:49 GMT</pubDate>
    <dc:creator>jodyfsu</dc:creator>
    <dc:date>2019-05-15T13:47:49Z</dc:date>
    <item>
      <title>How to calculate  Total Bandwidth Usage using bytes,bytes_in and bytes_out</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-Total-Bandwidth-Usage-using-bytes-bytes-in-and/m-p/459331#M129666</link>
      <description>&lt;P&gt;my proxy is capturing three fields such as bytes,bytes_in and bytes_out out of which in need to calculate total bandwidth utilization for onemonth. I have framed the below query&lt;BR /&gt;
 index=Proxy site="XXX"|eval BW= ((bytes_in+bytes_out)/1024)/1024 &lt;BR /&gt;
where I am adding both indound and outbound data and then converting it into Megabytes and after that the values are displaying as below&lt;BR /&gt;
Top 10 Values   Count   %&lt;BR /&gt;&lt;BR /&gt;
0.06401729583740234 710 1.86%&lt;BR /&gt;&lt;BR /&gt;
0.0640115737915039  533 1.396%&lt;BR /&gt;&lt;BR /&gt;
0.06404876708984375 493 1.292%&lt;BR /&gt;&lt;BR /&gt;
0.06402873992919922 475 1.244%&lt;BR /&gt;&lt;BR /&gt;
0.06401443481445312 428 1.121%&lt;BR /&gt;&lt;BR /&gt;
0.38465213775634766 390 1.022%&lt;BR /&gt;&lt;BR /&gt;
0.06403446197509766 345 0.904%&lt;BR /&gt;
 But I need it to be displayed in numeric values only and it should be MB's or GB's and it should also give me overall bandwidth for onemonth&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:34:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-Total-Bandwidth-Usage-using-bytes-bytes-in-and/m-p/459331#M129666</guid>
      <dc:creator>vellas78</dc:creator>
      <dc:date>2020-09-30T00:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate  Total Bandwidth Usage using bytes,bytes_in and bytes_out</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-Total-Bandwidth-Usage-using-bytes-bytes-in-and/m-p/459332#M129667</link>
      <description>&lt;P&gt;You may want to use stats instead of Top as it does other logic. I did something a little different:&lt;/P&gt;

&lt;P&gt;search&lt;BR /&gt;
| eval MB=(BYTES/1024)&lt;BR /&gt;
| eval GB=(MB/1024)&lt;BR /&gt;
| stats sum(GB) by host&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 13:47:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-Total-Bandwidth-Usage-using-bytes-bytes-in-and/m-p/459332#M129667</guid>
      <dc:creator>jodyfsu</dc:creator>
      <dc:date>2019-05-15T13:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate  Total Bandwidth Usage using bytes,bytes_in and bytes_out</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-Total-Bandwidth-Usage-using-bytes-bytes-in-and/m-p/459333#M129668</link>
      <description>&lt;P&gt;Hi Jodyfsu,&lt;BR /&gt;
                       Thank you for the search query simplification. since i have 3 fields such as bytes,bytes_in and bytes_out but in the above search it only bytes/1024, does it mean bytes will capture the total data of both incoming and outgoing? secondly the final one stats sum(GB) so i don't want it to group by either user or host i just wanted to get total Banwidth so doing stats sum(GB) will give the over all BandWidth i think. Kindly correct me if I am wrong on any of thing explained above.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:34:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-Total-Bandwidth-Usage-using-bytes-bytes-in-and/m-p/459333#M129668</guid>
      <dc:creator>vellas78</dc:creator>
      <dc:date>2020-09-30T00:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate  Total Bandwidth Usage using bytes,bytes_in and bytes_out</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-Total-Bandwidth-Usage-using-bytes-bytes-in-and/m-p/459334#M129669</link>
      <description>&lt;P&gt;Hey Vellas78, in my logs I only have the bytes so you may need to do the addition for your data.&lt;/P&gt;

&lt;P&gt;| eval MB=((bytes_in+bytes_out)/1024)&lt;BR /&gt;
| stats sum(MB) &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:34:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-Total-Bandwidth-Usage-using-bytes-bytes-in-and/m-p/459334#M129669</guid>
      <dc:creator>jodyfsu</dc:creator>
      <dc:date>2020-09-30T00:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate  Total Bandwidth Usage using bytes,bytes_in and bytes_out</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-Total-Bandwidth-Usage-using-bytes-bytes-in-and/m-p/459335#M129670</link>
      <description>&lt;P&gt;I understood that you are trying to get total bandwidth utilization for 1 month.&lt;BR /&gt;
&lt;STRONG&gt;Query&lt;/STRONG&gt;&lt;BR /&gt;
index=Proxy site="XXX"&lt;BR /&gt;
| eval  IO_bytes= (bytes_in+bytes_out)/1024&lt;BR /&gt;
| eval Bytes=(bytes/1024)&lt;BR /&gt;
| eval Total_bytes= if(IO_bytes=Bytes, Bytes,Total_bytes)&lt;BR /&gt;
| table Bytes Total_bytes&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:34:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-Total-Bandwidth-Usage-using-bytes-bytes-in-and/m-p/459335#M129670</guid>
      <dc:creator>vikramyadav</dc:creator>
      <dc:date>2020-09-30T00:34:39Z</dc:date>
    </item>
  </channel>
</rss>

