Solved

Calculate server uptime

Posted on 2000-03-08
5
912 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

762 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

11 Experts available now in Live!

Get 1:1 Help Now