Putting a value on the load of a windows system

I've written an image processing script in php which is run as a cron scheduled task (in OSX). To avoid overloading the system, the script checks the system load (using 'uptime') and only runs when load is below a predefined threshold.

I've now ported this over to Windows (2003 Server) and am looking for a similar command line function to report system load as an integer or float.


You can try this at a windows command line. This works in XP, get a lot of other info too.

wmic CPU

Don't use load...

The system load is not a good indicator in this case. On Unix it essentially tells you, how many processes are ready and waiting to be executed at the moment. But since there are numerous reasons for why a process might have to wait, your script may actually be able to run without costing another process any performance, even if the "load" on the system is high.

... use nice

You should use nice(1) on Unix and the equivalent on Windows ("Process Priority"?), so the OS can decide, when to run your script!

If you set the priority of your script to the absolute lowest possible priority then it will only be executed by the scheduler when there is nothing else to do at the moment.

Probably you will have to implement some kind of mechanism to prevent more than one instance of your script to be run at the same time, in case it takes longer to execute than the interval between to invocations lasts.

Need Your Help

Degree Fahrenheit/Celsius Symbols ASCII NSString

ios objective-c nsstring

How can I represent the Degree Fahrenheit symbol in an NSString? The following code will produce a degree symbol and then the capital letter F, but is there an actual as Fahrenheit itself? Similarl...

android multi language for spinner list item

android sqlite spinner multilanguage

I have a list spinner item in English. When user choose an item, press Confirm it will save value for selectedItem in spinner to SQLite as a password. Now the app support other language, the value in

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.