<?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: timechart + sort limiting number of samples? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/timechart-sort-limiting-number-of-samples/m-p/20582#M3243</link>
    <description>&lt;P&gt;First, you can simplify the timechart part by using per_second to sum the MB, and divide by 60, for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=performance network42 MBytes | timechart span=60s per_second(MBytes) as MBpersecond by guest usenull=f useother=f
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want to find the top ten spikes over a 60s period, you'd sort:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=performance network42 MBytes | timechart span=60s per_second(MBytes) as MBpersecond by guest usenull=f useother=f | sort 10 MBpersecond
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you wanted to look for the busiest hosts, globally, you wouldn't use timechart at all:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=performance network42 MBytes | stats sum(MBytes) as MBtotal by guest  | sort 10 MBtotal
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 06 Apr 2012 03:14:08 GMT</pubDate>
    <dc:creator>Stephen_Sorkin</dc:creator>
    <dc:date>2012-04-06T03:14:08Z</dc:date>
    <item>
      <title>timechart + sort limiting number of samples?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-sort-limiting-number-of-samples/m-p/20581#M3242</link>
      <description>&lt;P&gt;Trying to show the top 10 busiest guest VM's in mu environment.&lt;BR /&gt;
Each guest VM is reporting its network status in the following syntax:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Apr  5 13:41:22 a4-hpc1-2 logger: xen-performance network42 : timestamp=13:41:21 pool=General1 hardware=a4-hpc1-2 guest=9895_splatqa0006_RX interface=vif8.0 bytes=0133071 MBytes=0.12
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Every 20 seconds I get a status update, and how much data was transmitted in the last 20sec.  When I use the following search, I can get status of most VM's.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=performance network42 MBytes | eval MB = MBytes/20 | timechart max(MB) span=60s by guest usenull=f useother=f
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The problem comes in when I try to sort the data. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=performance network42 MBytes | eval MB = MBytes/20 | timechart max(MB) span=60s by guest usenull=f useother=f | sort num(MB) by guest limit=7
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The limit on sort seems to be applying to the number of samples, not the number of guests.&lt;BR /&gt;&lt;BR /&gt;
Ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2012 21:30:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-sort-limiting-number-of-samples/m-p/20581#M3242</guid>
      <dc:creator>talbot7</dc:creator>
      <dc:date>2012-04-05T21:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: timechart + sort limiting number of samples?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-sort-limiting-number-of-samples/m-p/20582#M3243</link>
      <description>&lt;P&gt;First, you can simplify the timechart part by using per_second to sum the MB, and divide by 60, for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=performance network42 MBytes | timechart span=60s per_second(MBytes) as MBpersecond by guest usenull=f useother=f
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want to find the top ten spikes over a 60s period, you'd sort:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=performance network42 MBytes | timechart span=60s per_second(MBytes) as MBpersecond by guest usenull=f useother=f | sort 10 MBpersecond
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you wanted to look for the busiest hosts, globally, you wouldn't use timechart at all:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=performance network42 MBytes | stats sum(MBytes) as MBtotal by guest  | sort 10 MBtotal
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Apr 2012 03:14:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-sort-limiting-number-of-samples/m-p/20582#M3243</guid>
      <dc:creator>Stephen_Sorkin</dc:creator>
      <dc:date>2012-04-06T03:14:08Z</dc:date>
    </item>
  </channel>
</rss>

