Solved

Calculate server uptime

Posted on 2000-03-08
5
913 Views
Last Modified: 2008-01-09
Hi, On my site running on a windows NT server with IIS I want to display the server uptime in day's:hours:mins

Does anyone know how I can accomplish that ??

Thanks
0
Comment
Question by:boret
  • 3
  • 2
5 Comments
 
LVL 4

Accepted Solution

by:
CoolAss earned 200 total points
ID: 2598452
You need the WinNT option pack which includes a utility called uptime.exe. This returns the information you want.

You then need to place that utility (which is normally placed in the system32 directory to which the IIS account doesn't have access to) into a directory which the IIS account has been given permissions.

Now use a program like ASPExec or a custom COM object to call the application and then parse the results to display on the page. ASPExec is free, and can be downloaded here:

http://www.serverobjects.com/comp/Aspexec.zip 

Hope that helps. Please post comments if you need clarifacation before you decide to decline my answer if the case may be.

0
 
LVL 4

Expert Comment

by:CoolAss
ID: 2598457
By the way, ASPExec is a COM object itself, and needs to be registered with regsrv32.exe before you can use a Server.CreateObject to put it on an ASP.
0
 

Author Comment

by:boret
ID: 2604309
Hi, I have the optionpach but I can't find the utility uptime.exe, Can you tell me where I can find it. I downloade the ASPExec and I think (hope) that it wil work if I have uptime.exe
0
 
LVL 4

Expert Comment

by:CoolAss
ID: 2605995
It's not the option pack... it's the NT Resource Kit.

www.microsoft.com

I am farely sure it's free... if not, i can provide you with a link to download uptime.exe, after all, that's a free program.
0
 

Author Comment

by:boret
ID: 2611437
Hi CoolAss, UPTIME.EXE is neither in the option pack or in the Resource kit version that I have but I did found it on microsoft.com as you suggested and it works (Though not as good as in the good old Novell days :) )

Anyway, the combination with ASPExec works super so thank you for the advice.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now