Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 07-25-2006, 04:28 AM   #1
LQ Newbie
Registered: Jun 2006
Posts: 5

Rep: Reputation: 0
Simple question about command syntax ping/log ping results

Hi all

I am new to linux and need help on a two simple issues. I'll really appreciate if you can help me.

Issue 1. On the command line window of red hat 8.0, I want to ping an IP address continuosly and log the ping results as text file. If it is possible, I want to execute both commands(ping and log) in the same line. What would be the correct command syntax? (I mean I need to execute both ping and log with one "ENTER")

PS: I have to see the ping reply packets on the screen while it is being logged at the same time.

Issue 2. I need to ping 20 IP addresses on 20 command line windows at the same time, log the ping results as well. In other words I need to do Issue one on 20 windows and 20 IP addresses. Could you help me how to create a script about do Issue 2 with one command?

command line window 1: pings and logs,
command line window 2: pings and logs,
command line window 10: pings and logs

Thank in advance for helping
Old 07-25-2006, 04:46 AM   #2
Senior Member
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 56
Something like this would be a start:
ping $1 | tee /log/ping_$1

Use it like this:
script <ip>

There's also several tools that do it. oping for example.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Strange Ping Issue - Can't ping localhost but can ping others on LAN code_slinger Linux - Networking 15 03-30-2015 02:39 PM
PPP establish can ping the gateway router but unable to ping the host deepalalla Linux - Networking 0 11-18-2004 09:10 AM
windows 98 m/c ping to ip address of red hat server but fails to ping hostname ravilohot Linux - Networking 2 09-07-2004 04:57 AM
no ping results (no net) on old laptop CodeCrush Linux - Networking 7 08-09-2004 06:05 AM
ways to log command 'ping' 'telnet' noelcantona Programming 3 09-28-2003 07:10 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:04 PM.

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