LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-24-2005, 05:01 PM   #16
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234

Here's a start, this is my test code:
Code:
$ ping -c3 192.168.123.253
PING 192.168.123.253 (192.168.123.253): 56 data bytes
64 bytes from 192.168.123.253: icmp_seq=0 ttl=64 time=6.7 ms
64 bytes from 192.168.123.253: icmp_seq=1 ttl=64 time=0.4 ms
64 bytes from 192.168.123.253: icmp_seq=2 ttl=64 time=0.4 ms

--- 192.168.123.253 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.4/2.5/6.7 ms

$ ping -c3 192.168.123.253  | awk -F/ '/round-trip/{print $4}'
2.5
Pipe your ping into an awk command like mine.

In brief it:
  • sets the field sep. to '/'
  • looks only at lines containing 'round-trip'
  • "prints" the 4th field -- the average.
Forgive the awk lesson if you don't need it.


What to do w/ the result is the next Q. Perhaps append it to log file or just trigger a restart whenever it exceeds a value of your choosing.

This is exactly the kind of thing I meant by logging in my previous post.
 
Old 10-25-2005, 08:05 AM   #17
mindseye1
LQ Newbie
 
Registered: Feb 2005
Posts: 15

Original Poster
Rep: Reputation: 0
Oh that's awesome! Now to graph that, I could just throw that command in to MRTG as a target and ideally I would see a graph of the ping time every 5 minutes. Cool, I think this will work great! Now after this I'll just have to worry about interpreting the results! I will post an attachment from MRTG if it works out.
 
Old 10-25-2005, 10:05 AM   #18
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Great, I look fwd. to seeing it.
 
Old 10-25-2005, 03:31 PM   #19
mindseye1
LQ Newbie
 
Registered: Feb 2005
Posts: 15

Original Poster
Rep: Reputation: 0
Well it's running now, but I had to make a few changes to the ping command. I must have a different version, but it wasn't tough. As far as the graph goes though, it is a little bit hard to read. I may have to figure out a different graph method in order to be able to interpret the results. Anyways, here is what I got so far: http://ryan.herefishy.net/ping-stat.JPG
Again, thank you for all your assistance with this so far!
 
Old 10-25-2005, 03:35 PM   #20
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
I think spreading the x-axis might improve readability.
 
Old 10-25-2005, 03:37 PM   #21
mindseye1
LQ Newbie
 
Registered: Feb 2005
Posts: 15

Original Poster
Rep: Reputation: 0
BTW, ignore the 'in' and 'out' on the graph. MRTG requires me to have 2 numbers to graph, so I just performed the ping operation twice in the script. So green and blue are both pings, one is just a couple seconds after the other.
 
Old 10-25-2005, 03:39 PM   #22
mindseye1
LQ Newbie
 
Registered: Feb 2005
Posts: 15

Original Poster
Rep: Reputation: 0
Spreading the X-axis would be perfect except that I'm not exactly sure how to do it. Any MRTG users out there that could give me a clue?
 
Old 10-25-2005, 04:23 PM   #23
KnightHawk
Member
 
Registered: Aug 2005
Posts: 128

Rep: Reputation: 15
This is going to sound somewhat unintuitive, but.... try swapping out the network card. Would be great if you had one just like the one your using now to swap with. So you could be absolutely sure it was in fact the network card, and not something software related.

While I realize this may not immediately seem like a hardware error, I can tell you from experience network cards on the verge of going bad can do all sorts of crazy things, and I've personally had this sort of problem with other machines before. For that matter any electrical device in general when they get "fuzzy" do all sorts of crazy nonsensical things.

And even crazier, while it may seem a network card is quite possibly one of the simplest electrical devices in your computer with no moving parts, I can assure you they have a failure rate far higher than any similar manufactured devices.
 
Old 10-26-2005, 07:49 AM   #24
mindseye1
LQ Newbie
 
Registered: Feb 2005
Posts: 15

Original Poster
Rep: Reputation: 0
Actually that's not really possible as it is an onboard network card. Also, this happens to be a BookPC so I don't even have any PCI slots that I could stick a new network card into. I will go look on some of the BookPC boards to see what others have done about failed network cards, maybe I'll have some options.
 
Old 10-26-2005, 04:23 PM   #25
mindseye1
LQ Newbie
 
Registered: Feb 2005
Posts: 15

Original Poster
Rep: Reputation: 0
I just found a tool that may work a little better for my monitoring situation, SmokePing. It was nice using my own tools, but I think this one will be a bit more effective. So far it has given me some pretty informational graphs, but I'll need more data before I can figure anything out.
 
  


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
How to specify Network Time Protocol Server in Kickstart script? EStester Linux - Enterprise 3 03-26-2005 01:46 PM
Network Time Server icedude Linux - Newbie 7 01-21-2005 09:56 PM
Connection to remote FTP server which has the same domain name as my network dws Linux - Newbie 2 05-26-2004 08:39 AM
network connection slow to server on slackware niehls Linux - Networking 2 04-30-2003 07:13 AM
losing network connection to linux server aznewbie Linux - Networking 4 10-25-2002 07:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:40 AM.

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