Page 1 of 1 1
Topic Options
#61032 - 2001-12-04 03:06 AM System Uptime
KiXtart_HelpDesk Offline
Fresh Scripter

Registered: 2001-11-29
Posts: 25
Loc: Denmark
Hi guys...

If you need a script that queries a list of servers for how many days since reboot
and then generates a report to a HTML-file with graphs and everything...

visit KiXtart HelpDesk and look for System Uptime in the Scripts section or
download http://www.kixtart.org/helpdesk/download/Uptime.zip

/Brian

Sorry I can't post the script here since it contains html-formatting like body...

Top
#61033 - 2001-12-04 03:33 AM Re: System Uptime
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

Welcome to the board.

A little question: do you have more information about http://kixtart.org/helpdesk ?
f.e.
- what are the goals?
- which users should use it?
- why this was introduced at the same main address?
- what the meaning of the forums will be?
thanks & greetings.

btw: the site looks great.

[ 04 December 2001: Message edited by: MCA ]

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#61034 - 2001-12-04 03:54 AM Re: System Uptime
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Brian,

Really good to see you on the board.

I've always viewed kixtart.org/helpdesk as the Euro-KiXtart BBS ... and that we are related, kinda like sister boards (at least that's what I'd like to think anyway !)

-Shawn

p.s. Thanks for that timely tip about @TICKS and the overflow ! Plus, might be nice to get more cross-posting going on between the boards ... no ?

[ 04 December 2001: Message edited by: Shawn ]

Top
#61035 - 2001-12-04 04:04 AM Re: System Uptime
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear Brian,

By-the-way some links in your download section are working correctly.
greetings.

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#61036 - 2001-12-04 02:12 PM Re: System Uptime
KiXtart_HelpDesk Offline
Fresh Scripter

Registered: 2001-11-29
Posts: 25
Loc: Denmark
Thanx guys,

MCA: I started KiXtart HelpDesk as a spare-time project.
The goal is to promote the KiXtart language and to offer sample scripts.
The users would be anyone interested in KiXtart.
The reason why it is located at kixtart.org is that Henri offered space on his server.


Shawn:
Glad I could help!
Cross-postings would be nice! I don't have that many to offer though...
I am really interested in sample scripts. New-commers likes cut-and-paste, right??


/Brian

Btw: I'll fix the links ASAP. Also working on a html-version of the 2001 manual.

Top
#61037 - 2001-12-04 06:05 PM Re: System Uptime
Anonymous
Unregistered


I don't think the forum is a good idea.
You get too much crosspost.
I think it's better to refer to this board.
We have a starters section too.

Is there any possibility to get the complete uptime string in the HTML page?
I think it's easy to do but for some reason I can't get it in???

[ 04 December 2001: Message edited by: awinkel ]

Top
#61038 - 2001-12-06 12:09 AM Re: System Uptime
Anonymous
Unregistered


Anyone knows the answer at my last question?

[ 06 December 2001: Message edited by: awinkel ]

Top
#61039 - 2001-12-06 08:55 PM Re: System Uptime
KiXtart_HelpDesk Offline
Fresh Scripter

Registered: 2001-11-29
Posts: 25
Loc: Denmark
Here are the values for days, hours, minutes and seconds:

$day = val(substr("$x",instr("$x","for") + 5,3))
? "$$day = " + $day

$hour = val(substr("$x",instr("$x","hour") - 3,3))
? "$$hour = " + $hour

$minute = val(substr("$x",instr("$x","minute") - 3,3))
? "$$minute = " + $minute

$second = val(substr("$x",instr("$x","second") - 3,3))
? "$$second = " + $second

/Brian

Top
#61040 - 2001-12-06 09:29 PM Re: System Uptime
Anonymous
Unregistered


Thanks, you're really a helpdesk.
Top
#61041 - 2001-12-17 06:24 PM Re: System Uptime
Miriam Offline
Lurker

Registered: 2001-12-17
Posts: 2
Loc: Austin, TX
Thank you for the great script! I am getting an error when I run the uptime.kix:

"Error in parameter(s) !.
$result = WriteProfileString($IniFile,"$server","Uptime",$day)

What might be causing this?

Top
#61042 - 2001-12-17 06:56 PM Re: System Uptime
Miriam Offline
Lurker

Registered: 2001-12-17
Posts: 2
Loc: Austin, TX
OK...looks like the problem is in the $day parameter. If I remove $day, the uptime.kix runs fine, but then I get a rather non-useful HTML page like this:

Server Uptime
DBTX: days
FSTX: days
EXCHANGETX: days



Top
#61043 - 2002-02-05 11:42 PM Re: System Uptime
Anonymous
Unregistered


Try this, ti worked for me.

If Exist($IniFile)
$result = WriteProfileString ("$IniFile", "$server", "Uptime", "$day")

Top
#61044 - 2002-02-06 12:13 AM Re: System Uptime
Anonymous
Unregistered


If someone wants to take this further I think it would be of value to all.

What I would like to do is use all the data that is reported via Uptime.exe. If you add the /a /d switches you can get a lot more info then just the "system uptime".

Here is an example of the output using the following command

Shell '%comspec% /c "uptime.exe \\$server /a /d:01/01/2002" >C:\uptime.txt'

(contents on c:\uptime.txt)
Uptime Report for: \\Server

OS: Windows NT 4.0 (Build 1381), Service Pack 6, Multiprocessor Free.
Time Zone: Eastern Standard Time

System Events as of 2/5/02 5:12:45 PM:

Date: Time: Event: Comment:
---------- ----------- ------------------- -----------------------------------
2/1/02 6:01:48 PM Shutdown Prior uptime:62d 7h:15m:52s
2/1/02 6:09:22 PM Boot Prior downtime:0d 0h:7m:34s

Current System Uptime: 3 day(s), 23 hour(s), 4 minute(s), 12 second(s)


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

Since 1/1/02: (Last 35 Days)

System Availability: 99.9853%
Total Uptime: 35d 17h:5m:11s
Total Downtime: 0d 0h:7m:34s
Total Reboots: 1
Mean Time Between Reboots: 35.72 days
Total Bluescreens: 0
Total Application Failures: 0

Is anyone brave/smart enough to strip the data and put it into the .ini file so that is can be posted into the HTML page.

DR

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1046 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.061 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org