• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 349
  • Last Modified:

Utility that counts network device reboots

I need an utility which would show exactly how many times a faulty machine has rebooted during the day time. Kind a ping with recording feature.

Is there anything that would do this that is low cost or free?
0
howei
Asked:
howei
  • 5
  • 5
  • 4
  • +5
3 Solutions
 
jabiiiCommented:
You should just look at the event logs of the PC.
Or if it's a network device have the reboot notices emailed to you....
what type of device?
0
 
Intense_AngelCommented:
You can do this with a script.  And it is free.
0
 
fm250Commented:
if the machine running winxp or 2000 you can check  that under Event Viewer >> system
if it is a linux machine you can check system log file  under /var/log
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
howeiAuthor Commented:
Nope. This is firewall and I am pinging it but need to know the daily reboot count.

Angel
What kind a script would do this?
0
 
jabiiiCommented:
What type of firewall? Most already retain this information in their logs....
0
 
jabiiiCommented:
Or the ability to tell you via email or other if rebooted.
0
 
Intense_AngelCommented:
A vbscript....I will help you with it shortly.
0
 
howeiAuthor Commented:
Sonicwall.

It is logging too much information and sending to the email account.
I just need a simple daily count of reboot events.
0
 
fm250Commented:
Angel
you can filter only the lines that have info about the reboot and sent it to you or save it somewhere else where you can read it.  very simple script can do that for you if you have it configured to save the log file.
you need to provide what kind of OS and the format for the log file to let other people help you. if not saved what kind of firewall, cicso pix for example. so be specific

hope this helps!
0
 
Intense_AngelCommented:
Here is a script that I just finished up for you.  Copy the code into a text file and rename it to pings.vbs.  To edit the script right click on it and edit.  You will need to do this for each device you want to monitor, because you need to put the ip address of the device your pinging into the script.  For each device you monitor the script will need to be placed in its on folder, it then writes continue to write to a file it will create called pings.txt.  Also....I did not add timing to the script...we can if you want, but you can just run it at certain times from your scheduler.


Here is the code.....

Option Explicit
'*
Const cVBS = "pings.vbs"
Const cTMP = "pings.tmp"
Const cTXT = "pings.txt"
Const cDOM = "150.202.72.43"
Const cIF1 = "Request timed out"
'*
Dim strOTF
strOTF = ""
Dim strRUN
strRUN = "%comspec% /c ping " & cDOM & " > " & cTMP
'*
Dim objWSH
Set objWSH = CreateObject("Wscript.Shell")
objWSH.Run strRUN, 0, true
Set objWSH = Nothing
'*
Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
Call Got()
If strOTF <> "" Then Call Put()
Set objFSO = Nothing

Sub Got()
Dim objOT1
Set objOT1 = objFSO.OpenTextFile(cTMP,1)
strOTF = objOT1.ReadAll
If InStr(strOTF,cIF1) = 0 Then strOTF = ""
Set objOT1 = Nothing
objFSO.DeleteFile cTMP
End Sub

Sub Put()
Dim objOT2
Set objOT2 = objFSO.OpenTextFile(cTXT,8,True)
objOT2.WriteLine(Now() & " : " & strOTF)
Set objOT2 = Nothing
End Sub

0
 
howeiAuthor Commented:
Angel
I did like you said. Copied to Desktop, put in the folder, put the ping destionation IP in the script, double click on it but I don't see much happening neither the text file is created?
0
 
catoaguilarCommented:
First of all, a faulty firewall rebooting several times a day should only be used as a door stopper.

Now, if it has SNMP configured, you may ask the boot time (uptime) and with a small script, you may get the time of boot (actual time minus uptime) and compare it with last uptime recorded to check if it has booted during the period and keep counting and reset the counter every day and send an email at midnight with the number of reboots during the last day.

0
 
Intense_AngelCommented:
The text file won't be created unless the device is down, then it will continue to append to the same txt file everytime it detects nothing.

To test it, put a bogus ip address in the script and then try it, give it a little time because it goes through the ping and timeout sequence.
0
 
The--CaptainCommented:
Ping is not a tool for determining reboots.  Ping may fail due to a wide variety of conditions, one of which may be a device reset/reboot.

If your device supports SNMP, that would be a much more preferable tool to determine when your device is rebooting (and it can give you tons of additional info as well).

Do not use ping for this, unless you have absolutely no other options.

Cheers,
-Jon



0
 
jabiiiCommented:
being the FW already logs this event I would just filter the logs for it..... would save you time/effort.
you could even have a script than ran against your logs pulling that info out and dumping it to a file....so you only had to check that file..
0
 
pseudocyberCommented:
I agree with catoaguilar and Th--Captain

SNMP was designed to do exactly what you want.

We use SolarWinds Orion to do this - it monitors key devices and reports on utilization, reboots, etc.  It can also report on other things which an SNMP MIB may monitor - such as memory, disk, and processor utilization, interface throughput utilization, link up/down, high ping response times, etc.

SolarWinds makes a smaller portion of this capability which is client based instead of server based.

Orion:  http://www.solarwinds.net/Orion/Index.htm
Network Performance Monitor:  http://www.solarwinds.net/Tools/Network_Monitoring/Network_Perf_Monitor/index.htm
0
 
ksearchCommented:
There's a free utility from microsoft called uptime.  download it, and you can run it against the local machine, or any other box.  Several parameters to give more/less information.

http://www.microsoft.com/technet/archive/winntas/downloads/uptime.mspx?mfr=true
0
 
howeiAuthor Commented:
A lots of good info here guys. Great bunch!

Angel
I am not sure if this script is workin. Should it show in Task Manager?

SNMP
I have no experince messing with it. It sounds good. Have no money for Solar Winds now...
0
 
Intense_AngelCommented:
It is a very brief test and you most likely won't catch it in task manager.

The only way to verify it is working for you is..... put the script named pings.vbs in a folder all by itself, double click it and you will see a pings.tmp file created then deleted.  If it could get a response back then you will get nothing else....if it did not get a response back you will see a file created pings.txt, open that and it will give time and date of no response.

If you want to make sure it is creating the text file you need to put an ip address in the script that is bogus..like 197.34.78.5...run it and you will see the text file created.  

If you enter the script in the task scheduler to run however often everytime it cannot get a response back from your target it will add an additional line to your text file....pings.txt.
0
 
The--CaptainCommented:
>SNMP
>I have no experince messing with it. It sounds good.

We can get more specific if you can provide more details about your equipment.

You don't need SolarWinds to handle SNMP (it just makes it easier).

Cheers,
-Jon
0
 
pseudocyberCommented:
There are "free" tools to monitor networks which run on Linux.  They also rely on SNMP.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 5
  • 5
  • 4
  • +5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now