<?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 What is the difference between `tstats` and tstats? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-difference-between-tstats-and-tstats/m-p/207850#M60586</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I'm trying to build a simple dashboard that shows a simple graph of bytes sent by a web server. I realize that I want to use the "Web" accelerated data model, or the searches will take a long time.&lt;/P&gt;

&lt;P&gt;After looking at the "Web Center" dashboard, and some tinkering, I arrived at this search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| `tstats` sum(Web.bytes) from datamodel=Web by _time | timechart sum(Web.bytes)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This search works a treat, and runs very quickly.  However, the output shows the raw byte count, which is hard to read.  I would like to output Gb instead.  So, after some more tinkering, I arrived at this search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats sum("Web.bytes") as "total_bytes" FROM datamodel=Web by _time | timechart eval(sum(total_bytes)/(1024*1024*1024)) as "GB out"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This search shows exactly what I want, but runs very slowly.  It seems that the difference is `tstats` vs tstats, i.e. quotes vs. no quotes.  If I remove the quotes from the first search, then it runs very slowly.  And if I add the quotes to the second search, it runs much faster, but no results are found, so it seems that `tstats` has different semantics when it comes to applying functions such as eval.&lt;/P&gt;

&lt;P&gt;So I have two questions, the first being about the difference between `tstats` and tstats, and why there is such a big performance difference.  The second question is why `tstats` seems to not have some functions available.&lt;/P&gt;

&lt;P&gt;I realize I'm probably missing something really obvious!&lt;/P&gt;

&lt;P&gt;Thanks for your help.&lt;/P&gt;

&lt;P&gt;Cheers,&lt;/P&gt;

&lt;P&gt;Thom.&lt;/P&gt;</description>
    <pubDate>Mon, 18 Apr 2016 07:17:07 GMT</pubDate>
    <dc:creator>thom_larner</dc:creator>
    <dc:date>2016-04-18T07:17:07Z</dc:date>
    <item>
      <title>What is the difference between `tstats` and tstats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-difference-between-tstats-and-tstats/m-p/207850#M60586</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I'm trying to build a simple dashboard that shows a simple graph of bytes sent by a web server. I realize that I want to use the "Web" accelerated data model, or the searches will take a long time.&lt;/P&gt;

&lt;P&gt;After looking at the "Web Center" dashboard, and some tinkering, I arrived at this search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| `tstats` sum(Web.bytes) from datamodel=Web by _time | timechart sum(Web.bytes)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This search works a treat, and runs very quickly.  However, the output shows the raw byte count, which is hard to read.  I would like to output Gb instead.  So, after some more tinkering, I arrived at this search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats sum("Web.bytes") as "total_bytes" FROM datamodel=Web by _time | timechart eval(sum(total_bytes)/(1024*1024*1024)) as "GB out"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This search shows exactly what I want, but runs very slowly.  It seems that the difference is `tstats` vs tstats, i.e. quotes vs. no quotes.  If I remove the quotes from the first search, then it runs very slowly.  And if I add the quotes to the second search, it runs much faster, but no results are found, so it seems that `tstats` has different semantics when it comes to applying functions such as eval.&lt;/P&gt;

&lt;P&gt;So I have two questions, the first being about the difference between `tstats` and tstats, and why there is such a big performance difference.  The second question is why `tstats` seems to not have some functions available.&lt;/P&gt;

&lt;P&gt;I realize I'm probably missing something really obvious!&lt;/P&gt;

&lt;P&gt;Thanks for your help.&lt;/P&gt;

&lt;P&gt;Cheers,&lt;/P&gt;

&lt;P&gt;Thom.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2016 07:17:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-difference-between-tstats-and-tstats/m-p/207850#M60586</guid>
      <dc:creator>thom_larner</dc:creator>
      <dc:date>2016-04-18T07:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: What is the difference between `tstats` and tstats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-difference-between-tstats-and-tstats/m-p/207851#M60587</link>
      <description>&lt;P&gt;A name within backticks is a macro.  You should be able to find the definition of the macro at Settings-&amp;gt;Advanced Search-&amp;gt;Search macros.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2016 17:50:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-difference-between-tstats-and-tstats/m-p/207851#M60587</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-04-18T17:50:08Z</dc:date>
    </item>
  </channel>
</rss>

