Check if scripts have been run
Hi, Now and again on some of our servers we recieve an error message about various scripts failing to run. For example we recieved one a few days back and havent had any since. Where can I check to see if the script runs succesfully afterwards? An example of the a few days back Script or Executable Failed to run Alert Description Source: SERVERNAME Path: SERVERNAME Alert Rule: Alert on Failed Batch Responses Created: 20/11/2010 19:59:02 The process started at 19:58:59 failed to create System.PropertyBagData, no errors detected in the output. The process exited with 3221225477 Command executed: "C:\WINDOWS\system32\cscript.exe" /nologo "MemoryUtilization.vbs" 2.5 SERVERNAME 2855.6666666666665 Working Directory: C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 190\1643\ One or more workflows were affected by this. Workflow name: Microsoft.Windows.Server.2003.OperatingSystem.MemoryAvailableMBytes Instance name: Microsoft(R) Windows(R) Server 2003, Standard Edition Instance ID: {FCE4FAC5-0753-FAA5-774F-0C0C600BD800} Management group: GROUPNAME I checked the directory name and it is now called C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 194\1643\. Is this directory dynamic? i.e. does it change every day?
November 24th, 2010 8:17am

Hi The directory specified is dynamic on the basis it will change each time the Health Service is restarted. You can actually see this if log on to a box and restart the health service. Scripts will fail on occassion - sometimes the health service might have been restarted part way through script execution. Sometimes it might be a cluster failover during script execution. It might even be a temporary resource issue so the script times out. You don't see when the script executes succesfully (unless it actually dumps contents to the operationsmanager event log) so in general it is very much monitoring by exception - you get told when something is wrong but not when something works. One thing I tend to do is to create an alert view scoped for the Alert on Failed Batch Responses alert, sort by server and check the repeat count. Sometimes you'll see a fair number of scripts fail at the same time - usually this will correlate to a service or server restart (or perhaps IIS scripts when IIS is restarted). Marnix (as usual) has a great blog on this: http://thoughtsonopsmgr.blogspot.com/2009/03/script-or-executable-failed-to-run-part.html Cheers Graham View OpsMgr tips and tricks at http://systemcentersolutions.wordpress.com/
Free Windows Admin Tool Kit Click here and download it now
November 24th, 2010 8:27am

OK Graham, thanks for the great explanation.
November 24th, 2010 8:52am

Another option to check whether a script is running on a particular agent-managed computer is to startup a procmon capture and filter by your script name. Here's a post I did a while back about using Procmon to do a similar task. This should get you pointed in the right direction. http://blogs.technet.com/b/jonathanalmquist/archive/2009/08/27/cscript-spikes-cpu-even-with-version-5-7.aspxHTH, Jonathan Almquist - MSFT
Free Windows Admin Tool Kit Click here and download it now
November 24th, 2010 12:36pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics