Windows Server 2003
1819504 Members
3044 Online
109603 Solutions
New Discussion юеВ

Windows uptime alert

 
SOLVED
Go to solution
Manoj_Singh
New Member

Windows uptime alert

We have few Windows 2003 server which are rebooted on weekly basis by script. Most of the time all servers are rebooted sucessfully but now we see that some of the server are not getting reboot command and they continue to be up for more than 7 days. Is there any way by which I configure some script that will send me e-mail alert if server uptime is more than 7 days.

Please assist.
7 REPLIES 7
P Muralidhar Kini
Honored Contributor

Re: Windows uptime alert

Hi Manoj,

Welcome to the ITRC forum.

Check the following link -
http://www.top4download.com/free-server-uptime/

This has various tools that provide the uptime alerts.
You can go through this and select the one based on your requirements.

Hope this helps.

Also, as you are new to the forum
Refer the following link which says how you can thank the forum -
http://forums13.itrc.hp.com/service/forums/helptips.do?#28

Regards,
Murali
Let There Be Rock - AC/DC
Manoj_Singh
New Member

Re: Windows uptime alert

Hi Murali,

Thanks for prompt reply, I am already using uptime command provided by Microsoft and I use that to get the uptime of all my servers. What I am trying to do now, setup schedule task which will run weekly, get the uptime and send the email to me and my support team if server is not rebooted as per the schedule. In current case, I am rebooting more than 100 servers on weekly basis in 10 minutes interval.

I hope this make sense.

Thanks once again.
Manoj_Singh
New Member

Re: Windows uptime alert

Also, In this case if I want to use third party software then I will have to go thru long process of applying use of that software and its really lengthy process which I would like to avoid so I want some script which can perform this for me.
P Muralidhar Kini
Honored Contributor

Re: Windows uptime alert

Hi Manoj,

>> I hope this make sense.
Yes, your requirement is clear to me know.
You know the command, all you need is a script that could be run at scheduled
interval of time.

Try using the Scheduled Tasks feature of windows. Create a Scheduled task to
execute the UPTIME commands that you already have. Schedule it at regular
intervals of time based on the frequency that you want.

For using Scheduled Tasks, Refer -
http://support.microsoft.com/kb/308569

Hope this helps.

Regards,
Murali
Let There Be Rock - AC/DC
Manoj_Singh
New Member

Re: Windows uptime alert

Thanks Murali,

I have configured the schedule task to run exactly after 30 mins of my schedule reboot and its giving the desired result also. My issue, how can I receive that uptime result saved .txt file mailed to my support team without usage of any SMTP server but yes I have configure IIS with ASP.Net so any VB script can be executed there.
P Muralidhar Kini
Honored Contributor
Solution

Re: Windows uptime alert

Hi Manoj,

Instead of scheduling your uptime command as a scheduled task, you can
try the following -

Add a scheduled task to run a batch file. Configure it so that it would
get executed as per the schedule you want.
The batch file would do a set of activities
- Run the Uptime command
- Send mail
- others...

Check the following link -
* Send e-mails by batch
http://www.robvanderwoude.com/email.php

This link talks about how you can send emails from within a batch file.

This should help you get the desired results.

Regards,
Murali
Let There Be Rock - AC/DC
Phil.Howell
Honored Contributor

Re: Windows uptime alert

The eventlog service writes a log entry at midday of the form
"The system uptime is n seconds"
Write a script to send email if n > 604800

Phil