Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon Jun 17, 2019 2:22 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: UPTIME in Percent
PostPosted: Wed Mar 30, 2005 7:50 am 
Offline

Joined: Wed Mar 23, 2005 8:18 am
Posts: 39
Hi all,

Someone have an script to generate servers uptime in percent ?

Thank you,

Alvaro


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 30, 2005 8:37 am 
Offline
Cacti User

Joined: Thu Dec 09, 2004 1:51 pm
Posts: 112
Location: Austria
As the numbers are already available in CACTI - maybe they could be made available in the next version? (See http://forums.cacti.net/viewtopic.php?t=5222)

If you need to monitor the uptime of M$ systems right now you could use their "uptime.exe".
The statistics look like:
Code:
uptime.exe /s
Uptime Report for: \\xxxxxx

Current OS: Microsoft Windows XP, Service Pack 2, Uniprocessor Free.
Time Zone: Westeuropäische Normalzeit

System Events as of 30.03.2005 15:23:13:

Date:      Time:        Event:               Comment:
---------- -----------  -------------------  -----------------------------------
30.03.2005    12:32:17  Shutdown
30.03.2005    12:34:49  Boot                 Prior downtime:0d 0h:2m:32s

Current System Uptime: 0 day(s), 2 hour(s), 48 minute(s), 55 second(s)


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

Since 30.03.2005:

           System Availability: 98.5179%
                  Total Uptime: 0d 2h:48m:24s
                Total Downtime: 0d 0h:2m:32s
                 Total Reboots: 1
     Mean Time Between Reboots: 0.12 days
             Total Bluescreens: 0

I've written a script to extract "System Availability:" (has been a bit tricky). This value could be fed into CACTI.
HTH

_________________
Thomas Rupp


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 30, 2005 1:21 pm 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12160
Location: USA
Thomas wrote:
I've written a script to extract "System Availability:" (has been a bit tricky). This value could be fed into CACTI.HTH


Tricky, how so? Just write a simple perl script that looks for "System Availability:", parse the numbers after it, and removes the %.

_________________

| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 31, 2005 1:38 am 
Offline
Cacti User

Joined: Thu Dec 09, 2004 1:51 pm
Posts: 112
Location: Austria
Quote:
Tricky, how so?

Because sometimes you get more than one of this blocks:
Code:
Since 30.03.2005:

           System Availability: 98.5179%
                  Total Uptime: 0d 2h:48m:24s
                Total Downtime: 0d 0h:2m:32s
                 Total Reboots: 1
     Mean Time Between Reboots: 0.12 days
             Total Bluescreens: 0

And I didn't want to write a skript (and install another language). So I used the unix tools for windows (grep, awk ...)

_________________
Thomas Rupp


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 09, 2005 1:41 pm 
Offline

Joined: Tue May 06, 2003 7:48 am
Posts: 16
Thomas,

I'm very interested in your script that extracts "System Availability", could you post it here?

Thomas wrote:
I've written a script to extract "System Availability:" (has been a bit tricky). This value could be fed into CACTI.
HTH


Wietze


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 11, 2005 4:31 am 
Offline
Cacti User

Joined: Thu Dec 09, 2004 1:51 pm
Posts: 112
Location: Austria
Hi,

attached you'll find a ZIP file with all required programs, cmd- and text-files. Simply list all servers you would like to monitor in uptime_server.txt and run uptime.cmd. This will create a html-file for all servers.
uptime_server.cmd <servername> C:\temp\UT.log will query one server and save the results in a text file.
uptime /help will show detailed infos about the MS program. You have to be authorized to query other servers (administrator).

HTH
Thomas


Attachments:
Uptime.zip [208.55 KiB]
Downloaded 1421 times

_________________
Thomas Rupp
Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 22, 2005 8:25 am 
Offline

Joined: Tue May 06, 2003 7:48 am
Posts: 16
Thomas wrote:
Hi,

attached you'll find a ZIP file with all required programs, cmd- and text-files. Simply list all servers you would like to monitor in uptime_server.txt and run uptime.cmd. This will create a html-file for all servers.
uptime_server.cmd <servername> C:\temp\UT.log will query one server and save the results in a text file.
uptime /help will show detailed infos about the MS program. You have to be authorized to query other servers (administrator).

HTH
Thomas


Hello Thomas and others,

Thank you for posting the files. I created a new topic http://forums.cacti.net/viewtopic.php?t=10514 that gives a complete solution based on the files Thomas sent. I hope it works.

Wietze Visscher


Top
 Profile  
 
 Post subject: uptime graph
PostPosted: Fri Mar 06, 2009 7:09 am 
Offline

Joined: Tue Mar 03, 2009 4:54 am
Posts: 5
hi Thomas,

wow, great script, Thomas could you plz give this same coding for Linux server also.i am also wants implement this in my system


Top
 Profile  
 
 Post subject: Re: UPTIME in Percent
PostPosted: Tue May 31, 2011 3:26 am 
Offline

Joined: Tue May 31, 2011 3:09 am
Posts: 1
Sorry I newbie, how make that file script to be executable?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group