<?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 convert bytes to megabytes for use in my timechart search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-bytes-to-megabytes-for-use-in-my-timechart-search/m-p/119513#M32076</link>
    <description>&lt;P&gt;works... thanks..&lt;/P&gt;</description>
    <pubDate>Tue, 31 Mar 2015 18:05:58 GMT</pubDate>
    <dc:creator>sundaresh83</dc:creator>
    <dc:date>2015-03-31T18:05:58Z</dc:date>
    <item>
      <title>How to convert bytes to megabytes for use in my timechart search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-bytes-to-megabytes-for-use-in-my-timechart-search/m-p/119508#M32071</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am writing a search: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;timechart span=1h sum(Bytes) AS "MBytes "
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In the same search, I want it to return Mb instead of bytes ie. bytes/1000000.&lt;BR /&gt;
So I tried: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;stats sum(eval in_mB =Bytes/1000000) as "MBytes" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But just &lt;CODE&gt;eval in_mB =Bytes/1000000&lt;/CODE&gt; works. Can I store this as a column for future use instead of rewriting it? How do I do it? &lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 17:15:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-bytes-to-megabytes-for-use-in-my-timechart-search/m-p/119508#M32071</guid>
      <dc:creator>sundaresh83</dc:creator>
      <dc:date>2015-03-31T17:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert bytes to megabytes for use in my timechart search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-bytes-to-megabytes-for-use-in-my-timechart-search/m-p/119509#M32072</link>
      <description>&lt;P&gt;Hi sundaresh83&lt;/P&gt;

&lt;P&gt;What if you just do the eval conversion separately before the timechart?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(your base search) | eval in_mB=Bytes/1000000 | timechart span=1h sum(in_mB) as "MBytes"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 Mar 2015 17:35:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-bytes-to-megabytes-for-use-in-my-timechart-search/m-p/119509#M32072</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2015-03-31T17:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert bytes to megabytes for use in my timechart search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-bytes-to-megabytes-for-use-in-my-timechart-search/m-p/119510#M32073</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Try with:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | eval megabytes=((bytes/1024)/1024) | timechart sum(megabytes)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 Mar 2015 17:38:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-bytes-to-megabytes-for-use-in-my-timechart-search/m-p/119510#M32073</guid>
      <dc:creator>Patient</dc:creator>
      <dc:date>2015-03-31T17:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert bytes to megabytes for use in my timechart search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-bytes-to-megabytes-for-use-in-my-timechart-search/m-p/119511#M32074</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/188962"&gt;@ppablo&lt;/a&gt;_splunk &lt;BR /&gt;
This will work, but I do now want it to return the "in_mB value and the sum value. &lt;BR /&gt;
I want my query to return only the sum value in MB. &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:22:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-bytes-to-megabytes-for-use-in-my-timechart-search/m-p/119511#M32074</guid>
      <dc:creator>sundaresh83</dc:creator>
      <dc:date>2020-09-28T19:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert bytes to megabytes for use in my timechart search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-bytes-to-megabytes-for-use-in-my-timechart-search/m-p/119512#M32075</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;

&lt;P&gt;have you tried with the above search query?&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 17:47:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-bytes-to-megabytes-for-use-in-my-timechart-search/m-p/119512#M32075</guid>
      <dc:creator>Patient</dc:creator>
      <dc:date>2015-03-31T17:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert bytes to megabytes for use in my timechart search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-bytes-to-megabytes-for-use-in-my-timechart-search/m-p/119513#M32076</link>
      <description>&lt;P&gt;works... thanks..&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 18:05:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-bytes-to-megabytes-for-use-in-my-timechart-search/m-p/119513#M32076</guid>
      <dc:creator>sundaresh83</dc:creator>
      <dc:date>2015-03-31T18:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert bytes to megabytes for use in my timechart search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-bytes-to-megabytes-for-use-in-my-timechart-search/m-p/119514#M32077</link>
      <description>&lt;P&gt;works... thanks...&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 18:06:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-bytes-to-megabytes-for-use-in-my-timechart-search/m-p/119514#M32077</guid>
      <dc:creator>sundaresh83</dc:creator>
      <dc:date>2015-03-31T18:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert bytes to megabytes for use in my timechart search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-bytes-to-megabytes-for-use-in-my-timechart-search/m-p/119515#M32078</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;
Note that 1Mb=1024*1024 Bytes&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 18:09:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-bytes-to-megabytes-for-use-in-my-timechart-search/m-p/119515#M32078</guid>
      <dc:creator>Patient</dc:creator>
      <dc:date>2015-03-31T18:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert bytes to megabytes for use in my timechart search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-bytes-to-megabytes-for-use-in-my-timechart-search/m-p/119516#M32079</link>
      <description>&lt;P&gt;Thank you for your vote!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 18:11:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-bytes-to-megabytes-for-use-in-my-timechart-search/m-p/119516#M32079</guid>
      <dc:creator>Patient</dc:creator>
      <dc:date>2015-03-31T18:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert bytes to megabytes for use in my timechart search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-bytes-to-megabytes-for-use-in-my-timechart-search/m-p/119517#M32080</link>
      <description>&lt;P&gt;yup, @Patient's calculation below will be more accurate&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 18:16:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-bytes-to-megabytes-for-use-in-my-timechart-search/m-p/119517#M32080</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2015-03-31T18:16:18Z</dc:date>
    </item>
  </channel>
</rss>

