Link to home
Start Free TrialLog in
Avatar of JoshuaSharf
JoshuaSharf

asked on

Starting Performance Alerts on System Startup

I am trying to configure Performance Monitor so that it will automatically start an alert on startup/reboot.  

I have been able to save and reload Alerts in HTML files, and I see how to start perfmon from the command line.  But I don't see how to include the HTML file in the command line, or how to replicate the Performance "Logs & Alerts --> Alerts --> New Alert Settings From" on the command line.
Avatar of Geoff Sutton
Geoff Sutton
Flag of Canada image

To start the HTML from the commandline, try iexplore.exe <<html filename>>.  You can also put this batch (or the html file/URL) into the startup group of the start menu.  That will cause it to start automatically.  Also, of you create a text file with all the dos prompts listed in order that you want to run, and save it with .bat (16 bit) or .cmd(32 bit) then you can double click on that file to run those commands in sequence.  I will need time to research the actual performance monitor and manipulating that from the command line.  I expect we will be looking at VBScript to provide functionality.

Geoff
Avatar of JoshuaSharf
JoshuaSharf

ASKER

Close.  I've been able to bring up the ActiveX in IE, but that only shows the monitor; it doesn't fire the alert or appear to start the alert.

Another alternative: is there some way of bring up smlogsvc.exe directly without having to go through Perfmon?  Maybe the logman script in the other URL is the way to go, but I don't see how to set thresholds or actions when those thresholds are exceeded.
I gather that you would like to automate the performance monitoring on the system right from startup, correct?  I read the other URL on the logman and that implements behind the scenes data gathering without (hopefully) delving into system scripting.  That Data can be stored to a file, then loaded into the performance monitor to be reviewed and read over (I think).  I have not dealt with Performance monitor in quite some time, so I am trying to remember the ins and outs of it.

If I have the wrong idea of what you are trying to accomplish please let me know.  The more details the easier it is to solve the problem.

Thanks,

Geoff
Well, that's about half of what I want to do.  The monitor only monitors a given attribute; I also want the alert to start up automatically.

Here's what we're trying to accomplish: we'd like to monitor a given process for high threads, and stop and restart the process when the number of threads exceeds a threshold.  We've got that part working.  The second part is to have both 1) the monitoring and 2) the alert that stops & restarts the errant process, restart when we need to reboot the machine for other reasons.
ASKER CERTIFIED SOLUTION
Avatar of Geoff Sutton
Geoff Sutton
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
PS this is untested, but the general form is correct :)

Geoff
Forgive my relative ignorance here, but is this a regular shell script, or do I need to download and install the ActiveXperts Network Monitor in order for this to work?

I understand from the pseudo-script what it should do, and it looks just right.  What is it written in?
Should run under the wscript host.  It's VBScript.