[% content_only = 1 # no html wrappers %]
<html>
    <head>
        <meta http-equiv="refresh" content="60">
        <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
        <script type="text/javascript" src="/js/jquery.countdown.js"></script>
        <script type="text/javascript">
            $(function () {
                $('#refresh').countdown({ until: +60, format: 's', compact: true });
            });
        </script>
        <style type="text/css">
			#cpu { font-family: monospace; white-space: pre }
        </style>
    </head>

    <body>
        <div><strong>System resources in use (Mb):</strong></div>

        <div style="margin: 10px">
            <img id="real" src="[% app_url
                %]/chart/process/resource_meter/horizontal_linear_meter?type=real_mem">
        </div>
        <div style="margin: 10px">
            <img id="virtual" src="[% app_url
                %]/chart/process/resource_meter/horizontal_linear_meter?type=swap_mem">
        </div>
        <div style="margin: 10px">
            <img id="virtual" src="[% app_url
                %]/chart/process/resource_meter/horizontal_linear_meter?type=blocks_root">
        </div>
        <div style="margin: 10px">
            <img id="virtual" src="[% app_url
                %]/chart/process/resource_meter/horizontal_linear_meter?type=blocks_data">
        </div>
        <div style="margin: 10px">
            <img id="virtual" src="[% app_url
                %]/chart/process/resource_meter/horizontal_linear_meter?type=blocks_usr">
        </div>
        <div style="margin: 10px">
            <img id="virtual" src="[% app_url
                %]/chart/process/resource_meter/horizontal_linear_meter?type=blocks_var">
        </div>

        [% BLOCK blue_bar;
            IF val < 1; 150 - (150 * val);
            ELSE; 0; END;
        END %]
        <div>
            [% cpu = cpu() %]
            <strong>CPU load averages:</strong>
            <div id="cpu">
     1 min: <img src="/images/red.gif" height="10"
            width="[% 150 * cpu.0 %]" /><img src="/images/blue.gif" height="10"
            width="[% INCLUDE blue_bar val = cpu.0 %]" /> [% 100 * cpu.0 %]%
     5 min: <img src="/images/red.gif" height="10"
            width="[% 150 * cpu.1 %]" /><img src="/images/blue.gif" height="10"
            width="[% INCLUDE blue_bar val = cpu.1 %]" /> [% 100 * cpu.1 %]%
    15 min: <img src="/images/red.gif" height="10"
            width="[% 150 * cpu.2 %]" /><img src="/images/blue.gif" height="10"
            width="[% INCLUDE blue_bar val = cpu.2 %]" /> [% 100 * cpu.2 %]%
            </div>
 			Seconds until page refresh: <span id="refresh"></span>
        </div>
    </body>
</html>
