Jump to content

Recommended Posts

Posted

this is the script, it reads my coolmon stats from a xml file.

<script language="JavaScript">function GetNode(dom,xpath){                          //  Declaration of	var node = dom.selectSingleNode(xpath);       //  a supplementary	var value = node.text;                        //  function GetNode()	return value;}function UpdateReadings(){	dom = new ActiveXObject("Msxml.DOMDocument"); //  Creates DOM using MSXML as parser	dom.async = false;                            //  Makes DOM wait until download is complete	dom.load("coolmon.xml");           //  Loads data into DOM from CoolMon's output	uptime_load.innerHTML = GetNode(dom,"CoolMon/Raw/Uptime");    drive_load.innerHTML = GetNode(dom,"CoolMon/Raw/Drive_Space");    process_load.innerHTML = GetNode(dom,"CoolMon/Raw/System_Processes_Count");    ram_free_load.innerHTML = GetNode(dom,"CoolMon/Raw/RAMFree");	ram_used_load.innerHTML = GetNode(dom,"CoolMon/Raw/RAMUsed");	processor_load.innerHTML = GetNode(dom,"CoolMon/Raw/Processor_Usage");	net_int_load.innerHTML = GetNode(dom,"CoolMon/Raw/Network_Bytes_Read");	net_outt_load.innerHTML = GetNode(dom,"CoolMon/Raw/Network_Bytes_Written");	net_in_load.innerHTML = GetNode(dom,"CoolMon/Raw/Network_Read_Stats");	net_out_load.innerHTML = GetNode(dom,"CoolMon/Raw/Network_Write_Stats");	top_process_load.innerHTML = GetNode(dom,"CoolMon/Raw/Top_Process");	temp_load.innerHTML = GetNode(dom,"CoolMon/Raw/Temperature_2");
}function CoolMon(){                                   //  Sets timer interval to update the info	window.setInterval('UpdateReadings()',1000);  //  by calling the previous function every}                                                     //  # of milliseconds
</script>

i display each information bit with this code.

<span id="Network_Write_Stats" style="position:relative; font-weight: bold; left: -1px;"></span>

im not really sure how to divide that one by 1024, its not a code im sure off.


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...