<?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: manual splunk-optimize in Deployment Architecture</title>
    <link>https://community.splunk.com/t5/Deployment-Architecture/manual-splunk-optimize/m-p/99265#M3659</link>
    <description>&lt;P&gt;&lt;CODE&gt;$SPLUNK_HOME/bin/splunk-optimize -d /h_data/splunk/splunk/var/lib/splunk/idx_3/db/&amp;lt;your bucket with many tsidx files here&amp;gt;&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 12 May 2013 08:08:56 GMT</pubDate>
    <dc:creator>kristian_kolb</dc:creator>
    <dc:date>2013-05-12T08:08:56Z</dc:date>
    <item>
      <title>manual splunk-optimize</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/manual-splunk-optimize/m-p/99262#M3656</link>
      <description>&lt;P&gt;I noticed that I have some buckets with many tsidx files. I know that the hot buckets are being optimized on a regular basis by splunk. But I would like to optimize manually the warm and cold buckets.&lt;/P&gt;

&lt;P&gt;see &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Indexer/Optimizeindexes"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Indexer/Optimizeindexes&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2013 23:56:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/manual-splunk-optimize/m-p/99262#M3656</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2013-01-24T23:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: manual splunk-optimize</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/manual-splunk-optimize/m-p/99263#M3657</link>
      <description>&lt;P&gt;you can run splunk optimize manually with&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;splunk-optimize bucket_folder&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;usage:./splunk-optimize -d|--directory &amp;lt;dir&amp;gt;&lt;BR /&gt;
    [-h|--help]&lt;BR /&gt;
    [-m|--mode &amp;lt;normal|force|all&amp;gt; (defaults to normal)]&lt;BR /&gt;
    [-v|--verbose]&lt;BR /&gt;
    [-s|--min-src-count &amp;lt;number&amp;gt; (defaults to 8)]&lt;BR /&gt;
    [-i|--iterations-max &amp;lt;number&amp;gt; (defaults to unlmitted)]&lt;BR /&gt;
    [-b|--lex-tpb  &amp;lt;number&amp;gt; (default 64 - merged lexicon terms per block)]&lt;BR /&gt;
    [-x|--max-allowed-size  &amp;lt;number&amp;gt; (max allowed extra disk space required, in bytes)]&lt;BR /&gt;
    [-p]--page-size &amp;lt;bytes&amp;gt; (memory allocation size, default: 1048576 (1MB), minimum: 16384)]&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;and you can retrieve the list of all the buckets with a lot of tsidx files with this script&lt;BR /&gt;
`&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
 #!/bin/bash&lt;BR /&gt;
 # find_stidx.sh script for listing the buckets with too many tsidx&lt;BR /&gt;
 # required the base folder as argument&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;#settings &lt;BR /&gt;
 tsidx_limit=10&lt;BR /&gt;
 verbose=1 # display the count per folder&lt;BR /&gt;
 #verbose=0 # just display list of folders&lt;BR /&gt;
 include_hot=1 # look in hot and warm and cold buckets&lt;/P&gt;

&lt;P&gt;if [ $# -lt 1 ]; then&lt;BR /&gt;
   echo 1&amp;gt;&amp;amp;2 "usage : $0 &lt;BASE_FOLDER&gt;"&lt;BR /&gt;
   exit 2&lt;BR /&gt;
 fi&lt;/BASE_FOLDER&gt;&lt;/P&gt;

&lt;P&gt;hot_bucket_list=""&lt;BR /&gt;
 db_bucket_list=""&lt;BR /&gt;
 base_folder=$1&lt;/P&gt;

&lt;P&gt;# get the list of the buckets folders&lt;BR /&gt;
 if [ $include_hot -eq 1 ] ; then&lt;BR /&gt;
   hot_bucket_list=&lt;CODE&gt;find $base_folder -name "hot_*"&lt;/CODE&gt;&lt;BR /&gt;
 fi&lt;BR /&gt;
 bucket_list=&lt;CODE&gt;find $base_folder -name "db_*"&lt;/CODE&gt;&lt;BR /&gt;
 bucket_list="$hot_nucket_list $bucket_list"&lt;/P&gt;

&lt;P&gt;# count the tsidx&lt;BR /&gt;
 if [ $verbose -eq 1 ] ; then &lt;BR /&gt;
  echo "list of buckets with more than $tsidx_limit tsidx files"&lt;BR /&gt;&lt;BR /&gt;
 fi&lt;BR /&gt;
 for bucket in $bucket_list ; do&lt;BR /&gt;
  count=&lt;CODE&gt;find $bucket -name "*.tsidx" | wc -l&lt;/CODE&gt;&lt;BR /&gt;
  if [ "$count" -gt "$tsidx_limit" ] ; then&lt;BR /&gt;
   if [ $verbose -eq 1 ] ; then &lt;BR /&gt;
     echo "$count tsidx in $bucket" &lt;BR /&gt;
   else&lt;BR /&gt;
      echo "$bucket"&lt;BR /&gt;
  fi &lt;BR /&gt;
 fi&lt;BR /&gt;
 done&lt;BR /&gt;
`&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:11:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/manual-splunk-optimize/m-p/99263#M3657</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2020-09-28T13:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: manual splunk-optimize</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/manual-splunk-optimize/m-p/99264#M3658</link>
      <description>&lt;P&gt;my index name is idx_3 &lt;BR /&gt;
directory is&lt;BR /&gt;
/h_data/splunk/splunk/var/lib/splunk/idx_3/db&lt;BR /&gt;
How to use?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:53:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/manual-splunk-optimize/m-p/99264#M3658</guid>
      <dc:creator>khyoung7410</dc:creator>
      <dc:date>2020-09-28T13:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: manual splunk-optimize</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/manual-splunk-optimize/m-p/99265#M3659</link>
      <description>&lt;P&gt;&lt;CODE&gt;$SPLUNK_HOME/bin/splunk-optimize -d /h_data/splunk/splunk/var/lib/splunk/idx_3/db/&amp;lt;your bucket with many tsidx files here&amp;gt;&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 12 May 2013 08:08:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/manual-splunk-optimize/m-p/99265#M3659</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-05-12T08:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: manual splunk-optimize</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/manual-splunk-optimize/m-p/99266#M3660</link>
      <description>&lt;P&gt;Thank you&lt;BR /&gt;
How to use script?&lt;/P&gt;</description>
      <pubDate>Sun, 12 May 2013 08:29:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/manual-splunk-optimize/m-p/99266#M3660</guid>
      <dc:creator>khyoung7410</dc:creator>
      <dc:date>2013-05-12T08:29:42Z</dc:date>
    </item>
  </channel>
</rss>

