http://www.perlmonks.org?node_id=719572


in reply to How to Monitor System Resources

It's not clear wether you mean total usage for your system, or just for your own application?

Either way, on windows you can get the information using for individual processes using Win32::Process::Info or for the system as a whole using Win32::API.

See google search for some code for both.

You would obviously have to conditionally combine these with a *nix solution by testing $^O. I unaware of a cross-platform solution for this.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.