<?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 how to sum numbers with space in them in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/how-to-sum-numbers-with-space-in-them/m-p/27155#M4513</link>
    <description>&lt;P&gt;I have a field called size that takes the form:&lt;BR /&gt;
1 2 3 4 &lt;/P&gt;

&lt;P&gt;I want to find someway to evaluate size so that is sums all the numbers.&lt;BR /&gt;
for example, eval totalsize = &lt;SOME kind="" of="" sum="" function=""&gt;(size) would evaluate to 10.&lt;/SOME&gt;&lt;/P&gt;

&lt;P&gt;basically my field size is a collection of sizes, and i want to sum it up for the total size.&lt;BR /&gt;
stats sum is not an option, since it sums it will sum everything over every single event.I need it to sum one event at a time.&lt;/P&gt;

&lt;P&gt;to be very specific, here is a picture of what i am going for:&lt;BR /&gt;
&lt;A href="http://tinypic.com/r/2pru4h0/6"&gt;http://tinypic.com/r/2pru4h0/6&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;how do i get totalsize?&lt;/P&gt;

&lt;P&gt;thanks a bunch&lt;/P&gt;

&lt;P&gt;EDIT:&lt;BR /&gt;
ehh&lt;BR /&gt;
i tried something like that&lt;BR /&gt;
unfortunately my host fields arent unique&lt;BR /&gt;
What im doing is getting file sizes from hosts at different times.&lt;BR /&gt;
So for example, host1 could have a different number of files at each event, and i only want to get the sum at each particular event&lt;/P&gt;

&lt;P&gt;Is there any other way?&lt;/P&gt;</description>
    <pubDate>Thu, 08 Nov 2012 03:33:19 GMT</pubDate>
    <dc:creator>halperkins</dc:creator>
    <dc:date>2012-11-08T03:33:19Z</dc:date>
    <item>
      <title>how to sum numbers with space in them</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-sum-numbers-with-space-in-them/m-p/27155#M4513</link>
      <description>&lt;P&gt;I have a field called size that takes the form:&lt;BR /&gt;
1 2 3 4 &lt;/P&gt;

&lt;P&gt;I want to find someway to evaluate size so that is sums all the numbers.&lt;BR /&gt;
for example, eval totalsize = &lt;SOME kind="" of="" sum="" function=""&gt;(size) would evaluate to 10.&lt;/SOME&gt;&lt;/P&gt;

&lt;P&gt;basically my field size is a collection of sizes, and i want to sum it up for the total size.&lt;BR /&gt;
stats sum is not an option, since it sums it will sum everything over every single event.I need it to sum one event at a time.&lt;/P&gt;

&lt;P&gt;to be very specific, here is a picture of what i am going for:&lt;BR /&gt;
&lt;A href="http://tinypic.com/r/2pru4h0/6"&gt;http://tinypic.com/r/2pru4h0/6&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;how do i get totalsize?&lt;/P&gt;

&lt;P&gt;thanks a bunch&lt;/P&gt;

&lt;P&gt;EDIT:&lt;BR /&gt;
ehh&lt;BR /&gt;
i tried something like that&lt;BR /&gt;
unfortunately my host fields arent unique&lt;BR /&gt;
What im doing is getting file sizes from hosts at different times.&lt;BR /&gt;
So for example, host1 could have a different number of files at each event, and i only want to get the sum at each particular event&lt;/P&gt;

&lt;P&gt;Is there any other way?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Nov 2012 03:33:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-sum-numbers-with-space-in-them/m-p/27155#M4513</guid>
      <dc:creator>halperkins</dc:creator>
      <dc:date>2012-11-08T03:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to sum numbers with space in them</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-sum-numbers-with-space-in-them/m-p/27156#M4514</link>
      <description>&lt;P&gt;This solution assumes that the numbers are separated by a single space, and that the host field is unique:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere
| eval newNums=split(size," ")
| mvexpand newNums
|  stats sum(newNums) as TotalSize by host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Nov 2012 07:34:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-sum-numbers-with-space-in-them/m-p/27156#M4514</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-11-08T07:34:50Z</dc:date>
    </item>
  </channel>
</rss>

