<form stylesheet="ui_simple.css,hide_timeindicator.css,table_data_bar.css,panel_decoration.css" script="autodiscover.js,table_data_bar.js" isVisible="true" version="1.1" theme="dark">
    <label>NMON Analyser AIX</label>

    <!--
    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$ host="$host-prefilter$" by host
| `mapping_frameID`
| stats count by frameID, host | sort 0 host</query>
        <earliest>$timerange.earliest$</earliest>
        <latest>$timerange.latest$</latest>
    </search>

    <!-- 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>Nmon Analyser interfaces have 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>

    <!-- Selection panel -->

    <row>
        <panel>

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

            <input type="dropdown" token="osfilter" searchWhenChanged="true">
                <label>Filter OS Type:</label>
                <default>AIX</default>
                <prefix>OStype="</prefix>
                <suffix>"</suffix>
                <choice value="*">Any OS</choice>
                <choice value="AIX">AIX</choice>
            </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>
                <initialValue>*</initialValue>
                <fieldForLabel>frameID</fieldForLabel>
                <fieldForValue>frameID</fieldForValue>
                <prefix>frameID="</prefix>
                <suffix>"</suffix>
            </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$ | stats count by host | dedup host | sort 0 host</query>
                </search>
                <fieldForLabel>host</fieldForLabel>
                <fieldForValue>host</fieldForValue>
                <prefix>host="</prefix>
                <suffix>"</suffix>
            </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>

        </panel>
    </row>

    <!-- 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>

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

    <!-- 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$ | 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>
                    <set token="storage_usage_datasource">JFSFILE</set>
                    <set token="storage_inodes_usage_datasource">JFSINODE</set>
                    <unset token="start_df_storage_search"></unset>
            </condition>
            <condition>
                    <set token="start_df_storage_search">true</set>
                    <set token="storage_usage_datasource">DF_STORAGE</set>
                    <set token="storage_inodes_usage_datasource">DF_INODES</set>
                    <unset token="start_jfs_storage_search"></unset>
            </condition>
        </progress>
    </search>

    <!-- Configuration Search uses the nmon_inventory data over the report -->

    <search ref="NMON Inventory AIX" id="configSearch">
    </search>

    <row>
        <panel>
            <title>SYSTEM SUMMARY OVERVIEW</title>

            <table rejects="$show_null_config$">
                <title></title>
                <search base="configSearch">
                    <query>rename hostname AS host | search $host$
| fields AIX_Machine_SerialNumber,AIX_virtualcpus,AIX_logicalcores,AIX_entitled,Processor,AIX_processor_mode,AIX_processor_clockspeed,AIX_cpu_type,AIX_kernel_type,AIX_LEVEL,AIX_plateform_firmware_level,nmon_version,AIX_PoolID,AIX_system_installed_CPUs,AIX_system_active_CPUs,AIX_PoolCPUs
| rename "AIX_*" AS *
                    </query>
                    <!-- 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>
            </table>
            <html depends="$show_null_config$">
                <p style="color:blue;margin-left:30px;font-size:14px">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>

            <search>
                <query>| mcatalog values(metric_name) as metrics where `nmon_metrics_index` metric_name="os.unix.nmon.cpu.cpu_all.*" OR metric_name="os.unix.nmon.cpu.lpar.*"
| rename metrics as metric_name
| mvexpand metric_name | rex field=metric_name "os\.unix\.nmon\.cpu\.(?&lt;type&gt;\w*)\."
| stats count by type
| sort - type | head 1
| eval datasource=case(match(type, "lpar"), "LPAR (Virtual Processor usage)", match(type, "cpu_all"), "CPU_ALL (Percentage usage)") | stats values(datasource) as datasource</query>
                <earliest>$timerange.earliest$</earliest>
                <latest>$timerange.latest$</latest>
                <progress>
                    <condition>
                        <set token="cpu_data_source">$result.datasource$</set>
                    </condition>
                </progress>
            </search>

        </panel>
    </row>

    <row>
        <panel>

            <input type="dropdown" token="statsmode" searchWhenChanged="true">
                <label></label>
                <default>max</default>
                <choice value="max">max</choice>
                <choice value="avg">avg</choice>
            </input>

            <chart>
                <title>CPU Usage - $cpu_data_source$</title>
                <search>
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` `def_cpu_all_os_metric_filters` $host$ by metric_name, OStype, host span=1m
| `def_all_os_cpu_load_percent`
| timechart $span$ $statsmode$(cpu_load_percent) AS cpu_load_percent</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">CPU Usage</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` `def_cpu_all_os_metric_filters` $host$ by metric_name, OStype, host span=1m
| `def_all_os_cpu_load_percent`
| timechart $span$ $statsmode$(cpu_load_percent) AS cpu_load_percent
                        ]]>
                    </link>
                </drilldown>
            </chart>

        </panel>

        <panel>

            <input type="dropdown" token="statsmode" searchWhenChanged="true">
                <label></label>
                <default>max</default>
                <choice value="max">max</choice>
                <choice value="avg">avg</choice>
            </input>

            <chart>
                <title>I/O Per second</title>
                <search>
                    <query>| mstats sum(_value) as value where `nmon_metrics_index` (metric_name="os.unix.nmon.storage.dgxfer" OR metric_name="os.unix.nmon.storage.diskxfer") $host$ by host, metric_name span=1m
| eval dgxfer_iops=case(metric_name=="os.unix.nmon.storage.dgxfer", value), diskxfer_iops=case(metric_name=="os.unix.nmon.storage.diskxfer", value)
| stats values(dgxfer_iops) as dgxfer_iops, values(diskxfer_iops) as diskxfer_iops by _time, host
| eval iops=if(isnum('dgxfer_iops'), 'dgxfer_iops', 'diskxfer_iops')
| timechart $span$ $statsmode$(iops) as avg_iops</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">I/O per Sec</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats sum(_value) as value where `nmon_metrics_index` (metric_name="os.unix.nmon.storage.dgxfer" OR metric_name="os.unix.nmon.storage.diskxfer") $host$ by host, metric_name span=1m
| eval dgxfer_iops=case(metric_name=="os.unix.nmon.storage.dgxfer", value), diskxfer_iops=case(metric_name=="os.unix.nmon.storage.diskxfer", value)
| stats values(dgxfer_iops) as dgxfer_iops, values(diskxfer_iops) as diskxfer_iops by _time, host
| eval iops=if(isnum('dgxfer_iops'), 'dgxfer_iops', 'diskxfer_iops')
| timechart $span$ $statsmode$(iops) as avg_iops
                        ]]>
                    </link>
                </drilldown>
            </chart>

        </panel>
    </row>

    <row>
        <panel id="cpu">
            <title>CPU statistics</title>
        </panel>
    </row>

    <search id="CPU_ALL">
        <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) $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)
| 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 by _time, host
| fillnull value=0 Sys_percent,User_percent,Wait_percent
| eval cpu_load_percent=(Sys_percent+User_percent+Wait_percent)
| timechart $span$
avg(Idle_percent) AS "Idle %",
avg(Sys_percent) AS "Sys %",
avg(User_percent) AS "User %",
avg(Wait_percent) AS "Wait %",
avg(cpu_load_percent) as "CPU %"</query>
        <earliest>$timerange.earliest$</earliest>
        <latest>$timerange.latest$</latest>
    </search>

    <!-- POOLS data availability -->

    <search>
        <query>| mcatalog values(metric_name) where `nmon_metrics_index` metric_name="os.unix.nmon.cpu.pools.*" $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_pools_search"></unset>
            </condition>
            <condition>
                    <set token="start_pools_search">true</set>
            </condition>
        </progress>
    </search>

    <row>
        <panel>

            <input type="link" token="cpu_linkinput">
                <label></label>
                <choice value="cpu_chart1">CPU_ALL, % by category</choice>
                <choice value="cpu_chart2">CPU_ALL, % global usage</choice>
                <choice value="cpu_chart3">CPUnn, % global usage by processor</choice>
                <choice value="cpu_chart4">LPAR, Virtual CPU usage</choice>
                <choice value="cpu_chart5">LPAR, Pools Virtual CPU usage</choice>
                <default>cpu_chart1</default>
                <change>
                    <condition value="cpu_chart1">
                        <set token="cpu_chart1">true</set>
                        <unset token="cpu_chart2"></unset>
                        <unset token="cpu_chart3"></unset>
                        <unset token="cpu_chart4"></unset>
                        <unset token="cpu_chart5"></unset>
                    </condition>
                    <condition value="cpu_chart2">
                        <set token="cpu_chart2">true</set>
                        <unset token="cpu_chart1"></unset>
                        <unset token="cpu_chart3"></unset>
                        <unset token="cpu_chart4"></unset>
                        <unset token="cpu_chart5"></unset>
                    </condition>
                    <condition value="cpu_chart3">
                        <set token="cpu_chart3">true</set>
                        <unset token="cpu_chart1"></unset>
                        <unset token="cpu_chart2"></unset>
                        <unset token="cpu_chart4"></unset>
                        <unset token="cpu_chart5"></unset>
                    </condition>
                    <condition value="cpu_chart4">
                        <set token="cpu_chart4">true</set>
                        <unset token="cpu_chart1"></unset>
                        <unset token="cpu_chart2"></unset>
                        <unset token="cpu_chart3"></unset>
                        <unset token="cpu_chart5"></unset>
                    </condition>
                    <condition value="cpu_chart5">
                        <set token="cpu_chart5">true</set>
                        <unset token="cpu_chart1"></unset>
                        <unset token="cpu_chart2"></unset>
                        <unset token="cpu_chart3"></unset>
                        <unset token="cpu_chart4"></unset>
                    </condition>
                </change>
            </input>

            <chart depends="$cpu_chart1$">
                <title></title>
                <search base="CPU_ALL">
                    <query>fields _time,"Idle %","Sys %","User %","Wait %"</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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">% CPUs</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.maximumNumber">100</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| 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) $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)
| 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 by _time, host
| eval cpu_load_percent=(Sys_percent%2BUser_percent%2BWait_percent)
| timechart $span$ avg(Idle_percent) AS Idle_percent, avg(Sys_percent) AS Sys_percent, avg(User_percent) AS User_percent, avg(Wait_percent) AS Wait_percent, avg(cpu_load_percent) as cpu_load_percent
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$cpu_chart2$">
                <title></title>
                <search base="CPU_ALL">
                    <query>fields _time,"CPU %"</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">line</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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">% CPUs</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.maximumNumber">100</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| 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) $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)
| 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 by _time, host
| eval cpu_load_percent=(Sys_percent%2BUser_percent%2BWait_percent)
| timechart $span$ avg(Idle_percent) AS Idle_percent, avg(Sys_percent) AS Sys_percent, avg(User_percent) AS User_percent, avg(Wait_percent) AS Wait_percent, avg(cpu_load_percent) as cpu_load_percent
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$cpu_chart3$">
                <title></title>
                <search depends="$cpu_chart3$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.cpu.cpunn.* $host$ by metric_name span=1m
| `extract_metrics_cpu_all("Sys_PCT, User_PCT, Wait_PCT")`
| stats values(Sys_PCT) as Sys_PCT, values(User_PCT) as User_PCT, values(Wait_PCT) as Wait_PCT by _time, cpu_core
| fillnull value=0 Sys_PCT,User_PCT,Wait_PCT
| eval cpu_PCT=(Sys_PCT+User_PCT+Wait_PCT)
| timechart $span$ useother=f limit=0 avg(cpu_PCT) AS cpu_PCT by cpu_core</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">% of CPU utilization</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.maximumNumber">100</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.cpu.cpunn.* $host$ by metric_name span=1m
| `extract_metrics_cpu_all("Sys_PCT, User_PCT, Wait_PCT")`
| stats values(Sys_PCT) as Sys_PCT, values(User_PCT) as User_PCT, values(Wait_PCT) as Wait_PCT by _time, cpu_core | fillnull value=0
| eval cpu_PCT=(Sys_PCT%2BUser_PCT%2BWait_PCT)
| timechart $span$ useother=f limit=0 avg(cpu_PCT) AS cpu_PCT by cpu_core
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$cpu_chart4$">
                <title></title>
                <search depends="$cpu_chart4$">
                    <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$ by metric_name, OStype, host span=1m
| `def_lpar_load_cores`
| timechart $span$ avg(lpar_load_cores) AS "cpu load cores", max(entitled) as entitled, max(virtualCPUs) as virtualCPUs</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">Virtual CPUs</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| 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$ by metric_name, OStype, host span=1m
| `def_lpar_load_cores`
| timechart $span$ avg(lpar_load_cores) AS "cpu load cores", max(entitled) as entitled, max(virtualCPUs) as virtualCPUs
                    ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$cpu_chart5$">
                <title></title>
                <search depends="$cpu_chart5$">
                    <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$ by metric_name, OStype, host span=1m
| `def_lpar_pool_load_aix_cores`
| timechart $span$ avg(lpar_pool_usage) as lpar_pool_usage max(poolCPUs) AS poolCPUs</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">Virtual CPUs</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                            search?earliest=$earliest$&latest=$latest$&q=| 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$ by metric_name, OStype, host span=1m
| `def_lpar_pool_load_aix_cores`
| timechart $span$ avg(lpar_pool_usage) as lpar_pool_usage max(poolCPUs) AS poolCPUs
                        ]]>
                    </link>
                </drilldown>
            </chart>

        </panel>
    </row>

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

            <input type="link" token="pools_linkinput">
                <label></label>
                <choice value="pools_chart1">POOLS, Pools extended statistics</choice>
                <default>pools_chart1</default>
                <change>
                    <condition value="pools_chart1">
                        <set token="pools_chart1">true</set>
                    </condition>
                </change>
            </input>

            <chart depends="$pools_chart1$">
                <title></title>
                <search depends="$start_pools_search$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.cpu.pools.*" $host$ by metric_name span=1m
| `extract_metrics("max_pool_capacity entitled_pool_capacity pool_busy_time")`
| stats values(max_pool_capacity) as max_pool_capacity, values(entitled_pool_capacity) as entitled_pool_capacity, values(pool_busy_time) as pool_busy_time by _time
| timechart $span$ max(max_pool_capacity) as max_pool_capacity, max(entitled_pool_capacity) as entitled_pool_capacity, avg(pool_busy_time) as pool_busy_time</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">Virtual CPUs</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.cpu.pools.*" $host$ by metric_name span=1m
| `extract_metrics("max_pool_capacity entitled_pool_capacity pool_busy_time")`
| stats values(max_pool_capacity) as max_pool_capacity, values(entitled_pool_capacity) as entitled_pool_capacity, values(pool_busy_time) as pool_busy_time by _time
| timechart $span$ max(max_pool_capacity) as max_pool_capacity, max(entitled_pool_capacity) as entitled_pool_capacity, avg(pool_busy_time) as pool_busy_time
                        ]]>
                    </link>
                </drilldown>
            </chart>
        </panel>
    </row>


    <row>
        <panel id="process">
            <title>Process, Kernel, I/O Statistics</title>
        </panel>
    </row>

    <!-- TOP data availability -->

    <search>
        <query>| mcatalog values(metric_name) where `nmon_metrics_index` metric_name="os.unix.nmon.processes.top.pct_CPU" $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_top_search"></unset>
                    <set token="show_null_top"></set>
            </condition>
            <condition>
                    <set token="start_top_search">true</set>
                    <unset token="show_null_top"></unset>
            </condition>
        </progress>
    </search>

    <row>
        <panel>

            <input type="link" token="top_linkinput">
                <label></label>
                <choice value="top_chart1">TOP, CPU Usage per logical core</choice>
                <choice value="top_chart2">TOP: Memory Usage per command invocation</choice>
                <choice value="top_chart3">TOP: Read / Write System Calls</choice>
                <choice value="top_chart4">TOP: Paging, Sum of page faults</choice>
                <choice value="top_chart5">TOP: Threads per Command invocation</choice>
                <default>top_chart1</default>
                <change>
                    <condition value="top_chart1">
                        <set token="top_chart1">true</set>
                        <unset token="top_chart2"></unset>
                        <unset token="top_chart3"></unset>
                        <unset token="top_chart4"></unset>
                        <unset token="top_chart5"></unset>
                    </condition>
                    <condition value="top_chart2">
                        <set token="top_chart2">true</set>
                        <unset token="top_chart1"></unset>
                        <unset token="top_chart3"></unset>
                        <unset token="top_chart4"></unset>
                        <unset token="top_chart5"></unset>
                    </condition>
                    <condition value="top_chart3">
                        <set token="top_chart3">true</set>
                        <unset token="top_chart2"></unset>
                        <unset token="top_chart1"></unset>
                        <unset token="top_chart4"></unset>
                        <unset token="top_chart5"></unset>
                    </condition>
                    <condition value="top_chart4">
                        <set token="top_chart4">true</set>
                        <unset token="top_chart2"></unset>
                        <unset token="top_chart3"></unset>
                        <unset token="top_chart1"></unset>
                        <unset token="top_chart5"></unset>
                    </condition>
                    <condition value="top_chart5">
                        <set token="top_chart5">true</set>
                        <unset token="top_chart2"></unset>
                        <unset token="top_chart3"></unset>
                        <unset token="top_chart4"></unset>
                        <unset token="top_chart1"></unset>
                    </condition>
                </change>
            </input>

            <chart depends="$top_chart1$ $start_top_search$">
                <title></title>
                <search depends="$top_chart1$ $start_top_search$">
                    <query>| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.processes.top.pct_CPU" $host$ by host, metric_name, dimension_Command, dimension_PID span=1m
| stats sum(value) as pct_CPU by _time, host, dimension_Command
| appendcols [ | mstats latest(_value) as logical_cpus where `nmon_metrics_index` metric_name="os.unix.nmon.cpu.cpu_all.logical_cpus" $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$ 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>="2", usage_per_core*1.2, isnum(smt_threads) AND smt_threads>="4", usage_per_core*1.4, isnum(usage_per_core), usage_per_core)
| timechart span=4m 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>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Logical Core</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.processes.top.pct_CPU" dimension_Command="$click.name2$" $host$ by host, metric_name, dimension_Command, dimension_PID span=1m
| stats sum(value) as pct_CPU by _time, host, dimension_Command
| appendcols [ | mstats latest(_value) as logical_cpus where `nmon_metrics_index` metric_name="os.unix.nmon.cpu.cpu_all.logical_cpus" $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$ 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>="2", usage_per_core*1.2, isnum(smt_threads) AND smt_threads>="4", usage_per_core*1.4, isnum(usage_per_core), usage_per_core)
| timechart span=4m useother=f limit="20" max(usage_per_core) as "CPU Usage per core" by dimension_Command
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$top_chart2$ $start_top_search$">
                <title></title>
                <search depends="$top_chart2$ $start_top_search$">
                    <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$ by host, metric_name, dimension_Command, dimension_PID span=1m
| stats sum(value) as value by _time, metric_name, host, dimension_Command
| `extract_metrics("ResText ResData")`
| 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 Used_Mem_MB by _time, host, dimension_Command
| timechart $span$ useother=f limit=0 max(Used_Mem_MB) as "Used_Memory" by dimension_Command</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Megabytes (MB)</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats sum(_value) as value where `nmon_metrics_index` (metric_name="os.unix.nmon.processes.top.ResText" OR metric_name="os.unix.nmon.processes.top.ResData") dimension_Command="$click.name2$" $host$ by host, metric_name, dimension_Command, dimension_PID span=1m
| stats sum(value) as value by _time, metric_name, host, dimension_Command
| `extract_metrics("ResText ResData")`
| stats values(ResText) as ResText, values(ResData) as ResData by _time, host, dimension_Command
| fillnull value=0 ResText ResData
| eval Used_Mem_MB=((ResData%2BResText)/1024)
| stats sum(Used_Mem_MB) as Used_Mem_MB by _time, host, dimension_Command
| timechart $span$ useother=f limit=0 max(Used_Mem_MB) as "Used_Memory" by dimension_Command
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$top_chart3$ $start_top_search$">
                <title></title>
                <search depends="$top_chart3$ $start_top_search$">
                    <query>| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.processes.top.CharIO" $host$ by host, metric_name, dimension_Command, dimension_PID span=1m
| stats sum(value) as CharIO by _time, host, dimension_Command
| timechart $span$ useother=f limit=0 avg(CharIO) as "CharIO" by dimension_Command</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Char I/O</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.processes.top.CharIO" dimension_Command="$click.name2$" $host$ by host, metric_name, dimension_Command, dimension_PID span=1m
| stats sum(value) as CharIO by _time, host, dimension_Command
| timechart $span$ useother=f limit=0 avg(CharIO) as "CharIO" by dimension_Command
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$top_chart4$ $start_top_search$">
                <title></title>
                <search depends="$top_chart4$ $start_top_search$">
                    <query>| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.processes.top.Paging" $host$ by host, metric_name, dimension_Command, dimension_PID span=1m
| stats sum(value) as Paging by _time, host, dimension_Command
| timechart $span$ useother=f limit=0 avg(Paging) as "Paging" by dimension_Command</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Number of Pages</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.processes.top.Paging" dimension_Command="$click.name2$" $host$ by host, metric_name, dimension_Command, dimension_PID span=1m
| stats sum(value) as Paging by _time, host, dimension_Command
| timechart $span$ useother=f limit=0 avg(Paging) as "Paging" by dimension_Command
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$top_chart5$ $start_top_search$">
                <title></title>
                <search depends="$top_chart5$ $start_top_search$">
                    <query>| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.processes.top.Threads" $host$ by host, metric_name, dimension_Command, dimension_PID span=1m
| stats sum(value) as Threads by _time, host, dimension_Command
| timechart $span$ useother=f limit=0 avg(Threads) as "Threads" by dimension_Command</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Number of Threads</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.processes.top.Threads" dimension_Command="$click.name2$" $host$ by host, metric_name, dimension_Command, dimension_PID span=1m
| stats sum(value) as Threads by _time, host, dimension_Command
| timechart $span$ useother=f limit=0 avg(Threads) as "Threads" by dimension_Command
                        ]]>
                    </link>
                </drilldown>
            </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>

    <search id="FILE">
        <query>| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.kernel.file.*" $host$ by metric_name span=1m
| `extract_metrics("readch writech iget namei dirblk ttycanch ttyoutch ttyrawch")`
| stats values(readch) as readch, values(writech) as writech
values(iget) as iget, values(namei) as namei, values(dirblk) as dirblk
values(ttycanch) as ttycanch, values(ttyoutch) as ttyoutch, values(ttyrawch) as ttyrawch by _time
| timechart $span$ max(readch) as readch, max(writech) as writech
max(iget) as iget, max(namei) as namei, max(dirblk) as dirblk
max(ttycanch) as ttycanch, max(ttyoutch) as ttyoutch, max(ttyrawch) as ttyrawch</query>
        <earliest>$timerange.earliest$</earliest>
        <latest>$timerange.latest$</latest>
    </search>

    <row>
        <panel>

            <input type="link" token="file_linkinput">
                <label></label>
                <choice value="file_chart1">FILE, Read/Write system calls</choice>
                <choice value="file_chart2">FILE, Various statistics</choice>
                <default>file_chart1</default>
                <change>
                    <condition value="file_chart1">
                        <set token="file_chart1">true</set>
                        <unset token="file_chart2"></unset>
                    </condition>
                    <condition value="file_chart2">
                        <set token="file_chart2">true</set>
                        <unset token="file_chart1"></unset>
                    </condition>
                </change>
            </input>

            <chart depends="$file_chart1$">
                <title></title>
                <search base="FILE">
                    <query>fields _time,readch,writech</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">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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Rate/Sec</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$q=| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.kernel.file.*" $host$ by metric_name span=1m
| `extract_metrics("readch writech iget namei dirblk ttycanch ttyoutch ttyrawch")`
| stats values(readch) as readch, values(writech) as writech
values(iget) as iget, values(namei) as namei, values(dirblk) as dirblk
values(ttycanch) as ttycanch, values(ttyoutch) as ttyoutch, values(ttyrawch) as ttyrawch by _time
| timechart $span$ max(readch) as readch, max(writech) as writech
max(iget) as iget, max(namei) as namei, max(dirblk) as dirblk
max(ttycanch) as ttycanch, max(ttyoutch) as ttyoutch, max(ttyrawch) as ttyrawch
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$file_chart2$">
                <title></title>
                <search base="FILE">
                    <query>fields _time,iget,namei,dirblk,ttycanch,ttyoutch,ttyrawch</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">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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Rate/Sec</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$q=| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.kernel.file.*" $host$ by metric_name span=1m
| `extract_metrics("readch writech iget namei dirblk ttycanch ttyoutch ttyrawch")`
| stats values(readch) as readch, values(writech) as writech
values(iget) as iget, values(namei) as namei, values(dirblk) as dirblk
values(ttycanch) as ttycanch, values(ttyoutch) as ttyoutch, values(ttyrawch) as ttyrawch by _time
| timechart $span$ max(readch) as readch, max(writech) as writech
max(iget) as iget, max(namei) as namei, max(dirblk) as dirblk
max(ttycanch) as ttycanch, max(ttyoutch) as ttyoutch, max(ttyrawch) as ttyrawch
                        ]]>
                    </link>
                </drilldown>
            </chart>

        </panel>
    </row>

    <search id="PROC">
        <query>| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.kernel.proc.*" $host$ by metric_name span=1m
| `extract_metrics("Runnable Swap-in pswitch syscall fork exec")`
| stats values(Runnable) AS Runnable values(Swap-in) AS Swap-in, values(pswitch) AS pswitch values(syscall) AS syscall, values(fork) AS fork values(exec) AS exec by _time
| timechart $span$ avg(Runnable) AS Runnable, avg(Swap-in) AS Swap-in, avg(pswitch) AS pswitch, avg(syscall) AS syscall, avg(fork) AS fork, avg(exec) AS exec</query>
        <earliest>$timerange.earliest$</earliest>
        <latest>$timerange.latest$</latest>
    </search>

    <row>
        <panel>

            <input type="link" token="proc_linkinput">
                <label></label>
                <choice value="proc_chart1">PROC, Kernel Threads in run queue and to be paged (RunQueue, Swap-In)</choice>
                <choice value="proc_chart2">PROC, Context switches and system calls (pswitch, syscall)</choice>
                <choice value="proc_chart3">PROC, Fork and Exec system calls (fork, exec)</choice>
                <default>proc_chart1</default>
                <change>
                    <condition value="proc_chart1">
                        <set token="proc_chart1">true</set>
                        <unset token="proc_chart2"></unset>
                        <unset token="proc_chart3"></unset>
                    </condition>
                    <condition value="proc_chart2">
                        <set token="proc_chart2">true</set>
                        <unset token="proc_chart1"></unset>
                        <unset token="proc_chart3"></unset>
                    </condition>
                    <condition value="proc_chart3">
                        <set token="proc_chart3">true</set>
                        <unset token="proc_chart1"></unset>
                        <unset token="proc_chart2"></unset>
                    </condition>
                </change>
            </input>

            <chart depends="$proc_chart1$">
                <title></title>
                <search base="PROC">
                    <query>fields _time,Runnable,Swap-in</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">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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Value</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.kernel.proc.*" $host$ by metric_name span=1m
| `extract_metrics("Runnable Swap-in pswitch syscall fork exec")`
| stats values(Runnable) AS Runnable values(Swap-in) AS Swap-in, values(pswitch) AS pswitch values(syscall) AS syscall, values(fork) AS fork values(exec) AS exec by _time
| timechart $span$ avg(Runnable) AS Runnable, avg(Swap-in) AS Swap-in, avg(pswitch) AS pswitch, avg(syscall) AS syscall, avg(fork) AS fork, avg(exec) AS exec
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$proc_chart2$">
                <title></title>
                <search base="PROC">
                    <query>fields _time,pswitch,syscall</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">line</option>
                <option name="charting.chart.nullValueMode">gaps</option>
                <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
                <option name="charting.chart.stackMode">$chart.stackingmode$</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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Rates per Second</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.kernel.proc.*" $host$ by metric_name span=1m
| `extract_metrics("Runnable Swap-in pswitch syscall fork exec")`
| stats values(Runnable) AS Runnable values(Swap-in) AS Swap-in, values(pswitch) AS pswitch values(syscall) AS syscall, values(fork) AS fork values(exec) AS exec by _time
| timechart $span$ avg(Runnable) AS Runnable, avg(Swap-in) AS Swap-in, avg(pswitch) AS pswitch, avg(syscall) AS syscall, avg(fork) AS fork, avg(exec) AS exec
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$proc_chart3$">
                <title></title>
                <search base="PROC">
                    <query>fields _time,fork,exec</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">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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Rates per Second</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.kernel.proc.*" $host$ by metric_name span=1m
| `extract_metrics("Runnable Swap-in pswitch syscall fork exec")`
| stats values(Runnable) AS Runnable values(Swap-in) AS Swap-in, values(pswitch) AS pswitch values(syscall) AS syscall, values(fork) AS fork values(exec) AS exec by _time
| timechart $span$ avg(Runnable) AS Runnable, avg(Swap-in) AS Swap-in, avg(pswitch) AS pswitch, avg(syscall) AS syscall, avg(fork) AS fork, avg(exec) AS exec
                        ]]>
                    </link>
                </drilldown>
            </chart>

        </panel>
    </row>

    <search id="PAGE">
        <query>| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.kernel.page.*" $host$ by metric_name span=1m
| `extract_metrics("faults pgin pgout pgsin pgsout reclaims scans cycles")`
| stats values(pgin) as pgin, values(pgout) as pgout, values(pgsin) as pgsin, values(pgsout) as pgsout, values(reclaims) as reclaims, values(scans) as scans, values(cycles) as cycles by _time
| fillnull value=0 scans,reclaims,pgin,pgsin,pgout,pgsout
| eval scanfree_ratio=round((scans/reclaims),3), fsin=(pgin+pgsin), fsout=(pgout+pgsout)
| timechart $span$
avg(faults) AS faults avg(pgin) AS pgin avg(pgout) AS pgout avg(pgsin) AS pgsin
avg(pgsout) AS pgsout avg(reclaims) AS reclaims avg(scans) AS scans
avg(cycles) AS cycles avg(fsin) AS fsin avg(fsout) AS fsout avg(scanfree_ratio) AS scanfree_ratio</query>
        <earliest>$timerange.earliest$</earliest>
        <latest>$timerange.latest$</latest>
    </search>

    <row>
        <panel>

            <input type="link" token="page_linkinput">
                <label></label>
                <choice value="page_chart1">PAGE, Pages In / Pages Out (pgsin / pgsout, pgin / pgout)</choice>
                <choice value="page_chart2">PAGE, Fs In / Fs Out (sum of pgin/pgsin and pgout/pgsout per interval)</choice>
                <choice value="page_chart3">PAGE, Scan Free Ratio (Pages scans by reclaims per interval)</choice>
                <default>page_chart1</default>
                <change>
                    <condition value="page_chart1">
                        <set token="page_chart1">true</set>
                        <unset token="page_chart2"></unset>
                        <unset token="page_chart3"></unset>
                    </condition>
                    <condition value="page_chart2">
                        <set token="page_chart2">true</set>
                        <unset token="page_chart1"></unset>
                        <unset token="page_chart3"></unset>
                    </condition>
                    <condition value="page_chart3">
                        <set token="page_chart3">true</set>
                        <unset token="page_chart1"></unset>
                        <unset token="page_chart2"></unset>
                    </condition>
                </change>
            </input>
            
            <chart depends="$page_chart1$">
                <title></title>
                <search base="PAGE">
                    <query>fillnull value=0 pgsin,pgsout,pgin,pgout | fields _time,pgsin,pgsout,pgin,pgout</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">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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Pages</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.kernel.page.*" $host$ by metric_name span=1m
| `extract_metrics("faults pgin pgout pgsin pgsout reclaims scans cycles")`
| stats values(pgin) as pgin, values(pgout) as pgout, values(pgsin) as pgsin, values(pgsout) as pgsout, values(reclaims) as reclaims, values(scans) as scans, values(cycles) as cycles by _time
| eval scanfree_ratio=round((scans/reclaims),3), fsin=(pgin%2Bpgsin), fsout=(pgout%2Bpgsout)
| timechart $span$
avg(faults) AS faults avg(pgin) AS pgin avg(pgout) AS pgout avg(pgsin) AS pgsin
avg(pgsout) AS pgsout avg(reclaims) AS reclaims avg(scans) AS scans
avg(cycles) AS cycles avg(fsin) AS fsin avg(fsout) AS fsout avg(scanfree_ratio) AS scanfree_ratio
                        ]]>
                    </link>
                </drilldown>
            </chart>
            <chart depends="$page_chart2$">
                <title></title>
                <search base="PAGE">
                    <query>fillnull value=0 fsin,fsout | fields _time,fsin,fsout</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">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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Pages</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.kernel.page.*" $host$ by metric_name span=1m
| `extract_metrics("faults pgin pgout pgsin pgsout reclaims scans cycles")`
| stats values(pgin) as pgin, values(pgout) as pgout, values(pgsin) as pgsin, values(pgsout) as pgsout, values(reclaims) as reclaims, values(scans) as scans, values(cycles) as cycles by _time
| eval scanfree_ratio=round((scans/reclaims),3), fsin=(pgin%2Bpgsin), fsout=(pgout%2Bpgsout)
| timechart $span$
avg(faults) AS faults avg(pgin) AS pgin avg(pgout) AS pgout avg(pgsin) AS pgsin
avg(pgsout) AS pgsout avg(reclaims) AS reclaims avg(scans) AS scans
avg(cycles) AS cycles avg(fsin) AS fsin avg(fsout) AS fsout avg(scanfree_ratio) AS scanfree_ratio
                        ]]>
                    </link>
                </drilldown>
            </chart>
            <chart depends="$page_chart3$">
                <title></title>
                <search base="PAGE">
                    <query>fillnull value=0 scanfree_ratio | fields _time,scanfree_ratio</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">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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Pages</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.kernel.page.*" $host$ by metric_name span=1m
| `extract_metrics("faults pgin pgout pgsin pgsout reclaims scans cycles")`
| stats values(pgin) as pgin, values(pgout) as pgout, values(pgsin) as pgsin, values(pgsout) as pgsout, values(reclaims) as reclaims, values(scans) as scans, values(cycles) as cycles by _time
| eval scanfree_ratio=round((scans/reclaims),3), fsin=(pgin%2Bpgsin), fsout=(pgout%2Bpgsout)
| timechart $span$
avg(faults) AS faults avg(pgin) AS pgin avg(pgout) AS pgout avg(pgsin) AS pgsin
avg(pgsout) AS pgsout avg(reclaims) AS reclaims avg(scans) AS scans
avg(cycles) AS cycles avg(fsin) AS fsin avg(fsout) AS fsout avg(scanfree_ratio) AS scanfree_ratio
                        ]]>
                    </link>
                </drilldown>
            </chart>

        </panel>
    </row>

    <!-- Workload Manager data availability -->

    <search>
        <query>| mcatalog values(metric_name) where `nmon_metrics_index` metric_name="os.unix.nmon.processes.wlm*" $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_wlm_search"></unset>
            </condition>
            <condition>
                    <set token="start_wlm_search">true</set>
            </condition>
        </progress>
    </search>

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

            <input type="link" token="wlm_linkinput">
                <label></label>
                <choice value="wlm_chart1">WLMCPU, Workload Manager CPU percent (%)</choice>
                <choice value="wlm_chart2">WLMMEM, Workload Manager Memory percent (%)</choice>
                <choice value="wlm_chart3">WLMIO, Workload Manager Block I/O percent (%)</choice>
                <default>wlm_chart1</default>
                <change>
                    <condition value="wlm_chart1">
                        <set token="wlm_chart1">true</set>
                        <unset token="wlm_chart2"></unset>
                        <unset token="wlm_chart3"></unset>
                    </condition>
                    <condition value="wlm_chart2">
                        <set token="wlm_chart2">true</set>
                        <unset token="wlm_chart1"></unset>
                        <unset token="wlm_chart3"></unset>
                    </condition>
                    <condition value="wlm_chart3">
                        <set token="wlm_chart3">true</set>
                        <unset token="wlm_chart1"></unset>
                        <unset token="wlm_chart2"></unset>
                    </condition>
                </change>
            </input>

            <chart depends="$wlm_chart1$">
                <title></title>
                <search depends="$start_wlm_search$ $wlm_chart1$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.processes.wlmcpu $host$ by dimension_device span=1m
| timechart $span$ useother=f limit=0 avg(value) as cpu_pct by dimension_device</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">CPU percent (%)</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.processes.wlmcpu dimension_device="$click.value2$" $host$ by dimension_device span=1m
| timechart $span$ useother=f limit=0 avg(value) as cpu_pct by dimension_device
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$wlm_chart2$">
                <title></title>
                <search depends="$start_wlm_search$ $wlm_chart2$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.processes.wlmmem $host$ by dimension_device span=1m
| timechart $span$ useother=f limit=0 avg(value) as cpu_pct by dimension_device</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Memory percent (%)</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.processes.wlmcpu dimension_device="$click.value2$" $host$ by dimension_device span=1m
| timechart $span$ useother=f limit=0 avg(value) as cpu_pct by dimension_device
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$wlm_chart3$">
                <title></title>
                <search depends="$start_wlm_search$ $wlm_chart3$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.processes.wlmbio $host$ by dimension_device span=1m
| timechart $span$ useother=f limit=0 avg(value) as cpu_pct by dimension_device</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Block I/O percent (%)</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.processes.wlmio dimension_device="$click.value2$" $host$ by dimension_device span=1m
| timechart $span$ useother=f limit=0 avg(value) as cpu_pct by dimension_device
                        ]]>
                    </link>
                </drilldown>
            </chart>

        </panel>
    </row>
    
    <row>
        <panel id="memory">
            <title>MEMORY Usage Statistics</title>
        </panel>
    </row>

    <search id="MEM">
        <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.memory.mem.*" $host$ by metric_name span=1m
| `extract_metrics("Real_free_MB Real_total_MB Virtual_free_MB Virtual_total_MB")`
| stats values(Real_free_MB) as Real_free_MB, values(Real_total_MB) as Real_total_MB, values(Virtual_free_MB) as Virtual_free_MB, values(Virtual_total_MB) as Virtual_total_MB by _time
| eval Real_used_MB=(Real_total_MB-Real_free_MB), Virtual_used_MB=(Virtual_total_MB-Virtual_free_MB)
| timechart $span$ max(Real_total_MB) AS Real_total_MB max(Real_used_MB) AS Real_used_MB
max(Virtual_total_MB) AS Virtual_total_MB max(Virtual_used_MB) AS Virtual_used_MB</query>
        <earliest>$timerange.earliest$</earliest>
        <latest>$timerange.latest$</latest>
    </search>

    <search id="MEMNEW">
        <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.memory.memnew.*" $host$ by metric_name span=1m
| `extract_metrics("Free_PCT FScache_PCT memused_PCT Process_PCT System_PCT")`
| stats values(Free_PCT) as Free_PCT, values(FScache_PCT) as FScache_PCT, values(Process_PCT) as Process_PCT, values(System_PCT) as System_PCT by _time
| fillnull value=0 FScache_PCT,Process_PCT,System_PCT
| eval memused_PCT=(FScache_PCT+Process_PCT+System_PCT)
| timechart $span$
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</query>
        <earliest>$timerange.earliest$</earliest>
        <latest>$timerange.latest$</latest>
    </search>

    <row>
        <panel>

            <input type="link" token="mem_linkinput">
                <label></label>
                <choice value="mem_chart1">MEM, Real Memory usage</choice>
                <choice value="mem_chart2">MEM, Paging Space usage</choice>
                <choice value="mem_chart3">MEMNEW, % Memory Allocation by category</choice>
                <choice value="mem_chart4">MEMNEW, % Memory Usage</choice>
                <choice value="mem_chart5">MEMUSE, Vmtune Statistics</choice>
                <default>mem_chart1</default>
                <change>
                    <condition value="mem_chart1">
                        <set token="mem_chart1">true</set>
                        <unset token="mem_chart2"></unset>
                        <unset token="mem_chart3"></unset>
                        <unset token="mem_chart4"></unset>
                        <unset token="mem_chart5"></unset>
                    </condition>
                    <condition value="mem_chart2">
                        <set token="mem_chart2">true</set>
                        <unset token="mem_chart1"></unset>
                        <unset token="mem_chart3"></unset>
                        <unset token="mem_chart4"></unset>
                        <unset token="mem_chart5"></unset>
                    </condition>
                    <condition value="mem_chart3">
                        <set token="mem_chart3">true</set>
                        <unset token="mem_chart1"></unset>
                        <unset token="mem_chart2"></unset>
                        <unset token="mem_chart4"></unset>
                        <unset token="mem_chart5"></unset>
                    </condition>
                    <condition value="mem_chart4">
                        <set token="mem_chart4">true</set>
                        <unset token="mem_chart1"></unset>
                        <unset token="mem_chart2"></unset>
                        <unset token="mem_chart3"></unset>
                        <unset token="mem_chart5"></unset>
                    </condition>
                    <condition value="mem_chart5">
                        <set token="mem_chart5">true</set>
                        <unset token="mem_chart1"></unset>
                        <unset token="mem_chart2"></unset>
                        <unset token="mem_chart3"></unset>
                        <unset token="mem_chart4"></unset>
                    </condition>
                </change>
            </input>

            <chart depends="$mem_chart1$">
                <title></title>
                <search base="MEM">
                    <query>fields _time,Real_total_MB,Real_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">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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">Megabytes (MB)</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.memory.mem.*" $host$ by metric_name span=1m
| `extract_metrics("Real_free_MB Real_total_MB Virtual_free_MB Virtual_total_MB")`
| stats values(Real_free_MB) as Real_free_MB, values(Real_total_MB) as Real_total_MB, values(Virtual_free_MB) as Virtual_free_MB, values(Virtual_total_MB) as Virtual_total_MB by _time
| eval Real_used_MB=(Real_total_MB-Real_free_MB), Virtual_used_MB=(Virtual_total_MB-Virtual_free_MB)
| timechart $span$ max(Real_total_MB) AS Real_total_MB max(Real_used_MB) AS Real_used_MB
max(Virtual_total_MB) AS Virtual_total_MB max(Virtual_used_MB) AS Virtual_used_MB
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$mem_chart2$">
                <title></title>
                <search base="MEM">
                    <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">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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">Megabytes (MB)</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.memory.mem.*" $host$ by metric_name span=1m
| `extract_metrics("Real_free_MB Real_total_MB Virtual_free_MB Virtual_total_MB")`
| stats values(Real_free_MB) as Real_free_MB, values(Real_total_MB) as Real_total_MB, values(Virtual_free_MB) as Virtual_free_MB, values(Virtual_total_MB) as Virtual_total_MB by _time
| eval Real_used_MB=(Real_total_MB-Real_free_MB), Virtual_used_MB=(Virtual_total_MB-Virtual_free_MB)
| timechart $span$ max(Real_total_MB) AS Real_total_MB max(Real_used_MB) AS Real_used_MB
max(Virtual_total_MB) AS Virtual_total_MB max(Virtual_used_MB) AS Virtual_used_MB
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$mem_chart3$">
                <title></title>
                <search base="MEMNEW">
                    <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">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">680</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>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.memory.memnew.*" $host$ by metric_name span=1m
| `extract_metrics("Free_PCT FScache_PCT memused_PCT Process_PCT System_PCT")`
| stats values(Free_PCT) as Free_PCT, values(FScache_PCT) as FScache_PCT, values(Process_PCT) as Process_PCT, values(System_PCT) as System_PCT by _time
| eval memused_PCT=(FScache_PCT%2BProcess_PCT%2BSystem_PCT)
| timechart $span$
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
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$mem_chart4$">
                <title></title>
                <search base="MEMNEW">
                    <query>fields _time,memused_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">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">680</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>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.memory.memnew.*" $host$ by metric_name span=1m
| `extract_metrics("Free_PCT FScache_PCT memused_PCT Process_PCT System_PCT")`
| stats values(Free_PCT) as Free_PCT, values(FScache_PCT) as FScache_PCT, values(Process_PCT) as Process_PCT, values(System_PCT) as System_PCT by _time
| eval memused_PCT=(FScache_PCT%2BProcess_PCT%2BSystem_PCT)
| timechart $span$
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
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$mem_chart5$">
                <title></title>
                <search depends="$mem_chart5$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.memory.memuse.*" $host$ by metric_name span=1m
| `extract_metrics("PCTmaxclient PCTmaxperm PCTminperm PCTnumclient PCTnumperm")`
| stats values(PCTmaxclient) as PCTmaxclient, values(PCTmaxperm) as PCTmaxperm, values(PCTminperm) as PCTminperm, values(PCTnumclient) as PCTnumclient, values(PCTnumperm) as PCTnumperm by _time
| timechart $span$
avg(PCTmaxclient) as PCTmaxclient, avg(PCTmaxperm) as PCTmaxperm, avg(PCTminperm) as PCTminperm, avg(PCTnumclient) as PCTnumclient, avg(PCTnumperm) as PCTnumperm</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Percentage (%)</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.memory.memuse.*" $host$ by metric_name span=1m
| `extract_metrics("PCTmaxclient PCTmaxperm PCTminperm PCTnumclient PCTnumperm")`
| stats values(PCTmaxclient) as PCTmaxclient, values(PCTmaxperm) as PCTmaxperm, values(PCTminperm) as PCTminperm, values(PCTnumclient) as PCTnumclient, values(PCTnumperm) as PCTnumperm by _time
| timechart $span$
avg(PCTmaxclient) as PCTmaxclient, avg(PCTmaxperm) as PCTmaxperm, avg(PCTminperm) as PCTminperm, avg(PCTnumclient) as PCTnumclient, avg(PCTnumperm) as PCTnumperm
                        ]]>
                    </link>
                </drilldown>
            </chart>

        </panel>
    </row>

    <row>
        <panel id="disk">
            <title>Disks performance statistics (active drill-down: click on one of the charts for dimension devices)</title>
        </panel>
    </row>

    <row>
        <panel>

            <input type="link" token="disk_linkinput">
                <label></label>
                <choice value="disk_chart1">DISKBSIZE, Average data transfer size</choice>
                <choice value="disk_chart2">DISKBUSY, Disk Busy Activity</choice>
                <choice value="disk_chart3">DISKREAD/WRITE, Disk Read/Write Data Rate</choice>
                <choice value="disk_chart4">DISKXFER, Disk I/O Operations per second (IOPS)</choice>
                <choice value="disk_chart5">DISKREAD/WRITE by XFER, Disk Read/Write I/O Operations per second (IOPS)</choice>
                <default>disk_chart1</default>
                <change>
                    <condition value="disk_chart1">
                        <set token="disk_chart1">true</set>
                        <unset token="disk_chart2"></unset>
                        <unset token="disk_chart3"></unset>
                        <unset token="disk_chart4"></unset>
                        <unset token="disk_chart5"></unset>
                    </condition>
                    <condition value="disk_chart2">
                        <set token="disk_chart2">true</set>
                        <unset token="disk_chart1"></unset>
                        <unset token="disk_chart3"></unset>
                        <unset token="disk_chart4"></unset>
                        <unset token="disk_chart5"></unset>
                    </condition>
                    <condition value="disk_chart3">
                        <set token="disk_chart3">true</set>
                        <unset token="disk_chart1"></unset>
                        <unset token="disk_chart2"></unset>
                        <unset token="disk_chart4"></unset>
                        <unset token="disk_chart5"></unset>
                    </condition>
                    <condition value="disk_chart4">
                        <set token="disk_chart4">true</set>
                        <unset token="disk_chart1"></unset>
                        <unset token="disk_chart2"></unset>
                        <unset token="disk_chart3"></unset>
                        <unset token="disk_chart5"></unset>
                    </condition>
                    <condition value="disk_chart5">
                        <set token="disk_chart5">true</set>
                        <unset token="disk_chart1"></unset>
                        <unset token="disk_chart2"></unset>
                        <unset token="disk_chart3"></unset>
                        <unset token="disk_chart4"></unset>
                    </condition>
                </change>
            </input>


            <chart depends="$disk_chart1$">
                <title></title>
                <search>
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.diskbsize" $host$ by dimension_device span=1m
| stats sum(value) AS avg_transfer_size by _time
| timechart $span$ avg(avg_transfer_size) AS avg_transfer_size</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">KBytes per Transfer</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.diskbsize" $host$ by dimension_device span=1m
| timechart useother=f limit=0 $span$ avg(value) AS avg_transfer_size by dimension_device
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$disk_chart2$">
                <title></title>
                <search depends="$disk_chart2$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.diskbusy" $host$ by dimension_device span=1m
| stats avg(value) AS value by _time
| timechart $span$ avg(value) AS avg_busy_disk</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">% of Time Busy</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.diskbusy" $host$ by dimension_device span=1m
| timechart $span$ useother=f limit=0 avg(value) AS avg_busy_disk by dimension_device
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$disk_chart3$">
                <title></title>
                <search depends="$disk_chart3$">
                    <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$ by metric_name, dimension_device span=1m
| eval disk_read=case(match(metric_name, "diskread"), value), diskwrite = case(match(metric_name, "diskwrite"), value)
| stats avg(disk_read) AS disk_read, avg(disk_write) AS disk_write by _time
| timechart $span$ avg(disk_read) AS disk_read, avg(disk_write) AS disk_write</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">KBytes/Sec</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| 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$ by metric_name, dimension_device span=1m
| eval disk_read=case(match(metric_name, "diskread"), value), diskwrite = case(match(metric_name, "diskwrite"), value)
| timechart $span$ useother=f limit=0 avg(disk_read) AS disk_read, avg(disk_write) AS disk_write by dimension_device
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$disk_chart4$">
                <title></title>
                <search depends="$disk_chart4$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.diskxfer" $host$ by dimension_device span=1m
| stats sum(value) AS iops by _time
| timechart $span$ avg(iops) AS iops</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">I/O per Sec</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.diskxfer" $host$ by dimension_device span=1m
| timechart $span$ useother=f limit=0 avg(value) AS iops by dimension_device
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$disk_chart5$">
                <title></title>
                <search depends="$disk_chart5$">
                    <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" OR metric_name="os.unix.nmon.storage.diskbsize") $host$ by metric_name, dimension_device span=1m
| eval disk_read=case(match(metric_name, "diskread"), value), disk_write=case(match(metric_name, "diskwrite"), value), disk_size=case(match(metric_name, "diskbsize"), value)
| stats values(disk_read) as disk_read values(disk_write) as disk_write values(disk_size) as disk_size by _time, dimension_device
| eval disk_read_iops=(disk_read/disk_size), disk_write_iops=(disk_write/disk_size)
| stats sum(disk_read_iops) as disk_read_iops, sum(disk_write_iops) as disk_write_iops 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>
                </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">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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">I/O per Sec</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` (metric_name="os.unix.nmon.storage.diskread" OR metric_name="os.unix.nmon.storage.diskwrite" OR metric_name="os.unix.nmon.storage.diskbsize") $host$ by metric_name, dimension_device span=1m
| eval disk_read=case(match(metric_name, "diskread"), value), disk_write=case(match(metric_name, "diskwrite"), value), disk_size=case(match(metric_name, "diskbsize"), value)
| stats values(disk_read) as disk_read values(disk_write) as disk_write values(disk_size) as disk_size by _time, dimension_device
| eval disk_read_iops=(disk_read/disk_size), disk_write_iops=(disk_write/disk_size)
| stats sum(disk_read_iops) as disk_read_iops, sum(disk_write_iops) as disk_write_iops by _time, dimension_device
| timechart $span$ useother=f limit=0 avg(disk_read_iops) as disk_read_iops, avg(disk_write_iops) as disk_write_iops by dimension_device
                        ]]>
                    </link>
                </drilldown>
            </chart>

        </panel>
    </row>

    <row>
        <panel id="disk2">
            <title>File-systems utilization statistics</title>
        </panel>
    </row>

    <row>
        <panel>

            <input type="link" token="jfs_linkinput">
                <label></label>
                <choice value="jfs_chart1">Summary of file-systems utilization</choice>
                <choice value="jfs_chart2">File-systems utilization over time</choice>
                <choice value="jfs_chart3">File-systems inodes utilization over time</choice>
                <default>jfs_chart1</default>
                <change>
                    <condition value="jfs_chart1">
                        <set token="jfs_chart1">true</set>
                        <unset token="jfs_chart2"></unset>
                        <unset token="jfs_chart3"></unset>
                    </condition>
                    <condition value="jfs_chart2">
                        <set token="jfs_chart2">true</set>
                        <unset token="jfs_chart1"></unset>
                        <unset token="jfs_chart3"></unset>
                    </condition>
                    <condition value="jfs_chart3">
                        <set token="jfs_chart3">true</set>
                        <unset token="jfs_chart1"></unset>
                        <unset token="jfs_chart2"></unset>
                    </condition>
                </change>
            </input>

            <!--

            ### file systems SUMMARY ###

            file systems utilisation, either DF_STORAGE (default) or JFSFILE
            -->

            <!-- DF_STORAGE -->

            <table id="tablebar" depends="$start_df_storage_search$ $jfs_chart1$">
                <title>Data source: $storage_usage_datasource$</title>
                <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$ 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
| 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>

            <!-- JFSFILE -->

            <table depends="$start_jfs_storage_search$ $jfs_chart1$">
                <title>Data source: $storage_usage_datasource$</title>
                <search depends="$start_jfs_storage_search$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.jfsfile" $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>

            <!--

            ### file systems utilisation over time ###

            file systems utilisation, either DF_STORAGE (default) or JFSFILE
            -->

            <!-- DF_STORAGE -->

            <input type="text" token="df_storage_mount" depends="$start_df_storage_search$ $jfs_chart2$">
              <label>mount</label>
              <default>*</default>
            </input>

            <input type="dropdown" token="df_storage_monitor" depends="$start_df_storage_search$ $jfs_chart2$">
                <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="$start_df_storage_search$ $df_storage_show_unit$ $jfs_chart2$">
                <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 depends="$start_df_storage_search$ $jfs_chart2$">
                <title>Data source: $storage_usage_datasource$</title>
                <search depends="$start_df_storage_search$ $jfs_chart2$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.df_storage.*" $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">680</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.maximumNumber">$df_storage_monitor_max_chart$</option>
            </chart>

            <!-- JFSFILE -->

            <input type="text" token="fsfilter" searchWhenChanged="true" depends="$start_jfs_storage_search$ $jfs_chart2$">
                <label>mount:</label>
                <default>*</default>
            </input>

            <chart depends="$start_jfs_storage_search$ $jfs_chart2$">
                <title>Data source: $storage_usage_datasource$</title>
                <search depends="$start_jfs_storage_search$ $jfs_chart2$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.jfsfile" $host$ dimension_mount="$fsfilter$" by host, dimension_device span=1m
| timechart $span$ limit=0 useother=f latest(value) As value by dimension_mount</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">680</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>

            <!--

            ### file systems inodes utilisation over time ###

            file systems inodes utilisation, either DF_INODES (default) or JFSINODE
            -->

            <!-- DF_INODES -->

            <input type="text" token="df_storage_mount" depends="$start_df_storage_search$ $jfs_chart3$">
              <label>mount</label>
              <default>*</default>
            </input>

            <input type="dropdown" token="chart_df_inodes_monitor" depends="$start_df_storage_search$ $jfs_chart3$">
                <label>Monitor:</label>
                <choice value="storage_used_inodes">storage_used_inodes</choice>
                <choice value="storage_free_inodes_percent">storage_free_inodes_percent (%)</choice>
                <choice value="storage_used_inodes_percent">storage_used_inodes_percent (%)</choice>
                <default>storage_used_inodes_percent</default>
                <change>
                    <condition value="storage_used_inodes">
                        <set token="chart_df_inodes_unit_legend">nb inodes</set>
                    </condition>
                    <condition value="storage_free_inodes_percent">
                        <set token="chart_df_inodes_unit_legend">pct</set>
                    </condition>
                    <condition value="storage_used_inodes_percent">
                        <set token="chart_df_inodes_unit_legend">pct</set>
                    </condition>
                </change>
            </input>

            <chart depends="$start_df_storage_search$ $jfs_chart3$">
                <title>Data source: $storage_inodes_usage_datasource$</title>
                <search depends="$start_df_storage_search$ $jfs_chart3$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.df_inodes.*" $host$ by host, metric_name, dimension_mount span=1m
| eval IUse_pct=case(metric_name=="os.unix.nmon.storage.df_inodes.IUse_pct", value), IUsed=case(metric_name=="os.unix.nmon.storage.df_inodes.IUsed", value)
| stats values(IUse_pct) as IUse_pct, values(IUsed) as IUsed by _time, dimension_mount
| eval IFree_pct=(100-IUse_pct)
| rename IUse_pct as storage_used_inodes_percent, IFree_pct as storage_free_inodes_percent, values(IUsed) as storage_used_inodes
| timechart $span$ latest($chart_df_inodes_monitor$) as $chart_df_inodes_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">$chart_df_inodes_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">680</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisY.maximumNumber">$chart_df_inodes_monitor_max_chart$</option>
            </chart>

            <!-- JFSINODE -->

            <input type="text" token="fsfilter" searchWhenChanged="true" depends="$start_jfs_storage_search$ $jfs_chart3$">
                <label>mount:</label>
                <default>*</default>
            </input>

            <chart depends="$start_jfs_storage_search$ $jfs_chart3$">
                <title>Data source: $storage_inodes_usage_datasource$</title>
                <search depends="$start_jfs_storage_search$ $jfs_chart3$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.jfsinode" $host$ dimension_mount="$fsfilter$" by host, dimension_device span=1m
| timechart $span$ limit=0 useother=f latest(value) As value by dimension_mount</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</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>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.storage.jfsinodes" $host$ dimension_mount="$fsfilter$" by host, dimension_mount span=1m
| timechart $span$ limit=0 useother=f latest(value) As value by dimension_mount
                        ]]>
                    </link>
                </drilldown>
            </chart>

        </panel>
    </row>

    <row>
        <panel id="network1">
            <title>Adapters Statistics</title>
        </panel>
    </row>

    <row>
        <panel>

            <input type="link" token="ioadapt_linkinput">
                <label></label>
                <choice value="ioadapt_chart1">IOADAPT, Read/Write Operations (Kbytes/sec)</choice>
                <choice value="ioadapt_chart2">IOADAPT, Disks adapters Total I/O Operations (tps)</choice>
                <default>ioadapt_chart1</default>
                <change>
                    <condition value="ioadapt_chart1">
                        <set token="ioadapt_chart1">true</set>
                        <unset token="ioadapt_chart2"></unset>
                    </condition>
                    <condition value="ioadapt_chart2">
                        <set token="ioadapt_chart2">true</set>
                        <unset token="ioadapt_chart1"></unset>
                    </condition>
                </change>
            </input>

            <chart depends="$ioadapt_chart1$">
                <title></title>
                <search>
                    <query>| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.adapters.ioadapt" $host$ (dimension_device!="*tps*") by dimension_device span=1m
| timechart useother=f limit=0 $span$ avg(value) as value by "dimension_device"</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">KBytes/sec</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.adapters.ioadapt" $host$ (dimension_device!="*tps*") by dimension_device span=1m
| timechart useother=f limit=0 $span$ avg(value) as value by "dimension_device"
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$ioadapt_chart2$">
                <title></title>
                <search depends="$ioadapt_chart2$">
                    <query>| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.adapters.ioadapt" $host$ (dimension_device="*tps*") by dimension_device span=1m
| timechart useother=f limit=0 $span$ avg(value) as value by "dimension_device"</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">I/O per Sec</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats max(_value) as value where `nmon_metrics_index` metric_name="os.unix.nmon.adapters.ioadapt" $host$ (dimension_device="*tps*") by dimension_device span=1m
| timechart useother=f limit=0 $span$ avg(value) as value by "dimension_device"
                        ]]>
                    </link>
                </drilldown>
            </chart>

        </panel>
    </row>

    <!--
    Fiber Channel adapters: only show the panels if we have data
    -->

    <search>
        <query>| mcatalog values(metric_name) where `nmon_metrics_index` metric_name="os.unix.nmon.adapters.fc*" $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_fiber_searches"></unset>
            </condition>
            <condition>
                    <set token="start_fiber_searches">true</set>
            </condition>
        </progress>
    </search>

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

            <input type="link" token="fiberchannel_linkinput">
                <label></label>
                <choice value="fiberchannel_chart1">FCREAD/WRITE, Read / Write transfer rate (KB/sec)</choice>
                <choice value="fiberchannel_chart2">FCXFER, In/Out I/O transfer</choice>
                <default>fiberchannel_chart1</default>
                <change>
                    <condition value="fiberchannel_chart1">
                        <set token="fiberchannel_chart1">true</set>
                        <unset token="fiberchannel_chart2"></unset>
                    </condition>
                    <condition value="fiberchannel_chart2">
                        <set token="fiberchannel_chart2">true</set>
                        <unset token="fiberchannel_chart1"></unset>
                    </condition>
                </change>
            </input>

            <chart depends="$fiberchannel_chart1$">
                <title></title>
                <search>
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` (metric_name=os.unix.nmon.adapters.fcread OR metric_name=os.unix.nmon.adapters.fcwrite) $host$ by metric_name, dimension_device span=1m
| `extract_metrics_by_key`
| timechart avg(value) as value by key</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">KBytes/sec</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                            search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` (metric_name=os.unix.nmon.adapters.fcread OR metric_name=os.unix.nmon.adapters.fcwrite) $host$ by metric_name, dimension_device span=1m
| `extract_metrics_by_key`
| timechart avg(value) as value by key
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$fiberchannel_chart2$">
                <title></title>
                <search depends="$fiberchannel_chart2$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.adapters.fcxfer* $host$ by metric_name, dimension_device span=1m
| `extract_metrics_by_key`
| timechart avg(value) as value by key</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">I/O per Sec</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.adapters.fcxfer* $host$ by metric_name, dimension_device span=1m
| `extract_metrics_by_key`
| timechart avg(value) as value by key
                        ]]>
                    </link>
                </drilldown>
            </chart>

        </panel>
    </row>

    <!-- SEA (Shared Ethernet Adapters) -->
    
    <search>
        <query>| mcatalog values(metric_name) where `nmon_metrics_index` metric_name="os.unix.nmon.adapters.sea*" $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_sea_search"></unset>
            </condition>
            <condition>
                    <set token="start_sea_search">true</set>
            </condition>
        </progress>
    </search>

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

            <input type="link" token="sea_linkinput">
                <label></label>
                <choice value="sea_chart1">Shared Ethernet Adapters - SEA</choice>
                <choice value="sea_chart2">Shared Ethernet Adapters - SEACHPHY</choice>
                <choice value="sea_chart3">Shared Ethernet Adapters - SEAPACKET</choice>
                <default>sea_chart1</default>
                <change>
                    <condition value="sea_chart1">
                        <set token="sea_chart1">true</set>
                        <unset token="sea_chart2"></unset>
                        <unset token="sea_chart3"></unset>
                    </condition>
                    <condition value="sea_chart2">
                        <set token="sea_chart2">true</set>
                        <unset token="sea_chart1"></unset>
                        <unset token="sea_chart3"></unset>
                    </condition>
                    <condition value="sea_chart3">
                        <set token="sea_chart3">true</set>
                        <unset token="sea_chart1"></unset>
                        <unset token="sea_chart2"></unset>
                    </condition>
                </change>
            </input>

            <chart depends="$sea_chart1$">
                <title></title>
                <search depends="$start_sea_search$ $sea_chart1$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.adapters.sea $host$ by dimension_device span=1m
| timechart $span$ useother=f limit=0 avg(value) as value by dimension_device</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">KB/sec</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.adapters.sea $host$ by dimension_device span=1m
| timechart $span$ useother=f limit=0 avg(value) as value by dimension_device
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$sea_chart2$">
                <title></title>
                <search depends="$start_sea_search$ $sea_chart2$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.adapters.seachphy $host$ by dimension_device span=1m
| timechart $span$ useother=f limit=0 avg(value) as value by dimension_device</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Various</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.adapters.seachphy $host$ by dimension_device span=1m
| timechart $span$ useother=f limit=0 avg(value) as value by dimension_device
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$sea_chart3$">
                <title></title>
                <search depends="$start_sea_search$ $sea_chart3$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.adapters.seapacket $host$ by dimension_device span=1m
| timechart $span$ useother=f limit=0 avg(value) as value by dimension_device</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Packets</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.adapters.seapacket $host$ by dimension_device span=1m
| timechart $span$ useother=f limit=0 avg(value) as value by dimension_device
                        ]]>
                    </link>
                </drilldown>
            </chart>

        </panel>
    </row>
    
    <row>
        <panel id="network2">
            <title>NETWORK Usage Statistics</title>
        </panel>
    </row>

    <row>
        <panel>

            <input type="link" token="net_linkinput">
                <label></label>
                <choice value="net_chart1">NET - Inbound/Outbound traffic</choice>
                <choice value="net_chart2">NETPACKET - Inbound/Outbound packets</choice>
                <choice value="net_chart3">NETERROR - Inbound/Outbound error packets</choice>
                <default>net_chart1</default>
                <change>
                    <condition value="net_chart1">
                        <set token="net_chart1">true</set>
                        <unset token="net_chart2"></unset>
                        <unset token="net_chart3"></unset>
                    </condition>
                    <condition value="net_chart2">
                        <set token="net_chart2">true</set>
                        <unset token="net_chart1"></unset>
                        <unset token="net_chart3"></unset>
                    </condition>
                    <condition value="net_chart3">
                        <set token="net_chart3">true</set>
                        <unset token="net_chart1"></unset>
                        <unset token="net_chart2"></unset>
                    </condition>
                </change>
            </input>

            <chart depends="$net_chart1$">
                <title></title>
                <search>
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.network.net $host$ (dimension_device!="*lo*") by dimension_device span=1m
| timechart $span$ useother=f limit=0 avg(value) as value by dimension_device</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">Outbound KBps / Inbound KBps</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.network.net $host$ (dimension_device!="*lo*") by dimension_device span=1m
| timechart $span$ useother=f limit=0 avg(value) as value by dimension_device
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$net_chart2$">
                <title></title>
                <search>
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.network.netpacket $host$ (dimension_device!="*lo*") by dimension_device span=1m
| timechart $span$ useother=f limit=0 avg(value) as value by dimension_device</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">Outbound / Inbound packets</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.network.netpacket $host$ (dimension_device!="*lo*") by dimension_device span=1m
| timechart $span$ useother=f limit=0 avg(value) as value by dimension_device&display.general.type=visualizations&display.page.search.tab=visualizations&display.visualizations.charting.chart=line
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$net_chart3$">
                <title></title>
                <search>
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.network.neterror $host$ (dimension_device!="*lo*") by dimension_device span=1m
| timechart $span$ useother=f limit=0 avg(value) as value by dimension_device</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisTitleY.text">Number of Network Packets</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.network.neterror $host$ (dimension_device!="*lo*") by dimension_device span=1m
| timechart $span$ useother=f limit=0 avg(value) as value by dimension_device
                        ]]>
                    </link>
                </drilldown>
            </chart>

        </panel>
    </row>

    <!--
    NFS server / client: only show the panels if we have data
    -->

    <!-- NFS v2 data availability -->

    <search>
        <query>| mcatalog values(metric_name) where `nmon_metrics_index` metric_name="os.unix.nmon.network.nfs*v2.*" $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_nfsv2_searches"></unset>
            </condition>
            <condition>
                    <set token="start_nfsv2_searches">true</set>
            </condition>
        </progress>
    </search>

    <!-- NFS v3 data availability -->

    <search>
        <query>| mcatalog values(metric_name) where `nmon_metrics_index` metric_name="os.unix.nmon.network.nfs*v3.*" $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_nfsv3_searches"></unset>
            </condition>
            <condition>
                    <set token="start_nfsv3_searches">true</set>
            </condition>
        </progress>
    </search>

    <!-- NFS v4 data availability -->

    <search>
        <query>| mcatalog values(metric_name) where `nmon_metrics_index` metric_name="os.unix.nmon.network.nfs*v4.*" $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_nfsv4_searches"></unset>
            </condition>
            <condition>
                    <set token="start_nfsv4_searches">true</set>
            </condition>
        </progress>
    </search>

    <!-- NFS v2 -->

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

            <input type="link" token="nfsv2_linkinput">
                <label></label>
                <choice value="nfssvrv2">NFS Server v2</choice>
                <choice value="nfscliv2">NFS Client v2</choice>
                <default>nfssvrv2</default>
                <change>
                    <condition value="nfssvrv2">
                        <set token="show_nfssvrv2">true</set>
                        <unset token="show_nfscliv2"></unset>
                    </condition>
                    <condition value="nfscliv2">
                        <set token="show_nfscliv2">true</set>
                        <unset token="show_nfssvrv2"></unset>
                    </condition>
                </change>
            </input>

            <chart depends="$show_nfssvrv2$">
                <title></title>
                <search depends="$start_nfsv2_searches$ $show_nfssvrv2$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.network.nfssvrv2.* $host$ by metric_name span=1m
| `extract_metrics`
| fields _time, metric, value
| timechart $span$ limit=0 useother=f avg(value) by metric</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Nbr of Operations</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.network.nfssvrv2.* $host$ by metric_name span=1m
| `extract_metrics`
| fields _time, metric, value
| timechart $span$ limit=0 useother=f avg(value) by metric
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$show_nfscliv2$">
                <title></title>
                <search depends="$start_nfsv2_searches$ $show_nfscliv2$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.network.nfscliv2.* $host$ by metric_name span=1m
| `extract_metrics`
| fields _time, metric, value
| timechart $span$ limit=0 useother=f avg(value) by metric</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Nbr of Operations</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.network.nfscliv2.* $host$ by metric_name span=1m
| `extract_metrics`
| fields _time, metric, value
| timechart $span$ limit=0 useother=f avg(value) by metric
                        ]]>
                    </link>
                </drilldown>
            </chart>

        </panel>
    </row>
    
    <!-- NFS v3 -->

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

            <input type="link" token="nfsv3_linkinput">
                <label></label>
                <choice value="nfssvrv3">NFS Server v3</choice>
                <choice value="nfscliv3">NFS Client v3</choice>
                <default>nfssvrv3</default>
                <change>
                    <condition value="nfssvrv3">
                        <set token="show_nfssvrv3">true</set>
                        <unset token="show_nfscliv3"></unset>
                    </condition>
                    <condition value="nfscliv3">
                        <set token="show_nfscliv3">true</set>
                        <unset token="show_nfssvrv3"></unset>
                    </condition>
                </change>
            </input>

            <chart depends="$show_nfssvrv3$">
                <title></title>
                <search depends="$start_nfsv3_searches$ $show_nfssvrv3$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.network.nfssvrv3.* $host$ by metric_name span=1m
| `extract_metrics`
| fields _time, metric, value
| timechart $span$ limit=0 useother=f avg(value) by metric</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Nbr of Operations</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.network.nfssvrv3.* $host$ by metric_name span=1m
| `extract_metrics`
| fields _time, metric, value
| timechart $span$ limit=0 useother=f avg(value) by metric
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$show_nfscliv3$">
                <title></title>
                <search depends="$start_nfsv3_searches$ $show_nfscliv3$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.network.nfscliv3.* $host$ by metric_name span=1m
| `extract_metrics`
| fields _time, metric, value
| timechart $span$ limit=0 useother=f avg(value) by metric</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Nbr of Operations</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.network.nfscliv3.* $host$ by metric_name span=1m
| `extract_metrics`
| fields _time, metric, value
| timechart $span$ limit=0 useother=f avg(value) by metric
                        ]]>
                    </link>
                </drilldown>
            </chart>

        </panel>
    </row>
    
    <!-- NFS v4 -->

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

            <input type="link" token="nfsv4_linkinput">
                <label></label>
                <choice value="nfssvrv4">NFS Server v4</choice>
                <choice value="nfscliv4">NFS Client v4</choice>
                <default>nfssvrv4</default>
                <change>
                    <condition value="nfssvrv4">
                        <set token="show_nfssvrv4">true</set>
                        <unset token="show_nfscliv4"></unset>
                    </condition>
                    <condition value="nfscliv4">
                        <set token="show_nfscliv4">true</set>
                        <unset token="show_nfssvrv4"></unset>
                    </condition>
                </change>
            </input>

            <chart depends="$show_nfssvrv4$">
                <title></title>
                <search depends="$start_nfsv4_searches$ $show_nfssvrv4$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.network.nfssvrv4.* $host$ by metric_name span=1m
| `extract_metrics`
| fields _time, metric, value
| timechart $span$ limit=0 useother=f avg(value) by metric</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Nbr of Operations</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.network.nfssvrv4.* $host$ by metric_name span=1m
| `extract_metrics`
| fields _time, metric, value
| timechart $span$ limit=0 useother=f avg(value) by metric
                        ]]>
                    </link>
                </drilldown>
            </chart>

            <chart depends="$show_nfscliv4$">
                <title></title>
                <search depends="$start_nfsv4_searches$ $show_nfscliv4$">
                    <query>| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.network.nfscliv4.* $host$ by metric_name span=1m
| `extract_metrics`
| fields _time, metric, value
| timechart $span$ limit=0 useother=f avg(value) by metric</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </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">680</option>
                <option name="charting.axisTitleX.text">Time</option>
                <option name="charting.axisY.minimumNumber">0</option>
                <option name="charting.axisTitleY.text">Nbr of Operations</option>
                <drilldown target="search">
                    <link>
                        <![CDATA[
                        search?earliest=$earliest$&latest=$latest$&q=| mstats avg(_value) as value where `nmon_metrics_index` metric_name=os.unix.nmon.network.nfscliv4.* $host$ by metric_name span=1m
| `extract_metrics`
| fields _time, metric, value
| timechart $span$ limit=0 useother=f avg(value) by metric
                        ]]>
                    </link>
                </drilldown>
            </chart>

        </panel>
    </row>

</form>
