There are several pre-invented wheels you could use for these purposes - I suggest you consider those before building yours.:
- Windows performance monitor already has a mechanism for periodically gathering performance info.
- MRTG can graph the info - and there are contributed mechanisms to import Win PerfMon data
- The underling collection mechanism is ,SNMP, which can get data for both Linux and Windows
In Windows, you will need to add the SNMP service (Add-remove progs -> Win components ---)
"There are only two truly infinite things. The universe and stupidity, and I'm not too sure about the universe"- Albert Einstein