<?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 Command to get the log size in bytes if there is not field called bytes in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Command-to-get-the-log-size-in-bytes-if-there-is-not-field/m-p/382666#M6370</link>
    <description>&lt;P&gt;Hi all.&lt;BR /&gt;
What search command do I have to use to get the file size in bytes if there is no field called bytes?&lt;BR /&gt;
Can anyone help me with this?&lt;/P&gt;

&lt;P&gt;Thank you very much&lt;/P&gt;</description>
    <pubDate>Thu, 02 Aug 2018 03:03:32 GMT</pubDate>
    <dc:creator>suhanrs</dc:creator>
    <dc:date>2018-08-02T03:03:32Z</dc:date>
    <item>
      <title>Command to get the log size in bytes if there is not field called bytes</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Command-to-get-the-log-size-in-bytes-if-there-is-not-field/m-p/382666#M6370</link>
      <description>&lt;P&gt;Hi all.&lt;BR /&gt;
What search command do I have to use to get the file size in bytes if there is no field called bytes?&lt;BR /&gt;
Can anyone help me with this?&lt;/P&gt;

&lt;P&gt;Thank you very much&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 03:03:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Command-to-get-the-log-size-in-bytes-if-there-is-not-field/m-p/382666#M6370</guid>
      <dc:creator>suhanrs</dc:creator>
      <dc:date>2018-08-02T03:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Command to get the log size in bytes if there is not field called bytes</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Command-to-get-the-log-size-in-bytes-if-there-is-not-field/m-p/382667#M6371</link>
      <description>&lt;P&gt;What sourcetype are you talking about?&lt;BR /&gt;
Do you have any size field?  If so, use &lt;CODE&gt;eval&lt;/CODE&gt; to convert the value in that field to bytes.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 12:46:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Command-to-get-the-log-size-in-bytes-if-there-is-not-field/m-p/382667#M6371</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2018-08-02T12:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: Command to get the log size in bytes if there is not field called bytes</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Command-to-get-the-log-size-in-bytes-if-there-is-not-field/m-p/382668#M6372</link>
      <description>&lt;P&gt;If you are monitoring a file, something like this might work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;YOUR BASE SEARCH&amp;gt;
    | eval bytes=length(_raw) 
    | stats sum(bytes) by source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Since an ASCII character is 1 byte, and _raw represents an event, you can calculate per event, then sum by source, which should be representative of the log file the data came from.  This is dependent upon the assumption that the entire file has been ingested.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 20:42:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Command-to-get-the-log-size-in-bytes-if-there-is-not-field/m-p/382668#M6372</guid>
      <dc:creator>kmorris_splunk</dc:creator>
      <dc:date>2018-08-02T20:42:35Z</dc:date>
    </item>
  </channel>
</rss>

