<form stylesheet="ui_simple.css,hover.css,hide_timeindicator.css,panel_decoration.css,table_data_bar.css" script="active_button.js,autodiscover.js,table_data_bar.js" isVisible="true" version="1.1" theme="dark">
    <label>NMON Summary Light Analysis</label>
    <fieldset autoRun="false" submitButton="false">

        <input type="time" token="timerange" searchWhenChanged="true">
            <label>Time Range:</label>
            <default>
                <earliest>-24h</earliest>
                <latest>now</latest>
            </default>
            <change>
                <unset token="form.refresh"></unset>
            </change>
        </input>

        <input type="dropdown" token="osfilter" searchWhenChanged="true">
            <label>Filter OS Type:</label>
            <default>*</default>
            <choice value="*">Any OS</choice>
            <choice value="AIX">AIX</choice>
            <choice value="Linux">Linux</choice>
            <choice value="Solaris">Solaris</choice>
            <prefix>OStype="</prefix>
            <suffix>"</suffix>
        </input>

        <input id="frameID" type="dropdown" token="frameID" searchWhenChanged="true">
            <label>Frame IDs:</label>
            <search base="populate">
                <query>stats count by frameID | dedup frameID | sort 0 frameID</query>
            </search>
            <choice value="*">Any</choice>
            <default>*</default>
            <fieldForLabel>frameID</fieldForLabel>
            <fieldForValue>frameID</fieldForValue>
        </input>

        <input type="text" token="host-prefilter" searchWhenChanged="true">
            <label>Optional: Filter hosts populating</label>
            <default>*</default>
        </input>

        <input id="host" type="dropdown" token="host" searchWhenChanged="true">
            <label>Host:</label>
            <search base="populate">
                <query>search frameID=$frameID$ host=$host-prefilter$ | stats count by host | dedup host | sort 0 host</query>
            </search>
            <fieldForLabel>host</fieldForLabel>
            <fieldForValue>host</fieldForValue>
            <change>
                <unset token="OStype_is_set"></unset>
            </change>
        </input>

        <input type="dropdown" token="span" searchWhenChanged="true">
            <label>Span:</label>
            <default>`nmon_span`</default>
            <choice value="`nmon_span`">auto</choice>
            <choice value="span=1m">1 minute</choice>
            <choice value="span=2m">2 minutes</choice>
            <choice value="span=3m">3 minutes</choice>
            <choice value="span=4m">4 minutes</choice>
            <choice value="span=5m">5 minutes</choice>
            <choice value="span=10m">10 minutes</choice>
            <choice value="span=15m">15 minutes</choice>
            <choice value="span=30m">30 minutes</choice>
            <choice value="span=1h">1 hour</choice>
            <choice value="span=2h">2 hours</choice>
            <choice value="span=12h">12 hours</choice>
            <choice value="span=4h">4 hours</choice>
            <choice value="span=1d">1 day</choice>
            <choice value="span=2d">2 days</choice>
            <choice value="span=1w">7 days</choice>
            <choice value="span=1mon">1 month</choice>
        </input>

        <input type="dropdown" token="refresh" searchWhenChanged="true">
            <label>Auto-refresh:</label>
            <fieldForLabel>label</fieldForLabel>
            <fieldForValue>value</fieldForValue>
            <selectFirstChoice>true</selectFirstChoice>
            <search>
                <query>| `def_auto_refresh`</query>
                <earliest>$timerange.earliest$</earliest>
                <latest>$timerange.latest$</latest>
            </search>
        </input>

    </fieldset>

    <!--
    base search for main dropdown populating
    -->

    <search id="populate">
        <query>| mcatalog values(metric_name) where `nmon_metrics_index` metric_name="os.unix.nmon.cpu.cpu_all.logical_cpus" $osfilter$ by host
| `mapping_frameID`
| stats count by frameID, host | sort 0 host</query>
        <earliest>$timerange.earliest$</earliest>
        <latest>$timerange.latest$</latest>
    </search>

    <!--
    Dynamic configuration
    The following searches are being used to define various tokens using event handlers
    -->

    <!-- OStype -->

    <search id="OSType_detection">
        <query>| mcatalog values(OStype) as OStype_values where `nmon_metrics_index` metric_name="os.unix.nmon.cpu.cpu_all.logical_cpus" host=$host$ | rename OStype_values as OStype | mvexpand OStype | head 1 | table OStype</query>
        <earliest>$timerange.earliest$</earliest>
        <latest>$timerange.latest$</latest>
        <progress>
            <condition match="'result.OStype'==&quot;Linux&quot;">
                <set token="is_Linux">true</set>
                <unset token="is_AIX"></unset>
                <unset token="is_Solaris"></unset>
            </condition>
            <condition match="'result.OStype'==&quot;AIX&quot;">
                <set token="is_AIX">true</set>
                <unset token="is_Linux"></unset>
                <unset token="is_Solaris"></unset>
            </condition>
            <condition match="'result.OStype'==&quot;Solaris&quot;">
                <set token="is_Solaris">true</set>
                <unset token="is_AIX"></unset>
                <unset token="is_Linux"></unset>
            </condition>
        </progress>
    </search>

    <!-- CPU data source (CPU_ALL versus LPAR) -->

    <search>
        <query>| mcatalog values(metric_name) where `nmon_metrics_index` metric_name="os.unix.nmon.cpu.lpar.PhysicalCPU" host=$host$ | stats count | where count&gt;0</query>
        <earliest>$timerange.earliest$</earliest>
        <latest>$timerange.latest$</latest>
        <progress>
            <condition match="$job.resultCount$ == 0">
                <set token="is_not_LPAR">true</set>
                <unset token="is_LPAR"></unset>
                <set token="CPU_datasource">CPU_ALL usage</set>
                <set token="CPU_datasource_minilabel">CPU % usage</set>
            </condition>
            <condition>
                <set token="is_LPAR">true</set>
                <unset token="is_not_LPAR"></unset>
                <set token="CPU_datasource">LPAR usage</set>
                <set token="CPU_datasource_minilabel">partition vCPUs usage</set>
            </condition>
        </progress>
    </search>

    <!-- TOP data availability -->

    <search>
        <query>| mcatalog values(metric_name) where `nmon_metrics_index` metric_name="os.unix.nmon.processes.top.pct_CPU" host=$host$ | stats count | where count&gt;0</query>
        <earliest>$timerange.earliest$</earliest>
        <latest>$timerange.latest$</latest>
        <progress>
            <condition match="$job.resultCount$ == 0">
                <set token="show_null_top">true</set>
            </condition>
            <condition>
                <unset token="show_null_top"/>
                <set token="start_top_searches">true</set>
            </condition>
        </progress>
    </search>

    <!-- UPTIME data availability -->

    <search>
        <query>| mcatalog values(metric_name) where `nmon_metrics_index` metric_name="os.unix.nmon.system.uptime.load_average_1min" host=$host$ | stats count | where count&gt;0</query>
        <earliest>$timerange.earliest$</earliest>
        <latest>$timerange.latest$</latest>
        <progress>
            <condition match="$job.resultCount$ == 0">
                    <unset token="start_uptime_searches"></unset>
                    <set token="show_null_uptime">true</set>
            </condition>
            <condition>
                    <set token="start_uptime_searches">true</set>
                    <unset token="show_null_uptime"></unset>
            </condition>
        </progress>
    </search>

    <!-- DG data availability -->

    <search>
        <query>| mcatalog values(metric_name) where `nmon_metrics_index` metric_name="os.unix.nmon.storage.dgxfer" host=$host$ | stats count | where count&gt;0</query>
        <earliest>$timerange.earliest$</earliest>
        <latest>$timerange.latest$</latest>
        <progress>
            <condition match="$job.resultCount$ == 0">
                    <set token="start_disk_stats_search">_time,*</set>
                    <unset token="start_dg_stats_search"></unset>
            </condition>
            <condition>
                    <set token="start_dg_stats_search">_time,*</set>
                    <unset token="start_disk_stats_search"></unset>
            </condition>
        </progress>
    </search>

    <!-- DF_STORAGE data availability -->

    <search>
        <query>| mcatalog values(metric_name) where `nmon_metrics_index` metric_name="os.unix.nmon.storage.df_storage.Use_pct" host=$host$ | stats count | where count&gt;0</query>
        <earliest>$timerange.earliest$</earliest>
        <latest>$timerange.latest$</latest>
        <progress>
            <condition match="$job.resultCount$ == 0">
                    <set token="start_jfs_storage_search">true</set>
                    <unset token="start_df_storage_search"></unset>
            </condition>
            <condition>
                    <set token="start_df_storage_search">true</set>
                    <unset token="start_jfs_storage_search"></unset>
            </condition>
        </progress>
    </search>


    <!-- Configuration Search uses nmon_inventory -->

    <search id="configSearch" depends="$show_configuration$">
        <query>| inputlookup nmon_inventory
| rename hostname as host
| search host=$host$
| sort limit=0 host | eval OS_summary=upper(OStype)+" / "+OSversion
| fields host, OS_summary, cpu_cores, Processor</query>
        <earliest>0</earliest>
        <!-- Progress event has access to job properties only -->
        <progress>
            <condition match="'job.resultCount' == 0">
                <set token="show_null_config">True</set>
            </condition>
            <condition>
                <unset token="show_null_config"/>
            </condition>
        </progress>
    </search>

    <search id="MEMSearch" depends="$show_configuration$">
        <query>| mstats avg(_value) as value where `nmon_metrics_index` (metric_name="os.unix.nmon.memory.mem.memtotal" OR metric_name="os.unix.nmon.memory.mem.Real_total_MB" OR metric_name="os.unix.nmon.memory.mem.swaptotal" OR metric_name="os.unix.nmon.memory.mem.Virtual_total_MB") host=$host$ by host, metric_name span=1m
| eval memtotal=case(isnum(value) AND metric_name="os.unix.nmon.memory.mem.memtotal", value, isnum(value) AND metric_name="os.unix.nmon.memory.mem.Real_total_MB", value)
| eval swaptotal=case(isnum(value) AND metric_name="os.unix.nmon.memory.mem.swaptotal", value, isnum(value) AND metric_name="os.unix.nmon.memory.mem.Virtual_total_MB", value)
| stats latest(memtotal) as memtotal, latest(swaptotal) as swaptotal
| foreach * [ eval &lt;&lt;FIELD&gt;&gt; = round('&lt;&lt;FIELD&gt;&gt;', 0) ]</query>
        <earliest>$timerange.earliest$</earliest>
        <latest>$timerange.latest$</latest>
        <refresh>$refresh$</refresh>
        <refreshType>delay</refreshType>
    </search>

    <!-- for non LPARs -->

    <search id="CPUSearch_summary">
        <query>| mstats avg(_value) as value where `nmon_metrics_index` `def_cpu_all_os_metric_filters` host=$host$ by metric_name, OStype, host span=1m
| `def_all_os_cpu_load_percent`
| stats max(cpu_load_percent) AS max_usage, avg(cpu_load_percent) AS avg_usage, median(cpu_load_percent) AS median_usage
| foreach * [ eval &lt;&lt;FIELD&gt;&gt; = if('&lt;&lt;FIELD&gt;&gt;'>100, 100, round('&lt;&lt;FIELD&gt;&gt;', 2) ) ]</query>
        <earliest>$timerange.earliest$</earliest>
        <latest>$timerange.latest$</latest>
        <refresh>$refresh$</refresh>
        <refreshType>delay</refreshType>
    </search>

    <search id="TOPSearch" depends="$show_processes$">
        <query>| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.processes.top.pct_CPU" host=$host$ by host, metric_name, dimension_Command, dimension_PID span=1m
| stats sum(value) as pct_CPU by _time, host, metric_name, dimension_Command
| appendcols [ | mstats latest(_value) as logical_cpus where `nmon_metrics_index` metric_name="os.unix.nmon.cpu.cpu_all.logical_cpus" host=GMD-LAPTOP by host ]
| appendcols [ | mstats latest(_value) as virtual_cpus where `nmon_metrics_index` metric_name="os.unix.nmon.cpu.cpu_all.virtual_cpus" host=GMD-LAPTOP by host ]
| filldown logical_cpus, virtual_cpus
| stats values(pct_CPU) as pct_CPU, values(logical_cpus) as logical_cpus, values(virtual_cpus) as virtual_cpus by _time, host, dimension_Command
| eval usage_per_core=(pct_CPU/100), smt_threads=(logical_cpus/virtual_cpus)
| eval usage_per_core=case(isnum(smt_threads) AND smt_threads&gt;="2", usage_per_core*1.2, isnum(smt_threads) AND smt_threads&gt;="4", usage_per_core*1.4, isnum(usage_per_core), usage_per_core)
| stats max(usage_per_core) as max_usage_per_core, avg(usage_per_core) as avg_usage_per_core by dimension_Command | rename dimension_Command as Command
| foreach *usage_per_core [ eval &lt;&lt;FIELD&gt;&gt;=round('&lt;&lt;FIELD&gt;&gt;', 3) ] | sort - max_usage_per_core</query>
        <earliest>$timerange.earliest$</earliest>
        <latest>$timerange.latest$</latest>
        <refresh>$refresh$</refresh>
        <refreshType>delay</refreshType>
    </search>

    <!-- Help the user -->

    <row rejects="$host$">
        <panel>
            <html>
                <div class="red_help_user">
                    <p>- - - - - - - - - - ACTION REQUIRED: please select your server name(s) in the host selector above - - - - - - - - - -</p>
                </div>
            </html>
        </panel>
    </row>

    <!-- Information panel -->

    <row rejects="$host$">
        <panel>
            <html>

                <div class="imgheader2">
                    <img src="../../static/app/metricator-for-nmon/icons/dark_theme/info.png" alt="Info"/>

                    <h4>The Nmon Summary interface has been designed for focused time ranges, very large time ranges may require time to be fully processed</h4>
                    <h4>For long time analysis, please consider using metric dedicated interfaces available from App home pages</h4>

                </div>

            </html>
        </panel>
    </row>

    <!-- non LPARs -->

    <row>
        <panel>
            <viz type="horseshoe_meter_app.horseshoe_meter">
                <search base="CPUSearch_summary">
                    <query>gauge max_usage</query>
                </search>
                <option name="horseshoe_meter_app.horseshoe_meter.backgroundColor">#212527</option>
                <option name="horseshoe_meter_app.horseshoe_meter.dialColor">#d0d5d9</option>
                <option name="horseshoe_meter_app.horseshoe_meter.maxRangeColor">#b44441</option>
                <option name="horseshoe_meter_app.horseshoe_meter.maxRangeThreshold">85</option>
                <option name="horseshoe_meter_app.horseshoe_meter.maxValue">100</option>
                <option name="horseshoe_meter_app.horseshoe_meter.midRangeColor">#fbcd2f</option>
                <option name="horseshoe_meter_app.horseshoe_meter.midRangeThreshold">55</option>
                <option name="horseshoe_meter_app.horseshoe_meter.minRangeColor">#3fc77a</option>
                <option name="horseshoe_meter_app.horseshoe_meter.minValue">0</option>
                <option name="horseshoe_meter_app.horseshoe_meter.thresholdStyle">percentage</option>
                <option name="horseshoe_meter_app.horseshoe_meter.useRangemap">false</option>
                <option name="horseshoe_meter_app.horseshoe_meter.valueColor">#779ecb</option>
                <option name="horseshoe_meter_app.horseshoe_meter.caption">Max %CPU</option>
                <option name="height">180</option>
                <option name="refresh.display">preview</option>
            </viz>
        </panel>
        <panel>
            <viz type="horseshoe_meter_app.horseshoe_meter">
                <search base="CPUSearch_summary">
                    <query>gauge avg_usage</query>
                </search>
                <option name="horseshoe_meter_app.horseshoe_meter.backgroundColor">#212527</option>
                <option name="horseshoe_meter_app.horseshoe_meter.dialColor">#d0d5d9</option>
                <option name="horseshoe_meter_app.horseshoe_meter.maxRangeColor">#b44441</option>
                <option name="horseshoe_meter_app.horseshoe_meter.maxRangeThreshold">85</option>
                <option name="horseshoe_meter_app.horseshoe_meter.maxValue">100</option>
                <option name="horseshoe_meter_app.horseshoe_meter.midRangeColor">#fbcd2f</option>
                <option name="horseshoe_meter_app.horseshoe_meter.midRangeThreshold">55</option>
                <option name="horseshoe_meter_app.horseshoe_meter.minRangeColor">#3fc77a</option>
                <option name="horseshoe_meter_app.horseshoe_meter.minValue">0</option>
                <option name="horseshoe_meter_app.horseshoe_meter.thresholdStyle">percentage</option>
                <option name="horseshoe_meter_app.horseshoe_meter.useRangemap">false</option>
                <option name="horseshoe_meter_app.horseshoe_meter.valueColor">#779ecb</option>
                <option name="horseshoe_meter_app.horseshoe_meter.caption">Avg %CPU</option>
                <option name="height">180</option>
                <option name="refresh.display">preview</option>
            </viz>
        </panel>
        <panel>
            <viz type="horseshoe_meter_app.horseshoe_meter">
                <search base="CPUSearch_summary">
                    <query>gauge median_usage</query>
                </search>
                <option name="horseshoe_meter_app.horseshoe_meter.backgroundColor">#212527</option>
                <option name="horseshoe_meter_app.horseshoe_meter.dialColor">#d0d5d9</option>
                <option name="horseshoe_meter_app.horseshoe_meter.maxRangeColor">#b44441</option>
                <option name="horseshoe_meter_app.horseshoe_meter.maxRangeThreshold">85</option>
                <option name="horseshoe_meter_app.horseshoe_meter.maxValue">100</option>
                <option name="horseshoe_meter_app.horseshoe_meter.midRangeColor">#fbcd2f</option>
                <option name="horseshoe_meter_app.horseshoe_meter.midRangeThreshold">55</option>
                <option name="horseshoe_meter_app.horseshoe_meter.minRangeColor">#3fc77a</option>
                <option name="horseshoe_meter_app.horseshoe_meter.minValue">0</option>
                <option name="horseshoe_meter_app.horseshoe_meter.thresholdStyle">percentage</option>
                <option name="horseshoe_meter_app.horseshoe_meter.useRangemap">false</option>
                <option name="horseshoe_meter_app.horseshoe_meter.valueColor">#779ecb</option>
                <option name="horseshoe_meter_app.horseshoe_meter.caption">Median %CPU</option>
                <option name="height">180</option>
                <option name="refresh.display">preview</option>
            </viz>
        </panel>
    </row>

    <!-- ######################################### Active Buttons #########################################  -->

    <row>
        <panel>
            <html>
                <div class="custom-sub-nav" style="text-align: center;">
                    <button class="button2_lowpadding glow" data-token-name="show_configuration" data-alt-label="HIDE CONFIGURATION SUMMARY" data-token-value="fields *">SHOW CONFIGURATION SUMMARY</button>
                </div>
            </html>
        </panel>
        <panel>
            <html>
                <div class="custom-sub-nav" style="text-align: center;">
                    <button class="button2_lowpadding glow" data-token-name="show_uptime_load_average" data-alt-label="HIDE UPTIME LOAD AVERAGE" data-token-value="fields *">SHOW UPTIME LOAD AVERAGE</button>
                </div>
            </html>
        </panel>
    </row>

    <row depends="$show_configuration$">
        <panel>
            <html>
                <div class="dashseparator">
                    <h1>Start host configuration</h1>
                </div>
            </html>
        </panel>
    </row>

    <row depends="$show_configuration$">

        <panel rejects="$show_null_config$">
            <title>Operating System</title>
            <single>
                <search base="configSearch">
                    <query>fields OS_summary</query>
                </search>
                <option name="drilldown">none</option>
                <option name="underLabel">Operating System Level</option>
            </single>
        </panel>

        <panel rejects="$show_null_config$">
            <title>Processor Configuration</title>
            <single>
                <search base="configSearch">
                    <query>fields cpu_cores</query>
                </search>
                <option name="drilldown">none</option>
                <option name="underLabel">Virtual Proc / Logical Cores</option>
            </single>
            <single>
                <search base="configSearch">
                    <query>fields Processor</query>
                </search>
                <option name="drilldown">none</option>
                <option name="underLabel">Processor Type</option>
            </single>
        </panel>

        <panel depends="$show_null_config$">
            <html>
                <p style="color:blue;margin-left:30px;font-size:14px;margin-top:50px">SYSTEM SUMMARY OVERVIEW Search returned no results, The nmon inventory data may not be available yet for this host, manually run the Nmon Inventory Generation report or wait for the auto update. (occurs every hour by default)</p>
            </html>
        </panel>

        <panel>
            <title>Memory Configuration</title>

            <single>
                <search base="MEMSearch">
                    <query>fields memtotal</query>
                </search>
                <option name="drilldown">none</option>
                <option name="underLabel">Total Memory</option>
                <option name="unit">MB</option>
            </single>

            <single>
                <search base="MEMSearch">
                    <query>fields swaptotal</query>
                </search>
                <option name="drilldown">none</option>
                <option name="underLabel">Total Paging Space</option>
                <option name="unit">MB</option>
            </single>

        </panel>
    </row>

    <row depends="$show_configuration$">
        <panel>
            <html>
                <div class="dashseparator">
                    <h1>End host configuration</h1>
                </div>
            </html>
        </panel>
    </row>

    <!-- nmon external UPTIME -->

    <search id="baseSearch_loadaverage" depends="$start_uptime_searches$">
        <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.system.uptime.load_average_1min OR metric_name=os.unix.nmon.system.uptime.load_average_5min OR metric_name=os.unix.nmon.system.uptime.load_average_15min host=$host$ by metric_name, host span=1m
| `extract_metrics`
| eval {metric}=value
| fillnull value=0 load_average_1min load_average_5min load_average_15min
| timechart $span$ avg(load_average_1min) as load_average_1min, avg(load_average_5min) as load_average_5min, avg(load_average_15min) as load_average_15min | fields _time,load_average_1min,load_average_5min,load_average_15min</query>
        <earliest>$timerange.earliest$</earliest>
        <latest>$timerange.latest$</latest>
        <sampleRatio>1</sampleRatio>
        <refresh>$refresh$</refresh>
        <refreshType>delay</refreshType>
    </search>

    <row depends="$show_uptime_load_average$">
        <panel>
            <html>
                <div class="dashseparator">
                    <h1>Start uptime load average</h1>
                </div>
            </html>
        </panel>
    </row>

    <row depends="$show_uptime_load_average$ $show_null_uptime$">
        <panel>
            <html>
                <div class="red_help_user">
                    <p>- - - - - - - - - - UPTIME DATA UNAVAILABLE: The uptime data (nmon external collection) is not available, collecting these data requires the TA-nmon 1.3.x minimum - - - - - - - - - -</p>
                </div>
            </html>
        </panel>
    </row>

    <row depends="$show_uptime_load_average$" rejects="$show_null_uptime$">
        <panel>
            <title>SYSTEM LOAD AVERAGE (nmon external: UPTIME)</title>
            <single>
                <search base="baseSearch_loadaverage">
                    <query>fields _time, load_average_1min | where isnotnull(load_average_1min)</query>
                </search>
                <option name="colorBy">trend</option>
                <option name="drilldown">all</option>
                <option name="numberPrecision">0.00</option>
                <option name="trendColorInterpretation">inverse</option>
                <option name="underLabel">load average 1min</option>
                <option name="useColors">1</option>
            </single>
            <single>
                <search base="baseSearch_loadaverage">
                    <query>fields _time, load_average_5min | where isnotnull(load_average_5min)</query>
                </search>
                <option name="colorBy">trend</option>
                <option name="drilldown">all</option>
                <option name="numberPrecision">0.00</option>
                <option name="trendColorInterpretation">inverse</option>
                <option name="underLabel">load average 5min</option>
                <option name="useColors">1</option>
            </single>
            <single>
                <search base="baseSearch_loadaverage">
                    <query>fields _time, load_average_15min | where isnotnull(load_average_15min)</query>
                </search>
                <option name="colorBy">trend</option>
                <option name="drilldown">all</option>
                <option name="numberPrecision">0.00</option>
                <option name="trendColorInterpretation">inverse</option>
                <option name="underLabel">load average 15min</option>
                <option name="useColors">1</option>
            </single>
            <single>
                <search depends="$start_uptime_searches$">
                    <query>eventtype=nmon:events type=UPTIME host=$host$
| eval uptime=if(uptime&lt;86400, round((uptime/3600), 2) . " hours", round((uptime/86400), 2) . " days" )
| fields uptime</query>
                    <earliest>-15m</earliest>
                    <latest>now</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="drilldown">all</option>
                <option name="underLabel">current server uptime</option>
            </single>
            <chart>
                <search base="baseSearch_loadaverage">
                    <query>fields _time,load_average_1min,load_average_5min,load_average_15min</query>
                </search>
                <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
                <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
                <option name="charting.axisTitleX.visibility">collapsed</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisTitleY2.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.axisY2.enabled">0</option>
                <option name="charting.axisY2.scale">inherit</option>
                <option name="charting.chart">line</option>
                <option name="charting.chart.bubbleMaximumSize">50</option>
                <option name="charting.chart.bubbleMinimumSize">10</option>
                <option name="charting.chart.bubbleSizeBy">area</option>
                <option name="charting.chart.nullValueMode">gaps</option>
                <option name="charting.chart.showDataLabels">none</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">default</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">right</option>
                <option name="height">350</option>
            </chart>
            <table>
                <search base="baseSearch_loadaverage" depends="$start_uptime_searches$">
                    <query>stats latest(load_average_1min) as current_load_average_1min, avg(load_average_1min) as avg_load_average_1min, max(load_average_1min) as max_load_average_1min,
latest(load_average_5min) as current_load_average_5min, avg(load_average_5min) as avg_load_average_5min, max(load_average_5min) as max_load_average_5min,
latest(load_average_15min) as current_load_average_15min, avg(load_average_15min) as avg_load_average_15min, max(load_average_15min) as max_load_average_15min
| foreach * [ eval &lt;&lt;FIELD&gt;&gt; = round('&lt;&lt;FIELD&gt;&gt;', 2) ]
| eval "load average 1 min" =  "Current: " . current_load_average_1min . " Average: " . avg_load_average_1min . " Max: " . max_load_average_1min
| eval "load average 5 min" = "Current: " . current_load_average_5min . " Average: " . avg_load_average_5min . " Max: " . max_load_average_5min
| eval "load average 15 min" = "Current: " . current_load_average_15min . " Average: " . avg_load_average_15min . " Max: " . max_load_average_15min
| fields "load average *min" | transpose | eval order=case(column="load average 1 min", 1, column="load average 5 min", 2, column="load average 15 min", 3) | sort order | rename column as "By", "row 1" as "Load average" | fields By, "Load average"</query>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
            </table>
        </panel>

    </row>

    <row depends="$show_uptime_load_average$">
        <panel>
            <html>
                <div class="dashseparator">
                    <h1>End uptime load average</h1>
                </div>
            </html>
        </panel>
    </row>

    <row>
        <panel id="cpu">
            <title>CPU Usage Statistics - $CPU_datasource_minilabel$</title>

            <chart>
                <search>
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` `def_cpu_all_os_metric_filters` host=$host$ by metric_name, OStype, host span=1m
| `def_all_os_cpu_load_percent`
| timechart $span$ max(cpu_load_percent) AS "max cpu load %", avg(cpu_load_percent) AS "avg cpu load %"</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.chart">line</option>
                <option name="charting.chart.nullValueMode">gaps</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">default</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">bottom</option>
                <option name="height">350</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">$CPU_datasource_minilabel$</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="refresh.display">none</option>
            </chart>

        </panel>

        <panel id="disk">
            <title>I/O Operations per second</title>

            <chart depends="$start_dg_stats_search$">
                <search depends="$start_dg_stats_search$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.dgxfer" host=$host$ by host, dimension_device span=1m
| stats sum(value) as disk_total_iops by _time, host
| timechart $span$ max(disk_total_iops) As "max Total I/O", avg(disk_total_iops) As "avg Total I/O"</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.chart">line</option>
                <option name="charting.chart.nullValueMode">gaps</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">default</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">bottom</option>
                <option name="height">350</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">I/O per second</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="refresh.display">none</option>
            </chart>

            <chart depends="$start_disk_stats_search$">
                <search id="IOPStimechart" depends="$start_disk_stats_search$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.diskxfer" host=$host$ by host, dimension_device span=1m
| stats sum(value) AS iops by _time, host
| timechart $span$ max(iops) As "max Total I/O", avg(iops) As "avg Total I/O"</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.chart">line</option>
                <option name="charting.chart.nullValueMode">gaps</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">default</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">bottom</option>
                <option name="height">350</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">I/O per second</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="refresh.display">none</option>
            </chart>
        </panel>
    </row>

    <!-- ######################################### Active Buttons #########################################  -->

    <row>
        <panel>
            <html>
                <div class="custom-sub-nav" style="text-align: center;">
                    <button class="button2_lowpadding glow" data-token-name="show_cpu" data-alt-label="HIDE EXTENDED CPU STATS" data-token-value="true">SHOW EXTENDED CPU STATS</button>
                </div>
            </html>
        </panel>
        <panel>
            <html>
                <div class="custom-sub-nav" style="text-align: center;">
                    <button class="button2_lowpadding glow" data-token-name="show_disks" data-alt-label="HIDE EXTENDED DISKS STATS" data-token-value="true">SHOW EXTENDED DISKS STATS</button>
                </div>
            </html>
        </panel>
    </row>

    <!-- ######################################### CPU #########################################  -->

    <row depends="$show_cpu$">
        <panel>
            <html>
                <div class="dashseparator">
                    <h1>Start extended CPU stats</h1>
                </div>
            </html>
        </panel>
    </row>

    <row depends="$show_cpu$" rejects="$is_LPAR$">
        <panel>
            <chart>
                <title>% CPU stats over time per category</title>
                <search depends="$show_cpu$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` (metric_name=os.unix.nmon.cpu.cpu_all.Sys_PCT OR metric_name=os.unix.nmon.cpu.cpu_all.User_PCT OR metric_name=os.unix.nmon.cpu.cpu_all.Wait_PCT OR metric_name=os.unix.nmon.cpu.cpu_all.Idle_PCT OR metric_name=os.unix.nmon.cpu.cpu_all.Steal_PCT) (host=$host$) by metric_name, host span=1m
| eval Sys_percent=case(metric_name=="os.unix.nmon.cpu.cpu_all.Sys_PCT", value), User_percent=case(metric_name=="os.unix.nmon.cpu.cpu_all.User_PCT", value), Wait_percent=case(metric_name=="os.unix.nmon.cpu.cpu_all.Wait_PCT", value), Idle_percent=case(metric_name=="os.unix.nmon.cpu.cpu_all.Idle_PCT", value), Steal_percent=case(metric_name=="os.unix.nmon.cpu.cpu_all.Steal_PCT", value)
| stats values(Sys_percent) as Sys_percent, values(User_percent) as User_percent, values(Wait_percent) as Wait_percent, values(Idle_percent) as Idle_percent, values(Steal_percent) as Steal_percent by _time, host
| timechart $span$
avg(Idle_percent) AS "Idle %",
avg(Sys_percent) AS "Sys %",
avg(User_percent) AS "User %",
avg(Wait_percent) AS "Wait %",
avg(Steal_percent) AS "Steal %"</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
                <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.text">%</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisTitleY2.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.axisY2.enabled">0</option>
                <option name="charting.axisY2.scale">inherit</option>
                <option name="charting.chart">area</option>
                <option name="charting.chart.bubbleMaximumSize">50</option>
                <option name="charting.chart.bubbleMinimumSize">10</option>
                <option name="charting.chart.bubbleSizeBy">area</option>
                <option name="charting.chart.nullValueMode">connect</option>
                <option name="charting.chart.showDataLabels">none</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">stacked</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">top</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.maximumNumber">100</option>
                <option name="height">500</option>
                <option name="refresh.display">none</option>
            </chart>
        </panel>
    </row>

    <row depends="$show_cpu$" rejects="$is_LPAR$">
        <panel>
            <chart>
                <title>% CPU stats over time per core</title>
                <search depends="$show_cpu$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.cpu.cpunn.* (host=$host$) by metric_name host span=1m
| `extract_metrics_cpu_all("Sys_PCT, User_PCT, Wait_PCT, Steal_PCT")`
| stats values(Sys_PCT) as Sys_PCT, values(User_PCT) as User_PCT, values(Wait_PCT) as Wait_PCT, values(Steal_PCT) as Steal_PCT by _time, host, cpu_core
| fillnull value=0 Sys_PCT,User_PCT,Wait_PCT,Steal_PCT
| search (cpu_core="*")
| eval cpu_PCT=(Sys_PCT+User_PCT+Wait_PCT+Steal_PCT)
| timechart `nmon_span` useother=f limit=0 avg(cpu_PCT) AS cpu_PCT by cpu_core</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
                <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.text">%</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisTitleY2.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.axisY2.enabled">0</option>
                <option name="charting.axisY2.scale">inherit</option>
                <option name="charting.chart">line</option>
                <option name="charting.chart.bubbleMaximumSize">50</option>
                <option name="charting.chart.bubbleMinimumSize">10</option>
                <option name="charting.chart.bubbleSizeBy">area</option>
                <option name="charting.chart.nullValueMode">connect</option>
                <option name="charting.chart.showDataLabels">none</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">stacked</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">top</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.maximumNumber">100</option>
                <option name="height">500</option>
                <option name="refresh.display">none</option>
            </chart>
        </panel>
    </row>

    <!-- This is for AIX LPARs -->

    <row depends="$show_cpu$ $is_LPAR$ $is_AIX$">
        <panel>
            <chart>
                <title>AIX LPAR statistics</title>
                <search depends="$show_cpu$ $is_LPAR$ $is_AIX$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` (metric_name="os.unix.nmon.cpu.lpar.VP_User_PCT" OR metric_name="os.unix.nmon.cpu.lpar.VP_Sys_PCT" OR metric_name="os.unix.nmon.cpu.lpar.VP_Wait_PCT" OR metric_name="os.unix.nmon.cpu.lpar.VP_Idle_PCT" OR metric_name="os.unix.nmon.cpu.lpar.PhysicalCPU" OR metric_name="os.unix.nmon.cpu.lpar.entitled" OR metric_name="os.unix.nmon.cpu.lpar.virtualCPUs") (host=$host$) by metric_name, OStype, host span=1m
| `def_lpar_load_cores`
| timechart $span$ max(lpar_load_cores) AS "max cpu load cores", avg(lpar_load_cores) AS "avg cpu load cores", max(entitled) as entitled, max(virtualCPUs) as virtualCPUs</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
                <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.text">Virtual CPUs</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisTitleY2.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.axisY2.enabled">0</option>
                <option name="charting.axisY2.scale">inherit</option>
                <option name="charting.chart">line</option>
                <option name="charting.chart.bubbleMaximumSize">50</option>
                <option name="charting.chart.bubbleMinimumSize">10</option>
                <option name="charting.chart.bubbleSizeBy">area</option>
                <option name="charting.chart.nullValueMode">connect</option>
                <option name="charting.chart.showDataLabels">none</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">default</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">top</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="height">500</option>
                <option name="refresh.display">none</option>
            </chart>
        </panel>
    </row>

    <row depends="$show_cpu$ $is_LPAR$ $is_AIX$">
        <panel>
            <chart>
                <title>AIX LPAR statistics per category</title>
                <search depends="$show_cpu$ $is_LPAR$ $is_AIX$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` (metric_name="os.unix.nmon.cpu.lpar.VP_User_PCT" OR metric_name="os.unix.nmon.cpu.lpar.VP_Sys_PCT" OR metric_name="os.unix.nmon.cpu.lpar.VP_Wait_PCT" OR metric_name="os.unix.nmon.cpu.lpar.VP_Idle_PCT" OR metric_name="os.unix.nmon.cpu.lpar.entitled" OR metric_name="os.unix.nmon.cpu.lpar.virtualCPUs") (host=$host$) by metric_name, OStype, host span=1m
| `def_lpar_load_aix_cores_by_cat`
| timechart $span$ avg(VP_Idle_PCT) AS VP_Idle_PCT, avg(VP_Sys_PCT) AS VP_Sys_PCT, avg(VP_User_PCT) AS VP_User_PCT, avg(VP_Wait_PCT) AS VP_Wait_PCT</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
                <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisTitleY2.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.axisY2.enabled">0</option>
                <option name="charting.axisY2.scale">inherit</option>
                <option name="charting.chart">area</option>
                <option name="charting.chart.bubbleMaximumSize">50</option>
                <option name="charting.chart.bubbleMinimumSize">10</option>
                <option name="charting.chart.bubbleSizeBy">area</option>
                <option name="charting.chart.nullValueMode">connect</option>
                <option name="charting.chart.showDataLabels">none</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">stacked100</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">top</option>
                <option name="height">500</option>
                <option name="refresh.display">none</option>
            </chart>
        </panel>
    </row>

    <row depends="$show_cpu$ $is_LPAR$ $is_AIX$">
        <panel>
            <chart rejects="$show_null_AIX_pooldata$">
                <title>AIX LPAR Pools statistics</title>
                <search depends="$show_cpu$ $is_LPAR$ $is_AIX$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` (metric_name="os.unix.nmon.cpu.lpar.poolCPUs" OR metric_name="os.unix.nmon.cpu.lpar.Pool_id" OR metric_name="os.unix.nmon.cpu.lpar.PoolIdle") (host=$host$) by metric_name, OStype, host span=1m
| `def_lpar_pool_load_aix_cores`
| timechart $span$ max(lpar_pool_usage) As lpar_pool_usage max(poolCPUs) AS poolCPUs</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
                <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.text">Virtual CPUs</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisTitleY2.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.axisY2.enabled">0</option>
                <option name="charting.axisY2.scale">inherit</option>
                <option name="charting.chart">line</option>
                <option name="charting.chart.bubbleMaximumSize">50</option>
                <option name="charting.chart.bubbleMinimumSize">10</option>
                <option name="charting.chart.bubbleSizeBy">area</option>
                <option name="charting.chart.nullValueMode">connect</option>
                <option name="charting.chart.showDataLabels">none</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">default</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">top</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="height">500</option>
                <option name="refresh.display">none</option>
            </chart>
            <html depends="$show_null_AIX_pooldata$">
                <p style="color:blue;margin-left:30px;font-size:14px"><b>AIX LPAR Pools statistics:</b> Search returned no results, this partition might not be allowed to retrieve the pool statistics it belongs to.</p>
            </html>
        </panel>
    </row>

    <!-- This is for PowerLinux LPARs -->

    <row depends="$show_cpu$ $is_LPAR$ $is_Linux$">
        <panel>
            <chart>
                <title>PowerLinux LPAR statistics</title>
                <search depends="$show_cpu$ $is_LPAR$ $is_Linux$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` (metric_name="os.unix.nmon.cpu.lpar.PhysicalCPU" OR metric_name="os.unix.nmon.cpu.lpar.partition_active_processors" OR metric_name="os.unix.nmon.cpu.lpar.partition_entitled_capacity") (host=$host$) by metric_name, host span=1m
| `def_lpar_load_linux_cores`
| timechart $span$ max(lpar_load_cores) AS "max cpu load cores", avg(lpar_load_cores) AS "avg cpu load cores", max(partition_active_processors) as partition_active_processors, max(partition_entitled_capacity) as partition_entitled_capacity</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
                <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.text">Virtual CPUs</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisTitleY2.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.axisY2.enabled">0</option>
                <option name="charting.axisY2.scale">inherit</option>
                <option name="charting.chart">line</option>
                <option name="charting.chart.bubbleMaximumSize">50</option>
                <option name="charting.chart.bubbleMinimumSize">10</option>
                <option name="charting.chart.bubbleSizeBy">area</option>
                <option name="charting.chart.nullValueMode">connect</option>
                <option name="charting.chart.showDataLabels">none</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">default</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">top</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="height">500</option>
                <option name="refresh.display">none</option>
            </chart>
        </panel>
    </row>

    <row depends="$show_cpu$ $is_LPAR$ $is_Linux$">
        <panel>
            <chart>
                <title>PowerLinux LPAR Pools statistics</title>
                <search depends="$show_cpu$ $is_LPAR$ $is_Linux$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` (metric_name="os.unix.nmon.cpu.lpar.smt_mode" OR metric_name="os.unix.nmon.cpu.lpar.pool_idle_time" OR metric_name="os.unix.nmon.cpu.lpar.pool_capacity") (host=$host$) by metric_name, host span=1m
| `def_lpar_pool_load_linux_cores`
| timechart $span$ max(lpar_pool_vp_usage) As lpar_pool_vp_usage max(pool_capacity) AS pool_capacity</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
                <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.text">Virtual CPUs</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisTitleY2.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.axisY2.enabled">0</option>
                <option name="charting.axisY2.scale">inherit</option>
                <option name="charting.chart">line</option>
                <option name="charting.chart.bubbleMaximumSize">50</option>
                <option name="charting.chart.bubbleMinimumSize">10</option>
                <option name="charting.chart.bubbleSizeBy">area</option>
                <option name="charting.chart.nullValueMode">connect</option>
                <option name="charting.chart.showDataLabels">none</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">default</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">top</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="height">500</option>
                <option name="refresh.display">none</option>
            </chart>
        </panel>
    </row>

    <!-- This is for Solaris -->

    <row depends="$show_cpu$ $is_Solaris$">
        <panel>
            <chart>
                <title>Solaris WML statistics per zone</title>
                <search depends="$show_cpu$ $is_Solaris$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.processes.wlmprojectcpu" (host=$host$) by metric_name, host, dimension_device span=1m
| timechart $span$ limit=0 useother=f max(value) As value by dimension_device</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
                <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.text">% CPU</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisTitleY2.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.axisY2.enabled">0</option>
                <option name="charting.axisY2.scale">inherit</option>
                <option name="charting.chart">area</option>
                <option name="charting.chart.bubbleMaximumSize">50</option>
                <option name="charting.chart.bubbleMinimumSize">10</option>
                <option name="charting.chart.bubbleSizeBy">area</option>
                <option name="charting.chart.nullValueMode">gaps</option>
                <option name="charting.chart.showDataLabels">none</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">stacked</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">top</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="height">500</option>
                <option name="refresh.display">none</option>
            </chart>
        </panel>
    </row>

    <row depends="$show_cpu$">
        <panel>
            <html>
                <div class="dashseparator">
                    <h1>End extended CPU stats</h1>
                </div>
            </html>
        </panel>
    </row>

    <!-- ######################################### DISKS #########################################  -->

    <!--  disks extended stats (DG*) -->

    <row depends="$show_disks$">
        <panel>
            <html>
                <div class="dashseparator">
                    <h1>Start extended Disks stats</h1>
                </div>
            </html>
        </panel>
    </row>

    <row depends="$show_disks$ $start_dg_stats_search$">
        <panel>
            <chart>
                <title>Avg I/O per sec over time - click on the chart to get by device view</title>
                <search depends="$show_disks$ $start_dg_stats_search$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.dgxfer" host=$host$ by dimension_device span=1m
| stats sum(value) as disk_total_iops by _time
| timechart $span$ avg(disk_total_iops) As disk_total_iops | trendline sma5(disk_total_iops) AS trend</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
                <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.text">I/O per sec</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisTitleY2.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.axisY2.enabled">0</option>
                <option name="charting.axisY2.scale">inherit</option>
                <option name="charting.chart">line</option>
                <option name="charting.chart.bubbleMaximumSize">50</option>
                <option name="charting.chart.bubbleMinimumSize">10</option>
                <option name="charting.chart.bubbleSizeBy">area</option>
                <option name="charting.chart.nullValueMode">gaps</option>
                <option name="charting.chart.showDataLabels">none</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">stacked</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">top</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="height">500</option>
                <option name="refresh.display">none</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$timerange.earliest$&latest=$timerange.latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.dgxfer" host=$host$ by dimension_device span=1m
| timechart useother=f limit=0 $span$ avg(value) As disk_total_iops by dimension_device&display.general.type=visualizations&display.page.search.tab=visualizations&display.visualizations.charting.chart=line
                        ]]>
                    </link>
                </drilldown>
            </chart>
        </panel>
        <panel>
            <chart>
                <title>Avg read/write I/O per sec over time - click on the chart to get by device view</title>
                <search depends="$show_disks$ $start_dg_stats_search$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.dg*" host=$host$ by metric_name, dimension_device span=1m
| `extract_metrics("dgxfer dgread dgwrite dgsize")`
| stats max(dgxfer) as disk_total_iops max(dgread) as disk_read_KB_per_sec max(dgwrite) as disk_write_KB_per_sec max(dgsize) as disk_block_size_KB by _time, dimension_device
| eval disk_read_iops=(disk_read_KB_per_sec/disk_block_size_KB), disk_write_iops=(disk_write_KB_per_sec/disk_block_size_KB)
| stats sum(disk_*) as "disk_*" by _time
| timechart $span$ avg(disk_read_iops) as disk_read_iops avg(disk_write_iops) as disk_write_iops</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
                <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.text">I/O per sec</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisTitleY2.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.axisY2.enabled">0</option>
                <option name="charting.axisY2.scale">inherit</option>
                <option name="charting.chart">line</option>
                <option name="charting.chart.bubbleMaximumSize">50</option>
                <option name="charting.chart.bubbleMinimumSize">10</option>
                <option name="charting.chart.bubbleSizeBy">area</option>
                <option name="charting.chart.nullValueMode">gaps</option>
                <option name="charting.chart.showDataLabels">none</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">stacked</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">top</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="height">500</option>
                <option name="refresh.display">none</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$timerange.earliest$&latest=$timerange.latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.dg*" host=$host$ by metric_name, dimension_device span=1m
| `extract_metrics("dgxfer dgread dgwrite dgsize")`
| stats max(dgxfer) as disk_total_iops max(dgread) as disk_read_KB_per_sec max(dgwrite) as disk_write_KB_per_sec max(dgsize) as disk_block_size_KB by _time, dimension_device
| eval disk_read_iops=(disk_read_KB_per_sec/disk_block_size_KB), disk_write_iops=(disk_write_KB_per_sec/disk_block_size_KB)
| timechart useother=f limit=0 $span$ avg(disk_read_iops) as disk_read_iops avg(disk_write_iops) as disk_write_iops by dimension_device&display.general.type=visualizations&display.page.search.tab=visualizations&display.visualizations.charting.chart=line
                        ]]>
                    </link>
                </drilldown>
            </chart>
        </panel>
    </row>

    <row depends="$show_disks$ $start_dg_stats_search$">
        <panel>
            <chart>
                <title>Avg % busy time - click on the chart to get by device view</title>
                <search depends="$show_disks$ $start_dg_stats_search$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.dgbusy" host=$host$ by host, dimension_device span=1m
| timechart $span$ avg(value) as disk_busy_time_pct | trendline sma5(disk_busy_time_pct) AS trend</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
                <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.text">% of time busy</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisTitleY2.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.axisY2.enabled">0</option>
                <option name="charting.axisY2.scale">inherit</option>
                <option name="charting.chart">line</option>
                <option name="charting.chart.bubbleMaximumSize">50</option>
                <option name="charting.chart.bubbleMinimumSize">10</option>
                <option name="charting.chart.bubbleSizeBy">area</option>
                <option name="charting.chart.nullValueMode">gaps</option>
                <option name="charting.chart.showDataLabels">none</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">stacked</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">top</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="height">500</option>
                <option name="refresh.display">none</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$timerange.earliest$&latest=$timerange.latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.dgbusy" host=$host$ by host, dimension_device span=1m
| timechart limit=0 useother=f $span$ avg(value) as disk_busy_time_pct by dimension_device&display.general.type=visualizations&display.page.search.tab=visualizations&display.visualizations.charting.chart=line
                        ]]>
                    </link>
                </drilldown>
            </chart>
        </panel>
        <panel>
            <chart>
                <title>Avg data transfer size over time - click on the chart to get by device view</title>
                <search depends="$show_disks$ $start_dg_stats_search$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.dgsize" host=$host$ by host, dimension_device span=1m
| timechart $span$ avg(value) as disk_block_size_KB | trendline sma5(disk_block_size_KB) AS trend</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
                <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.text">KBytes per transfer</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisTitleY2.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.axisY2.enabled">0</option>
                <option name="charting.axisY2.scale">inherit</option>
                <option name="charting.chart">line</option>
                <option name="charting.chart.bubbleMaximumSize">50</option>
                <option name="charting.chart.bubbleMinimumSize">10</option>
                <option name="charting.chart.bubbleSizeBy">area</option>
                <option name="charting.chart.nullValueMode">gaps</option>
                <option name="charting.chart.showDataLabels">none</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">stacked</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">top</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="height">500</option>
                <option name="refresh.display">none</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$timerange.earliest$&latest=$timerange.latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.dgsize" host=$host$ by host, dimension_device span=1m
| timechart limit=0 useother=f $span$ avg(value) as disk_block_size_KB by dimension_device&display.general.type=visualizations&display.page.search.tab=visualizations&display.visualizations.charting.chart=line
                        ]]>
                    </link>
                </drilldown>
            </chart>
        </panel>
    </row>

    <row depends="$show_disks$ $start_dg_stats_search$">
        <panel>
            <chart>
                <title>Avg read/write data rate (KBytes/sec) - click on the chart to get by device view</title>
                <search depends="$show_disks$ $start_dg_stats_search$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` (metric_name="os.unix.nmon.storage.dgread" OR metric_name="os.unix.nmon.storage.dgwrite") host=$host$ by host, metric_name, dimension_device span=1m
| `extract_metrics("dgread dgwrite")`
| stats values(dgread) as disk_read_KB_per_sec, values(dgwrite) as disk_write_KB_per_sec by _time, host, dimension_device
| timechart $span$ avg(disk_read_KB_per_sec) as disk_read_KB_per_sec, avg(disk_write_KB_per_sec) as disk_write_KB_per_sec</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
                <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.text">KBytes/sec</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisTitleY2.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.axisY2.enabled">0</option>
                <option name="charting.axisY2.scale">inherit</option>
                <option name="charting.chart">line</option>
                <option name="charting.chart.bubbleMaximumSize">50</option>
                <option name="charting.chart.bubbleMinimumSize">10</option>
                <option name="charting.chart.bubbleSizeBy">area</option>
                <option name="charting.chart.nullValueMode">gaps</option>
                <option name="charting.chart.showDataLabels">none</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">stacked</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">top</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="height">500</option>
                <option name="refresh.display">none</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$timerange.earliest$&latest=$timerange.latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` (metric_name="os.unix.nmon.storage.dgread" OR metric_name="os.unix.nmon.storage.dgwrite") host=$host$ by metric_name, dimension_device span=1m
| `extract_metrics("dgread dgwrite")`
| stats values(dgread) as disk_read_KB_per_sec, values(dgwrite) as disk_write_KB_per_sec by _time, dimension_device
| timechart useother=f limit=0 $span$ avg(disk_read_KB_per_sec) as disk_read_KB_per_sec, avg(disk_write_KB_per_sec) as disk_write_KB_per_sec by dimension_device&display.general.type=visualizations&display.page.search.tab=visualizations&display.visualizations.charting.chart=line
                        ]]>
                    </link>
                </drilldown>
            </chart>
        </panel>
        <panel>
            <chart>
                <title>Avg read/write service time (ms) - click on the chart to get by device view</title>
                <search depends="$show_disks$ $start_dg_stats_search$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` (metric_name="os.unix.nmon.storage.dgreadserv" OR metric_name="os.unix.nmon.storage.dgwriteserv") host=$host$ by host, metric_name, dimension_device span=1m
| `extract_metrics("dgreadserv dgwriteserv")`
| stats values(dgreadserv) as disk_read_service_time_ms, values(dgwriteserv) as disk_write_service_time_ms by _time, host, dimension_device
| timechart $span$ avg(disk_read_service_time_ms) as disk_read_service_time_ms, avg(disk_write_service_time_ms) as disk_write_service_time_ms</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
                <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.text">Milliseconds (ms)</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisTitleY2.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.axisY2.enabled">0</option>
                <option name="charting.axisY2.scale">inherit</option>
                <option name="charting.chart">line</option>
                <option name="charting.chart.bubbleMaximumSize">50</option>
                <option name="charting.chart.bubbleMinimumSize">10</option>
                <option name="charting.chart.bubbleSizeBy">area</option>
                <option name="charting.chart.nullValueMode">gaps</option>
                <option name="charting.chart.showDataLabels">none</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">stacked</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">top</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="height">500</option>
                <option name="refresh.display">none</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$timerange.earliest$&latest=$timerange.latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` (metric_name="os.unix.nmon.storage.dgreadserv" OR metric_name="os.unix.nmon.storage.dgwriteserv") host=$host$ by host, metric_name, dimension_device span=1m
| `extract_metrics("dgreadserv dgwriteserv")`
| stats values(dgreadserv) as disk_read_service_time_ms, values(dgwriteserv) as disk_write_service_time_ms by _time, host, dimension_device
| timechart useother=f limit=0 $span$ avg(disk_read_service_time_ms) as disk_read_service_time_ms, avg(disk_write_service_time_ms) as disk_write_service_time_ms by dimension_device&display.general.type=visualizations&display.page.search.tab=visualizations&display.visualizations.charting.chart=line
                        ]]>
                    </link>
                </drilldown>
            </chart>
        </panel>
    </row>

    <!--  disks standard stats (DISK*) -->

    <row depends="$show_disks$ $start_disk_stats_search$">
        <panel>
            <chart>
                <title>Avg I/O per sec over time</title>
                <search depends="$show_disks$ $start_disk_stats_search$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.diskxfer" host=$host$ by host, dimension_device span=1m
| stats sum(value) as disk_total_iops by _time, host
| timechart $span$ avg(disk_total_iops) As disk_total_iops | trendline sma5(disk_total_iops) AS trend</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
                <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.text">I/O per sec</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisTitleY2.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.axisY2.enabled">0</option>
                <option name="charting.axisY2.scale">inherit</option>
                <option name="charting.chart">line</option>
                <option name="charting.chart.bubbleMaximumSize">50</option>
                <option name="charting.chart.bubbleMinimumSize">10</option>
                <option name="charting.chart.bubbleSizeBy">area</option>
                <option name="charting.chart.nullValueMode">gaps</option>
                <option name="charting.chart.showDataLabels">none</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">stacked</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">top</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="height">500</option>
                <option name="refresh.display">none</option>
            </chart>
        </panel>
        <panel>
            <chart>
                <title>Avg % time busy disk over time</title>
                <search depends="$show_disks$ $start_disk_stats_search$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.diskbusy" host=$host$ by host, dimension_device span=1m
| timechart $span$ avg(value) as disk_busy_time_pct | trendline sma5(disk_busy_time_pct) AS trend</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
                <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.text">% of time busy</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisTitleY2.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.axisY2.enabled">0</option>
                <option name="charting.axisY2.scale">inherit</option>
                <option name="charting.chart">line</option>
                <option name="charting.chart.bubbleMaximumSize">50</option>
                <option name="charting.chart.bubbleMinimumSize">10</option>
                <option name="charting.chart.bubbleSizeBy">area</option>
                <option name="charting.chart.nullValueMode">gaps</option>
                <option name="charting.chart.showDataLabels">none</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">stacked</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">top</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="height">500</option>
                <option name="refresh.display">none</option>
            </chart>
        </panel>
    </row>

    <row depends="$show_disks$ $start_disk_stats_search$">
        <panel>
            <chart>
                <title>Avg data transfer size over time</title>
                <search depends="$show_disks$ $start_disk_stats_search$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.diskbsize" host=$host$ by host, dimension_device span=1m
| timechart $span$ avg(value) as disk_block_size_KB | trendline sma5(disk_block_size_KB) AS trend</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
                <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.text">KBytes per transfer</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisTitleY2.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.axisY2.enabled">0</option>
                <option name="charting.axisY2.scale">inherit</option>
                <option name="charting.chart">line</option>
                <option name="charting.chart.bubbleMaximumSize">50</option>
                <option name="charting.chart.bubbleMinimumSize">10</option>
                <option name="charting.chart.bubbleSizeBy">area</option>
                <option name="charting.chart.nullValueMode">gaps</option>
                <option name="charting.chart.showDataLabels">none</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">stacked</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">top</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="height">500</option>
                <option name="refresh.display">none</option>
            </chart>
        </panel>
        <panel>
            <chart>
                <title>Avg read/write data rate (KBytes/sec) over time</title>
                <search depends="$show_disks$ $start_disk_stats_search$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` (metric_name="os.unix.nmon.storage.diskread" OR metric_name="os.unix.nmon.storage.diskwrite") host=$host$ by host, metric_name, dimension_device span=1m
| `extract_metrics("diskread diskwrite")`
| stats values(diskread) as disk_read_KB_per_sec, values(diskwrite) as disk_write_KB_per_sec by _time, host, dimension_device
| timechart $span$ avg(disk_read_KB_per_sec) as disk_read_KB_per_sec, avg(disk_write_KB_per_sec) as disk_write_KB_per_sec</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
                <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.text">KBytes/sec</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisTitleY2.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.axisY2.enabled">0</option>
                <option name="charting.axisY2.scale">inherit</option>
                <option name="charting.chart">line</option>
                <option name="charting.chart.bubbleMaximumSize">50</option>
                <option name="charting.chart.bubbleMinimumSize">10</option>
                <option name="charting.chart.bubbleSizeBy">area</option>
                <option name="charting.chart.nullValueMode">gaps</option>
                <option name="charting.chart.showDataLabels">none</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">stacked</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">top</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="height">500</option>
                <option name="refresh.display">none</option>
            </chart>
        </panel>
    </row>

    <row depends="$show_disks$">
        <panel>
            <html>
                <div class="dashseparator">
                    <h1>End extended Disks stats</h1>
                </div>
            </html>
        </panel>
    </row>

    <row>
        <panel id="mem">
            <title>Memory Statistics</title>

            <chart>
                <search id="MEMtimechart">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` `def_memory_all_os_metric_filters` host=$host$ by OStype, host, metric_name span=1m
| `def_memory_load_percent`
| timechart $span$ dedup_splitvals=t avg(mem_used_effective_PCT) AS mem_used_PCT, avg(swap_used_effective_PCT) AS swap_used_PCT</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.chart">line</option>
                <option name="charting.chart.nullValueMode">gaps</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">default</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">bottom</option>
                <option name="height">350</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">Percentage (%)</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.maximumNumber">100</option>
                <option name="refresh.display">none</option>
            </chart>
        </panel>

        <panel id="process">
            <title>Top 20 processes CPU Statistics</title>

            <chart rejects="$show_null_top$">
                <search id="TOPtimechart" depends="$start_top_searches$">
                    <query>| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.processes.top.pct_CPU" host=$host$ by host, metric_name, dimension_Command, dimension_PID span=1m
| stats sum(value) as pct_CPU by _time, host, metric_name, dimension_Command
| appendcols [ | mstats latest(_value) as logical_cpus where `nmon_metrics_index` metric_name="os.unix.nmon.cpu.cpu_all.logical_cpus" host=$host$ by host ]
| appendcols [ | mstats latest(_value) as virtual_cpus where `nmon_metrics_index` metric_name="os.unix.nmon.cpu.cpu_all.virtual_cpus" host=$host$ by host ]
| filldown logical_cpus, virtual_cpus
| stats values(pct_CPU) as pct_CPU, values(logical_cpus) as logical_cpus, values(virtual_cpus) as virtual_cpus by _time, host, dimension_Command
| eval usage_per_core=(pct_CPU/100), smt_threads=(logical_cpus/virtual_cpus)
| eval usage_per_core=case(isnum(smt_threads) AND smt_threads&gt;="2", usage_per_core*1.2, isnum(smt_threads) AND smt_threads&gt;="4", usage_per_core*1.4, isnum(usage_per_core), usage_per_core)
| timechart $span$ useother=f limit="20" max(usage_per_core) as "CPU Usage per core" by dimension_Command</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.chart">column</option>
                <option name="charting.chart.nullValueMode">gaps</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">stacked</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">bottom</option>
                <option name="height">350</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Logical Core</option>
                <option name="refresh.display">none</option>
            </chart>

            <html depends="$show_null_top$">
                <p style="color:blue;margin-left:30px;font-size:14px">Search returned no results, TOP collection (processes activity) has not been activated or no processes were captured due to lack of activity</p>
            </html>

        </panel>
    </row>

    <!-- ######################################### Active Buttons #########################################  -->

    <row>
        <panel>
            <html>
                <div class="custom-sub-nav" style="text-align: center;">
                    <button class="button2_lowpadding glow" data-token-name="show_memory" data-alt-label="HIDE EXTENDED MEMORY STATS" data-token-value="true">SHOW EXTENDED MEMORY STATS</button>
                </div>
            </html>
        </panel>
        <panel>
            <html>
                <div class="custom-sub-nav" style="text-align: center;">
                    <button class="button2_lowpadding glow" data-token-name="show_processes" data-alt-label="HIDE EXTENDED PROCESSES STATS" data-token-value="true">SHOW EXTENDED PROCESSES STATS</button>
                </div>
            </html>
        </panel>
    </row>

    <!-- ######################################### Memory #########################################  -->

    <row depends="$show_memory$">
        <panel>
            <html>
                <div class="dashseparator">
                    <h1>Start extended Memory stats</h1>
                </div>
            </html>
        </panel>
    </row>

    <search id="linux_memory_stats" depends="$show_memory$ $is_Linux$">
        <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.memory.mem.*" host=$host$ by OStype, host, metric_name span=1m
| `def_memory_volume_MB`
| timechart $span$ dedup_splitvals=t avg(memtotal) AS mem_total_MB, avg(mem_used_effective) as mem_used_effective_MB, avg(buffers) as mem_buffers_MB, avg(cached) as mem_cached_MB, avg(memfree) as mem_free_MB,
avg(swapfree) as swap_free_MB, avg(swap_used_effective) as swap_used_effective_MB, avg(swapcached) as swap_cached_MB, avg(swaptotal) as swap_total_MB</query>
        <earliest>$timerange.earliest$</earliest>
        <latest>$timerange.latest$</latest>
        <refresh>$refresh$</refresh>
        <refreshType>delay</refreshType>
    </search>

    <search id="AIX_mem_memory_stats" depends="$show_memory$ $is_AIX$">
        <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.memory.mem.*" host=$host$ by OStype, host, metric_name span=1m
| `def_memory_volume_MB`
| eval Real_used_MB=(Real_total_MB-Real_free_MB), Virtual_used_MB=(Virtual_total_MB-Virtual_free_MB)
| timechart $span$ avg(Real_total_MB) AS Real_total_MB, avg(Real_used_MB) AS Real_used_MB, avg(Virtual_total_MB) AS Virtual_total_MB, avg(Virtual_used_MB) AS Virtual_used_MB</query>
        <earliest>$timerange.earliest$</earliest>
        <latest>$timerange.latest$</latest>
        <refresh>$refresh$</refresh>
        <refreshType>delay</refreshType>
    </search>

    <search id="AIX_memnew_memory_stats" depends="$show_memory$ $is_AIX$">
        <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.memory.memnew.*" host=$host$ by OStype, host, metric_name span=1m
| rex field="metric_name" "os.unix.nmon.memory.memnew.(?&lt;metric&gt;.*)"
| eval {metric}=value
| stats avg(Free_PCT) AS Free_PCT avg(FScache_PCT) AS FScache_PCT avg(memused_PCT) AS memused_PCT, avg(Process_PCT) AS Process_PCT avg(System_PCT) AS System_PCT by _time, host</query>
        <earliest>$timerange.earliest$</earliest>
        <latest>$timerange.latest$</latest>
        <refresh>$refresh$</refresh>
        <refreshType>delay</refreshType>
    </search>

    <search id="Solaris_MEM_real" depends="$show_memory$ $is_Solaris$">
        <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.memory.mem.*" host=$host$ by OStype, host, metric_name span=1m
| `def_memory_volume_MB`
| timechart $span$
avg(mem_used_effective) AS mem_used_MB, avg(memfree) AS mem_free_MB, avg(memtotal) AS mem_total_MB</query>
        <earliest>$timerange.earliest$</earliest>
        <latest>$timerange.latest$</latest>
        <refresh>$refresh$</refresh>
        <refreshType>delay</refreshType>
    </search>

    <search id="Solaris_MEM_swap" depends="$show_memory$ $is_Solaris$">
        <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.memory.mem.*" host=$host$ by OStype, host, metric_name span=1m
| `def_memory_volume_MB`
| timechart $span$
avg(swap_used_effective) AS swap_used_MB, avg(swapfree) AS swap_free_MB, avg(swaptotal) AS swap_total_MB</query>
        <earliest>$timerange.earliest$</earliest>
        <latest>$timerange.latest$</latest>
        <refresh>$refresh$</refresh>
        <refreshType>delay</refreshType>
    </search>

    <row depends="$show_memory$">
        <panel>
            <chart depends="$is_Linux$">
                <title>Memory usage (MB) by main metrics</title>
                <search base="linux_memory_stats">
                    <query>fields _time, *mem_free_MB*, *mem_cached_MB*, *mem_buffers_MB*, *mem_used_effective_MB*, *mem_total_MB*</query>
                </search>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.chart">area</option>
                <option name="charting.chart.nullValueMode">connect</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">stacked</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">bottom</option>
                <option name="height">500</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">volume (MB)</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
                <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
                <option name="charting.axisTitleY2.visibility">visible</option>
                <option name="charting.axisY2.enabled">0</option>
                <option name="charting.axisY2.scale">inherit</option>
                <option name="charting.chart.bubbleMaximumSize">50</option>
                <option name="charting.chart.bubbleMinimumSize">10</option>
                <option name="charting.chart.bubbleSizeBy">area</option>
                <option name="charting.chart.overlayFields">mem_total_MB</option>
                <option name="charting.chart.showDataLabels">none</option>
                <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
                <option name="charting.fieldColors">{"mem_total_MB": 0xe50000}</option>
                <option name="refresh.display">none</option>
            </chart>
            <chart depends="$is_AIX$">
                <title>AIX % memory allocation by category</title>
                <search base="AIX_memnew_memory_stats">
                    <query>fields _time,Free_PCT,FScache_PCT,Process_PCT,System_PCT</query>
                </search>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.chart">area</option>
                <option name="charting.chart.nullValueMode">connect</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">stacked</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">bottom</option>
                <option name="height">500</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">Percentage (%)</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.maximumNumber">100</option>
                <option name="refresh.display">none</option>
            </chart>
            <chart depends="$is_Solaris$">
                <title>Solaris memory usage (MB)</title>
                <search base="Solaris_MEM_real">
                    <query>fields _time,mem_free_MB,mem_used_MB,mem_total_MB</query>
                </search>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.chart">area</option>
                <option name="charting.chart.nullValueMode">connect</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">stacked</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">bottom</option>
                <option name="height">500</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">Megabytes (MB)</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.chart.overlayFields">mem_total_MB</option>
                <option name="charting.fieldColors">{"mem_total_MB": 0xe50000}</option>
                <option name="refresh.display">none</option>
            </chart>
        </panel>

        <panel>
            <chart depends="$is_Linux$">
                <title>Swap effective used/cached/free/global (MB)</title>
                <search base="linux_memory_stats">
                    <query>fields _time, *swap_free_MB*, *swap_used_effective_MB*, *swap_cached_MB*, *swap_total_MB*</query>
                </search>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.chart">area</option>
                <option name="charting.chart.nullValueMode">connect</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">stacked</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">bottom</option>
                <option name="height">500</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">volume (MB)</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
                <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
                <option name="charting.axisTitleY2.visibility">visible</option>
                <option name="charting.axisY2.enabled">0</option>
                <option name="charting.axisY2.scale">inherit</option>
                <option name="charting.chart.bubbleMaximumSize">50</option>
                <option name="charting.chart.bubbleMinimumSize">10</option>
                <option name="charting.chart.bubbleSizeBy">area</option>
                <option name="charting.chart.overlayFields">swap_total_MB</option>
                <option name="charting.chart.showDataLabels">none</option>
                <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
                <option name="charting.fieldColors">{"swap_total_MB": 0xe50000}</option>
                <option name="refresh.display">none</option>
            </chart>
            <chart depends="$is_AIX$">
                <title>AIX paging Space usage (MB)</title>
                <search base="AIX_mem_memory_stats">
                    <query>fields _time,Virtual_total_MB,Virtual_used_MB</query>
                </search>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.chart">area</option>
                <option name="charting.chart.nullValueMode">connect</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">stacked</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">bottom</option>
                <option name="height">500</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">Megabytes (MB)</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Virtual_total_MB</option>
                <option name="charting.chart.overlayFields">Virtual_total_MB</option>
                <option name="charting.fieldColors">{"Virtual_total_MB": 0xe50000}</option>
                <option name="refresh.display">none</option>
            </chart>
            <chart depends="$is_Solaris$">
                <title>Solaris swap usage (MB)</title>
                <search base="Solaris_MEM_swap">
                    <query>fields _time,swap_free_MB,swap_used_MB,swap_total_MB</query>
                </search>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.chart">area</option>
                <option name="charting.chart.nullValueMode">connect</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">stacked</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">bottom</option>
                <option name="height">500</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">Megabytes (MB)</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.chart.overlayFields">swap_total_MB</option>
                <option name="charting.fieldColors">{"swap_total_MB": 0xe50000}</option>
                <option name="refresh.display">none</option>
            </chart>
        </panel>
    </row>

    <row depends="$show_memory$">
        <panel>
            <html>
                <div class="dashseparator">
                    <h1>End extended Memory stats</h1>
                </div>
            </html>
        </panel>
    </row>

    <!-- ######################################### Processes #########################################  -->

    <row depends="$show_processes$">
        <panel>
            <html>
                <div class="dashseparator">
                    <h1>Start extended processes stats</h1>
                </div>
            </html>
        </panel>
    </row>

    <row depends="$show_processes$">
        <panel>

            <single>
                <search base="TOPSearch">
                    <query>head 1 | fields Command</query>
                </search>
                <option name="drilldown">none</option>
                <option name="underLabel">TOP Process</option>
                <option name="numberPrecision">0.00</option>
                <option name="unit">Command</option>
                <option name="unitPosition">before</option>
                <option name="refresh.display">none</option>
            </single>

            <single>
                <search base="TOPSearch">
                    <query>head 1 | fields avg_usage_per_core</query>
                </search>
                <option name="drilldown">none</option>
                <option name="underLabel">Average Conso for this Command</option>
                <option name="numberPrecision">0.000</option>
                <option name="unit">core conso</option>
                <option name="unitPosition">before</option>
                <option name="refresh.display">none</option>
            </single>

            <single>
                <search base="TOPSearch">
                    <query>head 1 | fields max_usage_per_core</query>
                </search>
                <option name="drilldown">none</option>
                <option name="underLabel">Max Conso for this Command</option>
                <option name="numberPrecision">0.000</option>
                <option name="unit">core conso</option>
                <option name="unitPosition">before</option>
                <option name="refresh.display">none</option>
            </single>

        </panel>
    </row>

    <row depends="$show_processes$">

        <!-- Table stats of CPU processes usage -->

        <panel>
            <table>
                <title>Table stats: CPU Usage in logical core per Command invocation</title>
                <search depends="$show_processes$ $start_top_searches$">
                    <query>| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.processes.top.pct_CPU" host=$host$ by host, metric_name, dimension_Command, dimension_PID span=1m
| stats sum(value) as pct_CPU by _time, host, metric_name, dimension_Command
| appendcols [ | mstats latest(_value) as logical_cpus where `nmon_metrics_index` metric_name="os.unix.nmon.cpu.cpu_all.logical_cpus" host=GMD-LAPTOP by host ]
| appendcols [ | mstats latest(_value) as virtual_cpus where `nmon_metrics_index` metric_name="os.unix.nmon.cpu.cpu_all.virtual_cpus" host=GMD-LAPTOP by host ]
| filldown logical_cpus, virtual_cpus
| stats values(pct_CPU) as pct_CPU, values(logical_cpus) as logical_cpus, values(virtual_cpus) as virtual_cpus by _time, host, dimension_Command
| eval usage_per_core=(pct_CPU/100), smt_threads=(logical_cpus/virtual_cpus)
| eval usage_per_core=case(isnum(smt_threads) AND smt_threads&gt;="2", usage_per_core*1.2, isnum(smt_threads) AND smt_threads&gt;="4", usage_per_core*1.4, isnum(usage_per_core), usage_per_core)
| stats max(usage_per_core) as "max CPU usage per core", avg(usage_per_core) as "avg CPU usage per core", sparkline(max(usage_per_core)) As sparkline by dimension_Command | rename dimension_Command as Command
| foreach *CPU* [ eval &lt;&lt;FIELD&gt;&gt;=round('&lt;&lt;FIELD&gt;&gt;', 3) ]
| sort - "max CPU usage per core"</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="wrap">true</option>
                <option name="rowNumbers">false</option>
                <option name="dataOverlayMode">none</option>
                <option name="drilldown">cell</option>
                <option name="count">10</option>
                <option name="refresh.display">none</option>
                <!-- Set sparkline options here; make sure that field matches field name of the search results -->
                <format type="sparkline" field="sparkline">
                    <option name="lineColor">#5379af</option>
                    <option name="fillColor">#CCDDFF</option>
                    <option name="lineWidth">1</option>
                    <option name="height">25</option>
                </format>
            </table>
        </panel>

        <!-- Table stats of Memory processes usage -->

        <panel>
            <table depends="$is_Linux$">
                <title>Table stats: Memory Usage per command invocation</title>
                <search depends="$is_Linux$ $show_processes$ $start_top_searches$">
                    <query>| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.processes.top.ResSet" host=$host$ by host, metric_name, dimension_Command, dimension_PID span=1m
| stats sum(value) as ResSet by _time, host, metric_name, dimension_Command
| eval Used_Mem_MB=((ResSet)/1024)
| stats sum(Used_Mem_MB) As value by _time, dimension_Command
| stats max(value) as "max memory usage (MB)", avg(value) as "avg memory usage (MB)", sparkline(max(value)) as sparkline by dimension_Command
| foreach *MB* [ eval &lt;&lt;FIELD&gt;&gt;=round('&lt;&lt;FIELD&gt;&gt;', 0) ]
| sort - "max memory usage (MB)"</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="wrap">true</option>
                <option name="rowNumbers">false</option>
                <option name="dataOverlayMode">none</option>
                <option name="drilldown">cell</option>
                <option name="count">10</option>
                <option name="refresh.display">none</option>
                <!-- Set sparkline options here; make sure that field matches field name of the search results -->
                <format type="sparkline" field="sparkline">
                    <option name="lineColor">#5379af</option>
                    <option name="fillColor">#CCDDFF</option>
                    <option name="lineWidth">1</option>
                    <option name="height">25</option>
                </format>
            </table>
            <table depends="$is_AIX$">
                <title>Table stats: Memory Usage per command invocation</title>
                <search depends="$is_AIX$ $show_processes$ $start_top_searches$">
                    <query>| mstats max(_value) as value where `nmon_metrics_index` (metric_name="os.unix.nmon.processes.top.ResText" OR metric_name="os.unix.nmon.processes.top.ResData") host=$host$ by host, metric_name, dimension_Command, dimension_PID span=1m
| stats sum(value) as value by _time, host, metric_name, dimension_Command
| rex field="metric_name" "os.unix.nmon.processes.top.(?&lt;metric&gt;.*)"
| eval {metric}=value
| stats values(ResText) as ResText, values(ResData) as ResData by _time, host, dimension_Command
| fillnull value=0 ResText ResData
| eval Used_Mem_MB=((ResData+ResText)/1024)
| stats sum(Used_Mem_MB) As value by _time, host, dimension_Command
| stats max(value) as max_Used_Mem_MB, avg(value) as avg_Used_Mem_MB, sparkline(max(value)) as sparkline by dimension_Command | eval max_Used_Mem_MB=round(max_Used_Mem_MB,2) | eval avg_Used_Mem_MB=round(avg_Used_Mem_MB,2)
| sort - "avg_Used_Mem_MB"
| rename max_Used_Mem_MB AS "max memory usage (MB)", avg_Used_Mem_MB AS "avg memory usage (MB)"</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="wrap">true</option>
                <option name="rowNumbers">false</option>
                <option name="dataOverlayMode">none</option>
                <option name="drilldown">cell</option>
                <option name="count">10</option>
                <option name="refresh.display">none</option>
                <!-- Set sparkline options here; make sure that field matches field name of the search results -->
                <format type="sparkline" field="sparkline">
                    <option name="lineColor">#5379af</option>
                    <option name="fillColor">#CCDDFF</option>
                    <option name="lineWidth">1</option>
                    <option name="height">25</option>
                </format>
            </table>
            <table depends="$is_Solaris$">
                <title>Table stats: Physical Memory Usage per command invocation</title>
                <search depends="$is_Solaris$ $show_processes$ $start_top_searches$">
                    <query>| mstats max(_value) as ResSize where `nmon_metrics_index` metric_name="os.unix.nmon.processes.top.ResSize" host=$host$ by host, metric_name, dimension_Command, dimension_PID span=1m
| stats sum(value) as value by _time, host, metric_name, dimension_Command
| eval Phys_Mem_MB=round(((ResSize)/1024),2)
| stats sum(Phys_Mem_MB) As value by _time, host, dimension_Command
| stats max(value) as "max memory usage (MB)", avg(value) as "avg memory usage (MB)", sparkline(max(value)) as sparkline by dimension_Command
| foreach *MB* [ eval &lt;&lt;FIELD&gt;&gt;=round('&lt;&lt;FIELD&gt;&gt;', 0) ]
| sort - "max memory usage (MB)"</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="wrap">true</option>
                <option name="rowNumbers">false</option>
                <option name="dataOverlayMode">none</option>
                <option name="drilldown">cell</option>
                <option name="count">10</option>
                <option name="refresh.display">none</option>
                <!-- Set sparkline options here; make sure that field matches field name of the search results -->
                <format type="sparkline" field="sparkline">
                    <option name="lineColor">#5379af</option>
                    <option name="fillColor">#CCDDFF</option>
                    <option name="lineWidth">1</option>
                    <option name="height">25</option>
                </format>
            </table>
        </panel>
    </row>

    <row depends="$show_processes$">
        <panel>
            <html>
                <div class="dashseparator">
                    <h1>End extended processes stats</h1>
                </div>
            </html>
        </panel>
    </row>

    <row>
        <panel id="network">
            <title>Inbound/Outbound network traffic</title>
            <chart>
                <search>
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.network.net host=$host$ (dimension_device!="*lo*") by metric_name, host, dimension_device span=1m
| where value&gt;0
| eval traffic_type=case(match(dimension_device, ".+read.+"), "Inbound", match(dimension_device, ".+write.+"), "Outbound")
| eval value=case(traffic_type="Outbound", "-" . value, traffic_type="Inbound", value)
| timechart $span$ avg(value) as value by traffic_type</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <sampleRatio>1</sampleRatio>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
                <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.text">KBps</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisTitleY2.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.axisY2.enabled">0</option>
                <option name="charting.axisY2.scale">inherit</option>
                <option name="charting.chart">area</option>
                <option name="charting.chart.bubbleMaximumSize">50</option>
                <option name="charting.chart.bubbleMinimumSize">10</option>
                <option name="charting.chart.bubbleSizeBy">area</option>
                <option name="charting.chart.nullValueMode">gaps</option>
                <option name="charting.chart.showDataLabels">none</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">default</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.fieldColors">{Inbound: 0xBDBD5E, Outbound: 0x5F7396}</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">bottom</option>
                <option name="height">350</option>
                <option name="charting.axisTitleX.text">Time</option>
            </chart>
        </panel>
    </row>

    <row>
        <panel id="fs_df_storage" depends="$start_df_storage_search$">
            <title>File System usage statistics (external DF_STORAGE collection)</title>
            <table id="tablebar">
                <search depends="$start_df_storage_search$">
                    <query>| mstats latest(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.df_storage.*" host=$host$ by host, metric_name, dimension_mount
| eval Available=case(metric_name=="os.unix.nmon.storage.df_storage.Available", value), Use_pct=case(metric_name=="os.unix.nmon.storage.df_storage.Use_pct", value), Used=case(metric_name=="os.unix.nmon.storage.df_storage.Used", value), blocks=case(metric_name=="os.unix.nmon.storage.df_storage.blocks", value)
| stats first(Available) as Available, first(Use_pct) as Use_pct, first(Used) as Used, first(blocks) as blocks by host, dimension_mount
| rename dimension_mount as mount
| eval storage_free=blocks-Used, storage_free_percent=(100-Use_pct)
| rename Use_pct as storage_used_percent, blocks as storage, Used as storage_used, Available as storage_free
| eval {metric}=value
| foreach storage, storage_free, storage_used [ eval &lt;&lt;FIELD&gt;&gt; = round('&lt;&lt;FIELD&gt;&gt;'/1024/1024, 2) ]
| foreach storage*percent [ eval &lt;&lt;FIELD&gt;&gt; = round('&lt;&lt;FIELD&gt;&gt;', 2) ]
| rename storage as "storage (GB)", storage_free as "storage free (GB)", storage_used as "storage used (GB)", storage_free_percent as "storage free (%)", storage_used_percent as "storage used (%)"
| eval UsedPct=if(isnum('storage used (%)'), 'storage used (%)', 0 )
| fields mount, "storage (GB)", "storage free (GB)", "storage used (GB)", "storage free (%)", "storage used (%)", UsedPct
| appendpipe [ stats sum("storage (GB)") as "storage (GB)", sum("storage free (GB)") as "storage free (GB)", sum("storage used (GB)") as "storage used (GB)" ]
| eval "storage free (%)" = if(isnull('storage free (%)'), (('storage free (GB)'/'storage (GB)')*100), 'storage free (%)'), "storage used (%)" = if(isnull('storage used (%)'), (('storage used (GB)'/'storage (GB)')*100), 'storage used (%)'), UsedPct = if(isnull(UsedPct), 'storage used (%)', UsedPct)
| fillnull value="*** TOTAL GB / AVERAGE % ****" mount
| foreach storage*%* UsedPct [ eval &lt;&lt;FIELD&gt;&gt; = round('&lt;&lt;FIELD&gt;&gt;', 2) ]</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="wrap">true</option>
                <option name="rowNumbers">false</option>
                <option name="dataOverlayMode">none</option>
                <option name="drilldown">row</option>
                <option name="count">10</option>
                <option name="refresh.display">none</option>
            </table>
        </panel>
        <panel id="fs_jfs" depends="$start_jfs_storage_search$">
            <title>File System Percent utilization (internal JFSFILE collection)</title>
            <table>
                <search depends="$start_jfs_storage_search$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.jfsfile" host=$host$ by host, dimension_mount span=1m
| stats max(value) AS max_value, avg(value) AS avg_value, min(value) AS min_value, latest(value) AS UsedPct by dimension_mount
| sort limit=0 dimension_mount | rename dimension_mount AS "Mount point"
| eval value=round(value,2)
| fields "Mount point",max_value, avg_value, min_value, UsedPct | eval avg_value=round(avg_value,2)
| rename max_value AS "Max value in period (%)", avg_value AS "Average value in period (%)", min_value AS "Min value in Period (%)"</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="wrap">true</option>
                <option name="rowNumbers">false</option>
                <option name="dataOverlayMode">none</option>
                <option name="drilldown">row</option>
                <option name="count">10</option>
                <option name="refresh.display">none</option>
            </table>
        </panel>
    </row>

    <!-- ######################################### Active Buttons #########################################  -->

    <row>
        <panel depends="$start_df_storage_search$">
            <html>
                <div class="custom-sub-nav" style="text-align: center;">
                    <button class="button2_lowpadding glow" data-token-name="show_df_storage_overtime" data-alt-label="HIDE FILE-SYSTEMS OVER TIME" data-token-value="true">SHOW FILE-SYSTEMS EVOLUTION OVER TIME</button>
                </div>
            </html>
        </panel>
        <panel depends="$start_jfs_storage_search$">
            <html>
                <div class="custom-sub-nav" style="text-align: center;">
                    <button class="button2_lowpadding glow" data-token-name="show_jfs_storage_overtime" data-alt-label="HIDE FILE-SYSTEMS OVER TIME" data-token-value="true">SHOW FILE-SYSTEMS EVOLUTION OVER TIME</button>
                </div>
            </html>
        </panel>
    </row>

    <!-- ######################################### filesystem over time #########################################  -->

    <row depends="$start_df_storage_search$ $show_df_storage_overtime$">
        <panel>
            <title>File systems utilization evolution over time</title>

            <input type="text" token="df_storage_mount">
              <label>mount</label>
              <default>*</default>
            </input>

            <input type="dropdown" token="df_storage_monitor">
                <label>Monitor:</label>
                <choice value="storage">storage (volume size)</choice>
                <choice value="storage_free">storage_free (volume free)</choice>
                <choice value="storage_used">storage_used (volume used)</choice>
                <choice value="storage_free_percent">storage_free_percent (%)</choice>
                <choice value="storage_used_percent">storage_used_percent (%)</choice>
                <default>storage_used_percent</default>
                <change>
                    <condition value="storage">
                        <unset token="form.df_storage_monitor_unit"></unset>
                        <set token="df_storage_show_unit">true</set>
                        <unset token="df_storage_monitor_max_chart"></unset>
                    </condition>
                    <condition value="storage_free">
                        <unset token="form.df_storage_monitor_unit"></unset>
                        <set token="df_storage_show_unit">true</set>
                        <unset token="df_storage_monitor_max_chart"></unset>
                    </condition>
                    <condition value="storage_used">
                        <unset token="form.df_storage_monitor_unit"></unset>
                        <set token="df_storage_show_unit">true</set>
                        <unset token="df_storage_monitor_max_chart"></unset>
                    </condition>
                    <condition value="storage_free_percent">
                        <set token="df_storage_unit">%</set>
                        <unset token="df_storage_show_unit"></unset>
                        <set token="df_storage_monitor_max_chart">101</set>
                    </condition>
                    <condition value="storage_used_percent">
                        <set token="form.df_storage_monitor_unit">pct</set>
                        <set token="df_storage_monitor_max_chart">101</set>
                        <unset token="df_storage_show_unit"></unset>
                    </condition>
                </change>
            </input>

            <input type="dropdown" token="df_storage_monitor_unit" depends="$df_storage_show_unit$">
                <label>Unit:</label>
                <choice value="MB">MB</choice>
                <choice value="GB">GB</choice>
                <choice value="TB">TB</choice>
                <default>GB</default>
                <change>
                    <condition value="MB">
                        <set token="df_storage_unit_math">value</set>
                        <set token="df_storage_unit_legend">MB</set>
                    </condition>
                    <condition value="GB">
                        <set token="df_storage_unit_math">value/1024</set>
                        <set token="df_storage_unit_legend">GB</set>
                    </condition>
                    <condition value="TB">
                        <set token="df_storage_unit_math">value/1024/1204</set>
                        <set token="df_storage_unit_legend">TB</set>
                    </condition>
                    <condition value="pct">
                        <set token="df_storage_unit_math">value</set>
                        <set token="df_storage_unit_legend">pct</set>
                    </condition>
                </change>
            </input>

            <chart>
                <search depends="$show_df_storage_overtime$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.df_storage.*" host=$host$ dimension_mount="$df_storage_mount$" by host, metric_name, dimension_mount span=1m
| eval Available=case(metric_name=="os.unix.nmon.storage.df_storage.Available", value), Use_pct=case(metric_name=="os.unix.nmon.storage.df_storage.Use_pct", value), Used=case(metric_name=="os.unix.nmon.storage.df_storage.Used", value), blocks=case(metric_name=="os.unix.nmon.storage.df_storage.blocks", value)
| eval storage_free=blocks-Used, storage_free_percent=(100-Use_pct)
| rename Use_pct as storage_used_percent, blocks as storage, Used as storage_used, Available as storage_free
| foreach storage, storage_free, storage_used [ eval &lt;&lt;FIELD&gt;&gt; = round('&lt;&lt;FIELD&gt;&gt;'/1024, 2) ]
| stats latest(storage*) as "storage*" by _time, dimension_mount, host
| eval value=$df_storage_monitor$
| eval value=$df_storage_unit_math$
| timechart $span$ latest(value) as $df_storage_monitor$ by dimension_mount</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
                <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
                <option name="charting.axisTitleX.visibility">collapsed</option>
                <option name="charting.axisTitleY.text">$df_storage_unit_legend$</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisTitleY2.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.axisY2.enabled">0</option>
                <option name="charting.axisY2.scale">inherit</option>
                <option name="charting.chart">line</option>
                <option name="charting.chart.nullValueMode">gaps</option>
                <option name="charting.chart.showDataLabels">none</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">default</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">none</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">bottom</option>
                <option name="height">500</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.maximumNumber">$df_storage_monitor_max_chart$</option>
            </chart>
        </panel>

    </row>

    <row depends="$show_jfs_storage_overtime$ $show_jfs_storage_overtime$">
        <panel>
            <title>File systems utilization evolution over time</title>

            <input type="text" token="fsfilter" searchWhenChanged="true">
                <label>Filter FileSystems by pattern:</label>
                <default>*</default>
            </input>

            <chart>
                <search depends="$show_jfs_storage_overtime$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.jfsfile" host=$host$ dimension_device="$fsfilter$" by dimension_device span=1m
| timechart $span$ limit=0 useother=f latest(value) As value by dimension_device</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                    <refresh>$refresh$</refresh>
                    <refreshType>delay</refreshType>
                </search>
                <option name="charting.axisTitleX.visibility">visible</option>
                <option name="charting.axisTitleY.visibility">visible</option>
                <option name="charting.axisX.scale">linear</option>
                <option name="charting.axisY.scale">linear</option>
                <option name="charting.chart">line</option>
                <option name="charting.chart.nullValueMode">connect</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">default</option>
                <option name="charting.chart.style">shiny</option>
                <option name="charting.drilldown">all</option>
                <option name="charting.layout.splitSeries">0</option>
                <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
                <option name="charting.legend.placement">$charting.legend.placement$</option>
                <option name="height">500</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">% Used</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.maximumNumber">100</option>
                <option name="refresh.display">none</option>
            </chart>
        </panel>
    </row>
    
</form>
