LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-25-2004, 08:30 PM   #1
ionmich
Member
 
Registered: Sep 2003
Location: Mexico, Sweden
Distribution: openSUSE 15.2, Microware OS-9, MX-19, Bodhi 5.1.0
Posts: 256

Rep: Reputation: 41
Logging ISP failures - Slack 10


Is there any connection monitoring software that can log the time and date when my ethernet cable ISP goes off line?
 
Old 11-26-2004, 02:25 AM   #2
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
You could create a simple script or program to ping somewhere if it doesn't answer it could log it.
It shouldn't be so hard, there are some bash guides that can teach you to make a script easily to do that kind of stuff.

Last edited by gbonvehi; 11-26-2004 at 03:56 AM.
 
Old 11-26-2004, 08:35 AM   #3
carboncopy
Senior Member
 
Registered: Jan 2003
Location: Malaysia
Posts: 1,210
Blog Entries: 4

Rep: Reputation: 45
As gbonvehi suggest use ping.

I would like to add to the suggestion to add time to the log file.

You can add to your crontab to execute a simple script every 1 - 5 minutes

for example

EDITED:
Code:
#!/bin/bash

date >> /var/log/net/pinginfo.log
ping -c 5 <net address> >> /var/log/net/pinginfo.log
alright, figured out the code for you. Hope it helps.

EDITED:
there is no /var/log/net directory. You have to create it if you want to use it.

EDITED:
the log file output example:

Sat Nov 27 09:10:42 MYT 2004
PING 161.XXX.XXX.XXX (161.XXX.XXX.XXX) 56(84) bytes of data.
64 bytes from 161.XXX.XXX.XXX: icmp_seq=1 ttl=64 time=3.22 ms
64 bytes from 161.XXX.XXX.XXX: icmp_seq=2 ttl=64 time=3.29 ms
64 bytes from 161.XXX.XXX.XXX: icmp_seq=3 ttl=64 time=6.99 ms
64 bytes from 161.XXX.XXX.XXX: icmp_seq=4 ttl=64 time=3.19 ms
64 bytes from 161.XXX.XXX.XXX: icmp_seq=5 ttl=64 time=4.46 ms

--- 161.XXX.XXX.XXX ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 40144ms
rtt min/avg/max/mdev = 3.192/4.234/6.992/1.459 ms

Last edited by carboncopy; 11-26-2004 at 07:12 PM.
 
Old 11-26-2004, 10:26 PM   #4
ionmich
Member
 
Registered: Sep 2003
Location: Mexico, Sweden
Distribution: openSUSE 15.2, Microware OS-9, MX-19, Bodhi 5.1.0
Posts: 256

Original Poster
Rep: Reputation: 41
Thanks people. What a great solution!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CD burning failures stevsom Linux - Software 1 07-26-2005 05:06 PM
Changing ISP, apt-get can not see new ISP proxy linx win Debian 0 01-05-2005 03:41 AM
logging to kde from slack 9 help kevincadogan Linux - General 5 07-19-2003 12:38 AM
using red-carpet without logging out and logging as root. packman Linux - Software 1 12-09-2002 02:55 AM
Logging of Write Failures dman530 Linux - Security 1 10-02-2002 07:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration