Perfmon script not working??

A

Adisegna

Hello,

I'm trying to monitor free disk space using Performance Monitor. If the
free space falls below a certain value I have an email.vbs script I
want kicked off to let me know about it.

An alert was created on Windows 2003 server using the Logical Disk Free
Space counter. I set the actions to "Log an entry in the application
event log" and "Run this program" (c:\scripts\email.vbs). I can run
email.vbs from the command line and from windows using cscript and
wscript.

------------------------------------------------------!!!
When running out of disk space Perfmon creates the event in the event
log but the script doesn't run.
------------------------------------------------------!!!

These are generated in the event log.

Event ID 2031 = Counter: \\MYComputer\LogicalDisk(C:)\% Free Space has
tripped its alert threshold. The counter value of 28.0766666666667 is
under the limit value of 20000.

Event ID 2038 = Unable to execute command '' for the Free Disk Space
alert. The alert will continue as scheduled. The error code returned
is in the data.

Wha am I missing?

Thanks in advance
 
D

Dave Patrick

You may need to explicitly call a scripting engine. Something like;

cscript scriptname.extension

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

| Hello,
|
| I'm trying to monitor free disk space using Performance Monitor. If the
| free space falls below a certain value I have an email.vbs script I
| want kicked off to let me know about it.
|
| An alert was created on Windows 2003 server using the Logical Disk Free
| Space counter. I set the actions to "Log an entry in the application
| event log" and "Run this program" (c:\scripts\email.vbs). I can run
| email.vbs from the command line and from windows using cscript and
| wscript.
|
| ------------------------------------------------------!!!
| When running out of disk space Perfmon creates the event in the event
| log but the script doesn't run.
| ------------------------------------------------------!!!
|
| These are generated in the event log.
|
| Event ID 2031 = Counter: \\MYComputer\LogicalDisk(C:)\% Free Space has
| tripped its alert threshold. The counter value of 28.0766666666667 is
| under the limit value of 20000.
|
| Event ID 2038 = Unable to execute command '' for the Free Disk Space
| alert. The alert will continue as scheduled. The error code returned
| is in the data.
|
| Wha am I missing?
|
| Thanks in advance
|
 
A

Adisegna

I tried that too. I had perfmon call a bat file with (cscript
email.vbs) in it.




You may need to explicitly call a scripting engine. Something like;

cscript scriptname.extension

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect


| Hello,
|
| I'm trying to monitor free disk space using Performance Monitor. If
the
| free space falls below a certain value I have an email.vbs script I
| want kicked off to let me know about it.
|
| An alert was created on Windows 2003 server using the Logical Disk
Free
| Space counter. I set the actions to "Log an entry in the application
| event log" and "Run this program" (c:\scripts\email.vbs). I can run
| email.vbs from the command line and from windows using cscript and
| wscript.
|
| ------------------------------------------------------!!!
| When running out of disk space Perfmon creates the event in the event
| log but the script doesn't run.
| ------------------------------------------------------!!!
|
| These are generated in the event log.
|
| Event ID 2031 = Counter: \\MYComputer\LogicalDisk(C:)\% Free Space
has
| tripped its alert threshold. The counter value of 28.0766666666667 is
| under the limit value of 20000.
|
| Event ID 2038 = Unable to execute command '' for the Free Disk Space
| alert. The alert will continue as scheduled. The error code
returned
| is in the data.
|
| Wha am I missing?
|
| Thanks in advance
 
D

Dave Patrick

If it didn't work there may be a path problem. So try;

%systemroot%\system32\cscript.exe fullpath\email.vbs

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

|I tried that too. I had perfmon call a bat file with (cscript
| email.vbs) in it.
 
A

Adisegna

The path was added to the batch file and still nothing. There is
nothing complicated about this. There has got to be something small
we're both missing??

cd\
c:\windows\system32\cscript email.vbs

It works fine when executing it alone but not from perfmon.

Thanks

---------------

f it didn't work there may be a path problem. So try;

%systemroot%\system32\cscript.exe fullpath\email.vbs

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect


|I tried that too. I had perfmon call a bat file with (cscript
| email.vbs) in it.
 
D

Dave Patrick

You missed the full path to email.vbs

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

| The path was added to the batch file and still nothing. There is
| nothing complicated about this. There has got to be something small
| we're both missing??
|
| cd\
| c:\windows\system32\cscript email.vbs
|
| It works fine when executing it alone but not from perfmon.
|
| Thanks
 
M

mostro

No luck yet... this is nuts.... Anyone have any suggestions??

I enabled messenger on the box to test that portion of the alerting
functionality and it works fine. How does the underlying process work
for calling a program?

Does anyone have Windows 2003 Perfmon alerts calling a script and
working?

thanks
 
D

Dave Patrick

Through associations and file types. Something may be broken on your
machine.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
<snip>
How does the underlying process work
| for calling a program?
<snip>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top