<?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 can we find size of events in a particular duration? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267717#M80542</link>
    <description>&lt;P&gt;Your calculation is wrong for mb and onwards. it should be one 1024 less&lt;/P&gt;</description>
    <pubDate>Mon, 27 Aug 2018 09:13:59 GMT</pubDate>
    <dc:creator>agentsofshield</dc:creator>
    <dc:date>2018-08-27T09:13:59Z</dc:date>
    <item>
      <title>How can we find size of events in a particular duration?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267706#M80531</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
we are writing so many logs for application and all of them are indexed in Splunk. is there way to find the size of all events in a particular duration?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 22:49:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267706#M80531</guid>
      <dc:creator>rajgowd1</dc:creator>
      <dc:date>2017-02-01T22:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: How can we find size of events in a particular duration?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267707#M80532</link>
      <description>&lt;P&gt;By "the size of all events" are you asking "how much disk space does it take to index and store those events?"&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 23:00:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267707#M80532</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-02-01T23:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: How can we find size of events in a particular duration?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267708#M80533</link>
      <description>&lt;P&gt;i am looking for size of each event.&lt;/P&gt;

&lt;P&gt;and it would be great,if we can get disk space for indexing.&lt;/P&gt;

&lt;P&gt;and want find how amount of logging into Splunk &lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 23:04:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267708#M80533</guid>
      <dc:creator>rajgowd1</dc:creator>
      <dc:date>2017-02-01T23:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: How can we find size of events in a particular duration?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267709#M80534</link>
      <description>&lt;P&gt;i am trying with this command but its failing&lt;/P&gt;

&lt;P&gt;index=myindex| eval esize=len(_raw)|stats avg(esize) as avg [search index=myindex |stats count as co] | eval size=(avg*co)&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 23:38:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267709#M80534</guid>
      <dc:creator>rajgowd1</dc:creator>
      <dc:date>2017-02-01T23:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: How can we find size of events in a particular duration?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267710#M80535</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;

&lt;P&gt;Please give a try below command&lt;/P&gt;

&lt;P&gt;| rest /services/data/indexes/&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 23:46:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267710#M80535</guid>
      <dc:creator>mpreddy</dc:creator>
      <dc:date>2017-02-01T23:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: How can we find size of events in a particular duration?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267711#M80536</link>
      <description>&lt;P&gt;its not working.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 23:49:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267711#M80536</guid>
      <dc:creator>rajgowd1</dc:creator>
      <dc:date>2017-02-01T23:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: How can we find size of events in a particular duration?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267712#M80537</link>
      <description>&lt;P&gt;i am able to get the size of events in in time duration,i used below search&lt;/P&gt;

&lt;P&gt;index=myindex|eval esize=len(_raw) | stats count as count  avg(esize) as avg  | eval bytes=count*avg | eval kb=bytes/1024 | eval mb=kb/1024 | eval gb=mb/1024 | eval tb=gb/1024 |stats values(kb) as KB | eval KB=round(KB,2)&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 01:06:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267712#M80537</guid>
      <dc:creator>rajgowd1</dc:creator>
      <dc:date>2017-02-02T01:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: How can we find size of events in a particular duration?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267713#M80538</link>
      <description>&lt;P&gt;I would actually clean it up and do like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=whatever 
| fields _raw 
| eval esize=len(_raw) 
| stats count as count avg(esize) as avg 
| eval bytes=count*avg 
| eval kb=bytes/1024 
| eval mb=round(kb/1024/2014,2) 
| eval gb=round(kb/1024/1024/1024,2) 
| eval tb=round(gb/1024/1024/1024/1024,2) 
| stats values(kb) as KB, values(mb) AS MB, values(gb) AS GB, values(tb) AS TB
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I added the ignore all fields except _raw to speed up the search&lt;BR /&gt;
and i added the rounding for you&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2017 17:34:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267713#M80538</guid>
      <dc:creator>mattlucas719</dc:creator>
      <dc:date>2017-07-24T17:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: How can we find size of events in a particular duration?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267714#M80539</link>
      <description>&lt;P&gt;@mattlucas I think you have a typo in your eval mb line&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;| eval mb=round(kb/1024/&lt;STRONG&gt;2014&lt;/STRONG&gt;,2)&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;should be &lt;/P&gt;

&lt;P&gt;| eval mb=round(kb/1024/&lt;STRONG&gt;1024&lt;/STRONG&gt;,2) &lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 19:20:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267714#M80539</guid>
      <dc:creator>rmerrit</dc:creator>
      <dc:date>2018-07-16T19:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: How can we find size of events in a particular duration?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267715#M80540</link>
      <description>&lt;P&gt;@mattlucas719&lt;/P&gt;

&lt;P&gt;I think you have a typo in your eval mb line&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;| eval mb=round(kb/1024/&lt;STRONG&gt;2014&lt;/STRONG&gt;,2)&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Should be &lt;/P&gt;

&lt;P&gt;| eval mb=round(kb/1024/&lt;STRONG&gt;1024&lt;/STRONG&gt;,2) &lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 19:21:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267715#M80540</guid>
      <dc:creator>rmerrit</dc:creator>
      <dc:date>2018-07-16T19:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: How can we find size of events in a particular duration?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267716#M80541</link>
      <description>&lt;P&gt;Yes, good catch. Typo on my part&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 23:46:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267716#M80541</guid>
      <dc:creator>mattlucas_gps</dc:creator>
      <dc:date>2018-07-16T23:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: How can we find size of events in a particular duration?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267717#M80542</link>
      <description>&lt;P&gt;Your calculation is wrong for mb and onwards. it should be one 1024 less&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2018 09:13:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267717#M80542</guid>
      <dc:creator>agentsofshield</dc:creator>
      <dc:date>2018-08-27T09:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: How can we find size of events in a particular duration?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267718#M80543</link>
      <description>&lt;P&gt;Very simple, by default splunk raw events are in UTF-8 format. This means that each character is 8 bits (one byte).&lt;/P&gt;

&lt;P&gt;So you do this:&lt;/P&gt;

&lt;P&gt;your initial search&lt;BR /&gt;
| eval eventSize = len(_raw)/1024/1024/1024&lt;/P&gt;

&lt;P&gt;the first division by 1024 gives you KiloBytes, the second division MegaBytes and the third GigaBytes and so on&lt;/P&gt;

&lt;P&gt;Dont forget to upvote if you found this useful&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2019 12:38:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267718#M80543</guid>
      <dc:creator>sonny_monti</dc:creator>
      <dc:date>2019-07-10T12:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: How can we find size of events in a particular duration?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267719#M80544</link>
      <description>&lt;P&gt;I think that the eval statements may be off kilter a bit here:&lt;BR /&gt;
shouldn't they be:&lt;BR /&gt;
index=mildw &lt;BR /&gt;
 | fields _raw &lt;BR /&gt;
 | eval esize=len(_raw) &lt;BR /&gt;
 | stats count as count avg(esize) as avg &lt;BR /&gt;
 | eval bytes=count*avg &lt;BR /&gt;
 | eval kb=bytes/1024 &lt;BR /&gt;
 | eval mb=round(kb/1024,2) &lt;BR /&gt;
 | eval gb=round(mb/1024,2) &lt;BR /&gt;
 | eval tb=round(gb/1024,2) &lt;BR /&gt;
 | stats values(kb) as KB, values(mb) AS MB, values(gb) AS GB, values(tb) AS TB&lt;/P&gt;

&lt;P&gt;as the kb is bytes 1024 mb is kb/1024 etc etc... &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:24:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-we-find-size-of-events-in-a-particular-duration/m-p/267719#M80544</guid>
      <dc:creator>xanthakita</dc:creator>
      <dc:date>2020-09-30T01:24:02Z</dc:date>
    </item>
  </channel>
</rss>

