<?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: How to plot a bar chart to plot fields with KB,Bytes,MB and GB values? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-plot-a-bar-chart-to-plot-fields-with-KB-Bytes-MB-and-GB/m-p/336412#M21828</link>
    <description>&lt;P&gt;Hi Ellio,&lt;BR /&gt;
thank you very much and much appreciated for your help in this regard !&lt;BR /&gt;
Regards,&lt;BR /&gt;
smdasim&lt;/P&gt;</description>
    <pubDate>Thu, 01 Feb 2018 06:28:10 GMT</pubDate>
    <dc:creator>smdasim</dc:creator>
    <dc:date>2018-02-01T06:28:10Z</dc:date>
    <item>
      <title>How to plot a bar chart to plot fields with KB,Bytes,MB and GB values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-plot-a-bar-chart-to-plot-fields-with-KB-Bytes-MB-and-GB/m-p/336408#M21824</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;

&lt;P&gt;I have split the below log into key value  paris &lt;CODE&gt;ParEdenSpace_init=6.5 MB&lt;/CODE&gt; &lt;CODE&gt;ParEdenSpace_Used=204.6&lt;/CODE&gt; &lt;CODE&gt;ParEdenSpace_Commited=1.7 GB&lt;/CODE&gt; and &lt;CODE&gt;ParEdenSpace_Max=12.8 GB&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;I have used below query to plot the data, however, the &lt;CODE&gt;minParEdenSpaceUsed&lt;/CODE&gt;  value is in KB but it is showing high value in the graph attached. How would I normalize the values before I plot the data and how to identify if the value is in bytes, MB or GB and then convert into standard GB or MB.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;timechart span=1d min(ParEdenSpace_Used) as minParEdenSpaceUsed ,max(ParEdenSpace_Used) as  maxParEdenSpaceUsed,min(ParEdenSpace_Committed) as  minParEdenSpace_Committed,max(ParEdenSpace_Committed) as  maxParEdenSpace_Committed,,max(ParEdenSpace_Max) as  maxParEdenSpace_Max
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Log file &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2017-06-26T02:10:12 [INFO] [Thread: Security Console] Memory pool configuration:
                               |       Init |       Used |  Committed |        Max |
Code Cache                     |     2.4 MB |    46.8 MB |    48.9 MB |     240 MB |
Metaspace                      |    0 bytes |    90.3 MB |    92.2 MB |   -1 bytes |
Par Eden Space                 |     6.5 MB |   204.6 MB |     1.7 GB |    12.8 GB |
Par Survivor Space             |     768 KB |    0 bytes |   221.2 MB |     1.6 GB |
CMS Old Gen                    |     248 MB |     2.1 GB |     4.3 GB |      32 GB |
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Many thanks for your response!&lt;BR /&gt;
much appreciated &lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2018 20:19:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-plot-a-bar-chart-to-plot-fields-with-KB-Bytes-MB-and-GB/m-p/336408#M21824</guid>
      <dc:creator>smdasim</dc:creator>
      <dc:date>2018-01-26T20:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot a bar chart to plot fields with KB,Bytes,MB and GB values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-plot-a-bar-chart-to-plot-fields-with-KB-Bytes-MB-and-GB/m-p/336409#M21825</link>
      <description>&lt;P&gt;sometime the same field value has value in KB,MB and GB .ParEdenSpace_Used can have values like 294.9 KB,2G B ,1.9 MB etc&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2018 20:41:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-plot-a-bar-chart-to-plot-fields-with-KB-Bytes-MB-and-GB/m-p/336409#M21825</guid>
      <dc:creator>smdasim</dc:creator>
      <dc:date>2018-01-26T20:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot a bar chart to plot fields with KB,Bytes,MB and GB values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-plot-a-bar-chart-to-plot-fields-with-KB-Bytes-MB-and-GB/m-p/336410#M21826</link>
      <description>&lt;P&gt;To make it easy to understand (because you weren't sure if you'd convert to GB or MB above), I'll propose a way to normalize to bytes. This approach will split each relevant field into two pieces - &lt;CODE&gt;val&lt;/CODE&gt; and &lt;CODE&gt;multiplier&lt;/CODE&gt;. Based on the value of the field &lt;CODE&gt;multiplier&lt;/CODE&gt;, a case statement multiplies the &lt;CODE&gt;val&lt;/CODE&gt; by 1024 (to convert from KB), 1024*1024 (to convert from MB), 1024*1024*1024 (to convert from GB), or by no multiplier (to keep bytes in bytes).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| foreach minParEdenSpaceUsed, maxParEdenSpaceUsed, minParEdenSpace_Committed, maxParEdenSpace_Committed, maxParEdenSpace_Max 
    [ eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;=split('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;', " ") 
    | eval val=mvindex(&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;, 0), multiplier=mvindex(&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;, 1) 
    | eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;=case(multiplier="bytes", val, multiplier="KB", val*1024, multiplier="MB", val*1024*1024, multiplier="GB", val*1024*1024*1024) 
    | fields - val multiplier ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you wanted to convert to GB or MB, you'd adjust that math accordingly.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:51:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-plot-a-bar-chart-to-plot-fields-with-KB-Bytes-MB-and-GB/m-p/336410#M21826</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2020-09-29T17:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot a bar chart to plot fields with KB,Bytes,MB and GB values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-plot-a-bar-chart-to-plot-fields-with-KB-Bytes-MB-and-GB/m-p/336411#M21827</link>
      <description>&lt;P&gt;If you do following search, what output (value) you get for various fields? Can you post some sample results from below query?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | head 1 | table ParEdenSpace_Used ParEdenSpace_Used  ParEdenSpace_Committed ParEdenSpace_Committed ParEdenSpace_Max
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Jan 2018 22:06:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-plot-a-bar-chart-to-plot-fields-with-KB-Bytes-MB-and-GB/m-p/336411#M21827</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-01-26T22:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot a bar chart to plot fields with KB,Bytes,MB and GB values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-plot-a-bar-chart-to-plot-fields-with-KB-Bytes-MB-and-GB/m-p/336412#M21828</link>
      <description>&lt;P&gt;Hi Ellio,&lt;BR /&gt;
thank you very much and much appreciated for your help in this regard !&lt;BR /&gt;
Regards,&lt;BR /&gt;
smdasim&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 06:28:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-plot-a-bar-chart-to-plot-fields-with-KB-Bytes-MB-and-GB/m-p/336412#M21828</guid>
      <dc:creator>smdasim</dc:creator>
      <dc:date>2018-02-01T06:28:10Z</dc:date>
    </item>
  </channel>
</rss>

