<?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: Why am I unable to run dbinspect from cli for calculating compression? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-unable-to-run-dbinspect-from-cli-for-calculating/m-p/111874#M183696</link>
    <description>&lt;P&gt;It worked!  Thanks.&lt;/P&gt;</description>
    <pubDate>Wed, 23 Oct 2013 23:49:40 GMT</pubDate>
    <dc:creator>the_wolverine</dc:creator>
    <dc:date>2013-10-23T23:49:40Z</dc:date>
    <item>
      <title>Why am I unable to run dbinspect from cli for calculating compression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-unable-to-run-dbinspect-from-cli-for-calculating/m-p/111872#M183694</link>
      <description>&lt;P&gt;I'd like to run the following search on my indexer to calculate compression.  It works in UI, but not in CLI.  I have disabled splunkweb on my indexers (as we use a separate search head pool) so I'd like to be able to run it from CLI:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dbinspect index=_internal
| fields state,id,rawSize,sizeOnDiskMB 
| stats sum(rawSize) AS rawTotal, sum(sizeOnDiskMB) AS diskTotalinMB
| eval rawTotalinMB=(rawTotal / 1024 / 1024) | fields - rawTotal
| eval compression=tostring(round(diskTotalinMB / rawTotalinMB * 100, 2)) + "%"
| table rawTotalinMB, diskTotalinMB, compression
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Oct 2013 17:06:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-unable-to-run-dbinspect-from-cli-for-calculating/m-p/111872#M183694</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2013-10-23T17:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I unable to run dbinspect from cli for calculating compression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-unable-to-run-dbinspect-from-cli-for-calculating/m-p/111873#M183695</link>
      <description>&lt;P&gt;This is the exact syntax I used from the command line:&lt;/P&gt;

&lt;PRE&gt;
/opt/splunk/bin/splunk search '| dbinspect index=_internal
| fields state,id,rawSize,sizeOnDiskMB 
| stats sum(rawSize) AS rawTotal, sum(sizeOnDiskMB) AS diskTotalinMB
| eval rawTotalinMB=(rawTotal / 1024 / 1024) | fields - rawTotal
| eval compression=tostring(round(diskTotalinMB / rawTotalinMB * 100, 2)) + "%"
| table rawTotalinMB, diskTotalinMB, compression' -preview f
&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Oct 2013 20:10:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-unable-to-run-dbinspect-from-cli-for-calculating/m-p/111873#M183695</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2013-10-23T20:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I unable to run dbinspect from cli for calculating compression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-unable-to-run-dbinspect-from-cli-for-calculating/m-p/111874#M183696</link>
      <description>&lt;P&gt;It worked!  Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2013 23:49:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-unable-to-run-dbinspect-from-cli-for-calculating/m-p/111874#M183696</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2013-10-23T23:49:40Z</dc:date>
    </item>
  </channel>
</rss>

