Solved

Calculate server uptime

Posted on 2000-03-08
5
916 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
format nvarchar field as mm/dd/yyyy 4 71
Choose the older file FSO 6 49
Auto Submit on dropdown box 14 66
FileUp - Classic ASP 5 17
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…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

821 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