Re: ping problems

2009-05-27 Thread Aviv Greenberg
Try netstat -s to checks for errors/drops on the WAN interface.
Anything interesting?

If a ping from the router always succeeds, and after some time fails
from the lan AND during failure you see the packets go from the lan
out to the wan but doesn't come back at all - it sounds like something
is wrong with the outgoing ping request packet.

Did you see any difference between a "goog" ping and "bad ping packets?

On Wed, May 27, 2009 at 10:05, Erez D  wrote:
>
>
> On Wed, May 27, 2009 at 9:41 AM, Aviv Greenberg  wrote:
>>
>> If you ping another destination during the "hang" - does it work?
>
> a download i started before the ping continues even after the ping is dead
>>
>> If you ifdown and ifup the interfaces (wan + lan) on the router after
>> a hang - is it released?
>> an icmp packet is short so i don't think this is the case but: what is
>> the MTU on the lan/wan?
>
> as you said, the ping packets are smaller then the mtu (and all are same
> size)
> also ping is connectionless, so it makes sense if the lost packets are
> spread randomly
> but not if in the beginning all pass and in the end all fail
>>
>>
>> Also, use a tool like mtr
>> http://en.wikipedia.org/wiki/Mtr_(My_traceroute) to detect any packet
>> loss along the route.
>
> mtr works from both router and lan
> there is some packet lost on the closer servers, but none at the target
> but it is the same for both router and lan.
>
> thanks,
> erez.
>>
>>
>> 2009/5/27 Erez D :
>> > hi
>> >
>> > i have an openwrt (linux) router, with regular firewall rules (nat,
>> > related+established,clamp-mss-to-pmtu, etc).
>> >
>> > if i ping from the router to the internet, it works ok
>> > however if i ping from inside my lan to the internet, the first 30-70
>> > pings
>> > works, then it stops working (i.e. 100% packet lost after the first
>> > 30-70)
>> > using tcpdump inside my router shows the icmps going through the wan
>> > interface but none come back.
>> >
>> > any idea ?
>> > erez.
>> >
>> > ___
>> > Linux-il mailing list
>> > Linux-il@cs.huji.ac.il
>> > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>> >
>> >
>>
>>
>>
>> --
>>
>> Frank Lloyd Wright  - "TV is chewing gum for the eyes." -
>> http://www.brainyquote.com/quotes/authors/f/frank_lloyd_wright.html
>
>



-- 

Mitch Hedberg  - "My fake plants died because I did not pretend to
water them." - http://www.brainyquote.com/quotes/authors/m/mitch_hedberg.html

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: ping problems

2009-05-27 Thread Erez D
On Wed, May 27, 2009 at 9:41 AM, Aviv Greenberg  wrote:

> If you ping another destination during the "hang" - does it work?

a download i started before the ping continues even after the ping is dead

>
> If you ifdown and ifup the interfaces (wan + lan) on the router after
> a hang - is it released?
> an icmp packet is short so i don't think this is the case but: what is
> the MTU on the lan/wan?

as you said, the ping packets are smaller then the mtu (and all are same
size)
also ping is connectionless, so it makes sense if the lost packets are
spread randomly
but not if in the beginning all pass and in the end all fail

>
>
> Also, use a tool like mtr
> http://en.wikipedia.org/wiki/Mtr_(My_traceroute)to
>  detect any packet
> loss along the route.

mtr works from both router and lan
there is some packet lost on the closer servers, but none at the target
but it is the same for both router and lan.

thanks,
erez.

>
>
> 2009/5/27 Erez D :
> > hi
> >
> > i have an openwrt (linux) router, with regular firewall rules (nat,
> > related+established,clamp-mss-to-pmtu, etc).
> >
> > if i ping from the router to the internet, it works ok
> > however if i ping from inside my lan to the internet, the first 30-70
> pings
> > works, then it stops working (i.e. 100% packet lost after the first
> 30-70)
> > using tcpdump inside my router shows the icmps going through the wan
> > interface but none come back.
> >
> > any idea ?
> > erez.
> >
> > ___
> > Linux-il mailing list
> > Linux-il@cs.huji.ac.il
> > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
> >
> >
>
>
>
> --
>
> Frank Lloyd Wright  - "TV is chewing gum for the eyes." -
> http://www.brainyquote.com/quotes/authors/f/frank_lloyd_wright.html
>
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: ping problems

2009-05-26 Thread Aviv Greenberg
If you ping another destination during the "hang" - does it work?
If you ifdown and ifup the interfaces (wan + lan) on the router after
a hang - is it released?
an icmp packet is short so i don't think this is the case but: what is
the MTU on the lan/wan?

Also, use a tool like mtr
http://en.wikipedia.org/wiki/Mtr_(My_traceroute) to detect any packet
loss along the route.

2009/5/27 Erez D :
> hi
>
> i have an openwrt (linux) router, with regular firewall rules (nat,
> related+established,clamp-mss-to-pmtu, etc).
>
> if i ping from the router to the internet, it works ok
> however if i ping from inside my lan to the internet, the first 30-70 pings
> works, then it stops working (i.e. 100% packet lost after the first 30-70)
> using tcpdump inside my router shows the icmps going through the wan
> interface but none come back.
>
> any idea ?
> erez.
>
> ___
> Linux-il mailing list
> Linux-il@cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
>



-- 

Frank Lloyd Wright  - "TV is chewing gum for the eyes." -
http://www.brainyquote.com/quotes/authors/f/frank_lloyd_wright.html

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: ping....

2004-03-19 Thread Boaz Rymland
Hmm... maybe related, maybe not: on tuesday, IIRC, my postfix 
configuration, which utilize anti UCE checks through 
proxies.relays.monkeys.com started rejecting mails from _anywhere_. As I 
saw no information about this in the media (although I searched) and 
since I don't have much time to debug this, the only solution I've found 
is to disable this RBL check.
Maybe this scenario "worked" for you too?

BTW, anyone else seen this ? I saw no headlines like "monkeys RBL server 
blacklisted the world..." as it was with that other service not so long 
ago.

BR.

Diego Iastrubni wrote:

Last message I got was from "Yesterday" before it was "Monday 15:04:14".

Is this list dead or having problems?
(cc when replying)
 

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]


Re: ping....

2004-03-17 Thread Shlomi Fish
On Wednesday 17 March 2004 19:24, Diego Iastrubni wrote:
> Last message I got was from "Yesterday" before it was "Monday 15:04:14".
>
> Is this list dead or having problems?
> (cc when replying)

Hi Diego!

It seems you have problems in receiving mail from this list. I received many 
other messages. You can see the messages that were received since in the 
archives.

Regards,

Shlomi Fish
-- 

-
Shlomi Fish  [EMAIL PROTECTED]
Homepage:http://shlomif.il.eu.org/

Quidquid latine dictum sit, altum viditur.
[Whatever is said in Latin sounds profound.]

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: [Fwd: Re: ping....+ database project question]

2003-10-19 Thread Omer Zak

On Sun, 19 Oct 2003, Maxim K. wrote:

> Abstract:
> the db will contain information about real estates (flats/houses etc.)
> i thought in OOD terms, and came to:
> address, person, estate- data  "objects" or - tables.using these
> terms, there will be relations between these tables.
>
> i understand there's solution of "simply" putting it all into 1 huge
> table.and search by simple or/and matches. what i don't unserstand is:
> how do i decide how much to go down with the most basic tables, vs. one
> huge table.
> as someone pointed this out to be the "normalization" question.
>
> Q1: where do i read about it ?

At home I have a book about practical issues of database design.  I don't
remember the author name, but the book explains about normalization,
about mistaken notions about relational databases in general, etc.

> Q2: which platform shall i use for the GUI frontend of this DB, given
> that i chose the DBMS to be PostgreSQL.
> i have written in: C, C++, Java
> (i see C isn't much of a help in GUI...except maybeGTK frontend)
> i think i also can handle Python.
> which tools are there ? what you suggest ?
> need Hebrew support, of course .. so if GUI supports - good for it.

You may want to design your system as a 3-part system:
- Database backend
- Web site (running on your own PC): server, CGI scripts and Web pages
- The GUI will be provided by your browser (Mozilla, if you have the
  freedom to choose a platform).

BiDi/Hebrew support is good out of the box.

If you prefer to do without Web server, you can develop your application
as a Mozilla chrome, and then you'll have database backend and browser
frontend.  Refer to the O'Reilly book "Developing applications with
Mozilla".
 --- Omer
My opinions, as expressed in this E-mail message, are mine alone.
They do not represent the official policy of any organization with which
I may be affiliated in any way.
WARNING TO SPAMMERS:  at http://www.zak.co.il/spamwarning.html


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: ping....

2003-10-19 Thread Shachar Shemesh
Diego Iastrubni wrote:

sorry... i remember when this list had about 10-20 mails per day... 

we about less then 30 the last week... 
 

I think this is just a slow month. People are aborad or similar.

Knowing this list, it's enough for one or two people to be abroad to 
lessen the load, assuming these are the right people.

Looking at the archives 
(http://mirror.hamakor.org.il/archives/linux-il/), you can see that last 
month had pretty much the volumes you are talking about.

 Shachar

--
Shachar Shemesh
Open Source integration consultant
Home page & resume - http://www.shemesh.biz/


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]


[Fwd: Re: ping....+ database project question]

2003-10-18 Thread Maxim K.

sorry... i remember when this list had about 10-20 mails per day... 

we about less then 30 the last week... 
pre-semestral silence ... the silence before the storm :)
and there were many problems with the mail last weeks - virii etc.
maybe this explains... but hey!

People, start asking.
i will ask ! i need to build a database.i haven't built any databases
yet (i did access db's though)here's the questions i have:
Abstract:
the db will contain information about real estates (flats/houses etc.)
i thought in OOD terms, and came to:
address, person, estate  - data  "objects" or - tables.using these
terms, there will be relations between these tables.
i understand there's solution of "simply" putting it all into 1 huge
table. and search by simple or/and matches. what i don't unserstand is:
how do i decide how much to go down with the most basic tables, vs. one
huge table.
as someone pointed this out to be the "normalization" question.
Q1: where do i read about it ?

books/links appreciated.
real examples appreciated too.
Q2: which platform shall i use for the GUI frontend of this DB, given
that i chose the DBMS to be PostgreSQL.
i have written in: C, C++, Java
(i see C isn't much of a help in GUI...except maybe GTK frontend)
i think i also can handle Python.
which tools are there ? what you suggest ?
need Hebrew support, of course .. so if GUI supports - good for it.
Thanks in advance!

M.









=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]


Re: ping....

2003-10-18 Thread Idan Sofer
On Saturday 18 October 2003 23:27, Diego Iastrubni wrote:
> sorry... i remember when this list had about 10-20 mails per day...
>
> we about less then 30 the last week...
Trolls to the rescue!:-D


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: ping

2001-05-31 Thread Dani Arbel

You can always take the ping source and modify it to your own needs. no
big deal.
Dani

On Thu, 31 May 2001, Noam Meltzer wrote:

> Well guys thank you all... but that what i really didn't want... sctipts
> i can write my self.
> What i really wanted is to find out if you can get what the ping binary
> in solaris does not a scripts to emulate it.
> Is there such a tool for linux?
> 
> Noam
> 
> rcs wrote:
> 
>  > Ooops!
>  > and
>  > if [ $# != 2 ]...
>  > should be
>  > if [ $# != 1 ]
>  >
>  > Sorry, it's been a long long day. here's the new code:
>  >
>  > #!/bin/sh
>  > if [ $# != 1 ]; then echo "usage: $0 "; exit; fi
>  > ping -c 1 $1 >/dev/null 2>&1
>  > if [ $? == 0 ]
>  > then
>  >  echo $1 is alive
>  > else
>  >  echo $1 is not answering (to ICMP echo-request)
>  > fi
>  >
>  > Oleg Goldshmidt <[EMAIL PROTECTED]> wrote:
>  >
>  >> rcs <[EMAIL PROTECTED]> writes:
>  >>
>  >>> #!/bin/sh
>  >>> if [ $# != 2 ]; then echo "usage: $0 "; exit; fi
>  >>> ping -c 1 $1
>  >>> if [ $? == 0 ]
>  >>> then
>  >>>  echo $0 is alive.
>  >>> else
>  >>>  echo $0 is not answering (to ICMP echo-request).
>  >>> fi
>  >>
>  >> $0 should be $1, shouldn't it?
>  >>
>  >> --
>  >> Oleg Goldshmidt | [EMAIL PROTECTED]
>  >> If it aint't broken it hasn't got enough features yet.
>  >
> 
> 
> 
> =
> To unsubscribe, send mail to [EMAIL PROTECTED] with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail [EMAIL PROTECTED]
> 


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: ping

2001-05-31 Thread Oded Arbel

Then just
ping -c 
and check the error code. if its non zero, then none of the packets
returned, else at least one packet returned. sound to me like the same
functionality.

Oded

--
Beauty unaware of itself is the most beautiful



- Original Message -
From: Noam Meltzer
To: guy keren
Cc: IGLU
Sent: Thursday, May 31, 2001 09:56
Subject: Re: ping


patching the original script sounds much more like what i need if i don't
find something else.
on the first look  it might seem like  ping -s on solaris is much better
than the default ping but thats not always the case.
lets assume that you need to get statistics on the status of the network.
statistics like, the host is up or down, just that no more than that. what
ping in solaris does is sending packets to a host until it responds or until
(i'm not sure) a certain time has been exceeded or X packets didn't return.
if one packet returns it's enough. in such cases the solaris' ping is much
more usefull and comfortable to use.


guy keren wrote:

On Thu, 31 May 2001, Noam Meltzer wrote:
Well guys thank you all... but that what i really didn't want... sctiptsi
can write my self.What i really wanted is to find out if you can get what
the ping binaryin solaris does not a scripts to emulate it.Is there such a
tool for linux?
a script _is_ a tool. what is the problem iwth writing this script
andinstalling it somewhere on the system? if yo want, you can turn this
intoa one-line perl script given to perl on the command line.there is no
difference between that and a binary program. btw, the way'ping' behaves on
linux by edfault is more useful then the way it does onsolaris (i.e. 'host
is alive'? that's much less useful then what 'ping -s'gives you on
solaris).btw, why do _you_ think the output on solaris is better then on
linux? forcustomer support via the phone? then tel the user to type 'ping -c
1' andread the output to you.--guy"For world domination - press 1, or dial
0, and please hold, for the creator." -- nob o.
dy=To
unsubscribe, send mail to [EMAIL PROTECTED] withthe word
"unsubscribe" in the message body, e.g., run the commandecho unsubscribe |
mail [EMAIL PROTECTED]


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: ping

2001-05-30 Thread R.C.S

You want a good tool, you'll have to write one :)
maybe the following code will help you out, thought is sends tcp "pings".
it's real "0day" so you might find bugs, but it works.

// TCP Port pinger
// code by rasta

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

extern int h_errno;
//#include "net.h"

#define PORT 80
#define NUMP 1

resolve(const char *host)
{
 struct hostent *h;
 struct in_addr inp;
 if((inet_aton(host,&inp))==0) {
  if((h=gethostbyname(host))==NULL) {
   herror("gethostbyname");
   exit(1);
  }
  memcpy((void *)&inp.s_addr,(const void *)h->h_addr,h->h_length);
 }
 return (inp.s_addr);
}

int main(int argc, char **argv)
{
 int i, s, port, num, t, *tp;
 struct sockaddr_in sock;
 struct hostent *hostname;

 port=PORT;
 num=NUMP;
 t=1; tp=&t;

 if(argc<2) { 
  printf("usage: %s  [num pings] [port]\n",argv[0]); 
  exit(1); }

 if(argc>2) port=atoi(argv[2]);
 if(argc>3) num=atoi(argv[3]);


 sock.sin_family=AF_INET;
 sock.sin_port=htons(port);
 sock.sin_addr.s_addr=resolve(argv[1]);
 bzero((void *)(struct sockaddr *)&sock.sin_zero,8);


 for(i=0;i wrote:
> patching the original script sounds much more like what i need if i 
> don't find something else.
> on the first look  it might seem like  ping -s on solaris is much better 
> than the default ping but thats not always the case.
> lets assume that you need to get statistics on the status of the 
> network. statistics like, the host is up or down, just that no more than 
> that. what ping in solaris does is sending packets to a host until it 
> responds or until (i'm not sure) a certain time has been exceeded or X 
> packets didn't return. if one packet returns it's enough. in such cases 
> the solaris' ping is much more usefull and comfortable to use.
> 
> 
> guy keren wrote:
> 
> > On Thu, 31 May 2001, Noam Meltzer wrote:
> > 
> >> Well guys thank you all... but that what i really didn't want... sctipts
> >> i can write my self.
> >> What i really wanted is to find out if you can get what the ping binary
> >> in solaris does not a scripts to emulate it.
> >> Is there such a tool for linux?
> > 
> > 
> > a script _is_ a tool. what is the problem iwth writing this script and
> > installing it somewhere on the system? if yo want, you can turn this into
> > a one-line perl script given to perl on the command line.
> > 
> > there is no difference between that and a binary program. btw, the way
> > 'ping' behaves on linux by edfault is more useful then the way it does on
> > solaris (i.e. 'host is alive'? that's much less useful then what 'ping -s'
> > gives you on solaris).
> > 
> > btw, why do _you_ think the output on solaris is better then on linux? for
> > customer support via the phone? then tel the user to type 'ping -c 1' and
> > read the output to you.
> > 
> > --
> > guy
> > 
> > "For world domination - press 1,
> >  or dial 0, and please hold, for the creator." -- nob o. dy
> > 
> > 
> > =
> > To unsubscribe, send mail to [EMAIL PROTECTED] with
> > the word "unsubscribe" in the message body, e.g., run the command
> > echo unsubscribe | mail [EMAIL PROTECTED]
> > 
> > 
> > 
> 

-- 
http://www.rshell.org
Join #shellcode on EFnet.
[EMAIL PROTECTED]

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: ping

2001-05-30 Thread Noam Meltzer
patching the original script sounds much more like what i need if i don't find something else.
on the first look  it might seem like  ping -s on solaris is much better than the default ping but thats not always the case.
lets assume that you need to get statistics on the status of the network.
statistics like, the host is up or down, just that no more than that. what
ping in solaris does is sending packets to a host until it responds or until
(i'm not sure) a certain time has been exceeded or X packets didn't return.
if one packet returns it's enough. in such cases the solaris' ping is much
more usefull and comfortable to use.


guy keren wrote:
[EMAIL PROTECTED]">On Thu, 31 May 2001, Noam Meltzer wrote:
  Well guys thank you all... but that what i really didn't want... sctiptsi can write my self.What i really wanted is to find out if you can get what the ping binaryin solaris does not a scripts to emulate it.Is there such a tool for linux?
a script _is_ a tool. what is the problem iwth writing this script andinstalling it somewhere on the system? if yo want, you can turn this intoa one-line perl script given to perl on the command line.there is no difference between that and a binary program. btw, the way'ping' behaves on linux by edfault is more useful then the way it does onsolaris (i.e. 'host is alive'? that's much less useful then what 'ping -s'gives you on solaris).btw, why do _you_ think the output on solaris is better then on linux? forcustomer support via the phone? then tel the user to type 'ping -c 1' andread the output to you.--guy"For world domination - press 1, or dial 0, and please hold, for the creator." -- nob o. dy=To unsubscribe, send mail to [EMAIL PROTECTED] withthe word "unsubscribe" in the message body, e.g., run the commandecho unsubscribe | mail [EMAIL PROTECTED]




Re: ping

2001-05-30 Thread guy keren


On Thu, 31 May 2001, Noam Meltzer wrote:

> Well guys thank you all... but that what i really didn't want... sctipts
> i can write my self.
> What i really wanted is to find out if you can get what the ping binary
> in solaris does not a scripts to emulate it.
> Is there such a tool for linux?

a script _is_ a tool. what is the problem iwth writing this script and
installing it somewhere on the system? if yo want, you can turn this into
a one-line perl script given to perl on the command line.

there is no difference between that and a binary program. btw, the way
'ping' behaves on linux by edfault is more useful then the way it does on
solaris (i.e. 'host is alive'? that's much less useful then what 'ping -s'
gives you on solaris).

btw, why do _you_ think the output on solaris is better then on linux? for
customer support via the phone? then tel the user to type 'ping -c 1' and
read the output to you.

--
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: ping

2001-05-30 Thread Noam Meltzer

Well guys thank you all... but that what i really didn't want... sctipts
i can write my self.
What i really wanted is to find out if you can get what the ping binary
in solaris does not a scripts to emulate it.
Is there such a tool for linux?

Noam

rcs wrote:

 > Ooops!
 > and
 > if [ $# != 2 ]...
 > should be
 > if [ $# != 1 ]
 >
 > Sorry, it's been a long long day. here's the new code:
 >
 > #!/bin/sh
 > if [ $# != 1 ]; then echo "usage: $0 "; exit; fi
 > ping -c 1 $1 >/dev/null 2>&1
 > if [ $? == 0 ]
 > then
 >  echo $1 is alive
 > else
 >  echo $1 is not answering (to ICMP echo-request)
 > fi
 >
 > Oleg Goldshmidt <[EMAIL PROTECTED]> wrote:
 >
 >> rcs <[EMAIL PROTECTED]> writes:
 >>
 >>> #!/bin/sh
 >>> if [ $# != 2 ]; then echo "usage: $0 "; exit; fi
 >>> ping -c 1 $1
 >>> if [ $? == 0 ]
 >>> then
 >>>  echo $0 is alive.
 >>> else
 >>>  echo $0 is not answering (to ICMP echo-request).
 >>> fi
 >>
 >> $0 should be $1, shouldn't it?
 >>
 >> --
 >> Oleg Goldshmidt | [EMAIL PROTECTED]
 >> If it aint't broken it hasn't got enough features yet.
 >



=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: ping

2001-05-29 Thread Yotam Rubin

ping does not natively make those 'deductions', be it is easy to write a 
wrapper that does that for you. Something like:
case `ping -qc 5 $1` in
 *'100% packet loss'*) 
   echo "Target host $1 does not respond to ICMP echo requests."
 ;;
 *) 
   echo "Target host $1 responds to ICMP echo requests."
 ;;
esac


On Tue, May 29, 2001 at 11:48:14PM -0700!@?#?%?, Noam Meltzer wrote:
> Hi!
> I know that on Solaris the output of "ping" is " is alive" or 
> "service not avaiable" (or something like that)
> i was wandering how i can achieve such answer in linux.
> 
> noam
> 
> 
> =
> To unsubscribe, send mail to [EMAIL PROTECTED] with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail [EMAIL PROTECTED]
> 

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: ping

2001-05-29 Thread R.C.S

Oleg Goldshmidt <[EMAIL PROTECTED]> wrote:
> rcs <[EMAIL PROTECTED]> writes:
> 
> > #!/bin/sh
> > if [ $# != 2 ]; then echo "usage: $0 "; exit; fi
> > ping -c 1 $1
> > if [ $? == 0 ]
> > then
> >  echo $0 is alive.
> > else
> >  echo $0 is not answering (to ICMP echo-request).
> > fi
> 
> $0 should be $1, shouldn't it?

Yea ofcource. 


> 
> -- 
> Oleg Goldshmidt | [EMAIL PROTECTED] 
> If it aint't broken it hasn't got enough features yet.

-- 
http://www.rshell.org
Join #shellcode on EFnet.
[EMAIL PROTECTED]

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: ping

2001-05-29 Thread rcs

Ooops!
and 
if [ $# != 2 ]...
should be 
if [ $# != 1 ]

Sorry, it's been a long long day. here's the new code:

#!/bin/sh
if [ $# != 1 ]; then echo "usage: $0 "; exit; fi
ping -c 1 $1 >/dev/null 2>&1
if [ $? == 0 ]
then
 echo $1 is alive 
else
 echo $1 is not answering (to ICMP echo-request)
fi

Oleg Goldshmidt <[EMAIL PROTECTED]> wrote:
> rcs <[EMAIL PROTECTED]> writes:
> 
> > #!/bin/sh
> > if [ $# != 2 ]; then echo "usage: $0 "; exit; fi
> > ping -c 1 $1
> > if [ $? == 0 ]
> > then
> >  echo $0 is alive.
> > else
> >  echo $0 is not answering (to ICMP echo-request).
> > fi
> 
> $0 should be $1, shouldn't it?
> 
> -- 
> Oleg Goldshmidt | [EMAIL PROTECTED] 
> If it aint't broken it hasn't got enough features yet.

-- 
http://www.rshell.org
Join #shellcode on EFnet.
[EMAIL PROTECTED]

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: ping

2001-05-29 Thread Oleg Goldshmidt

rcs <[EMAIL PROTECTED]> writes:

> #!/bin/sh
> if [ $# != 2 ]; then echo "usage: $0 "; exit; fi
> ping -c 1 $1
> if [ $? == 0 ]
> then
>  echo $0 is alive.
> else
>  echo $0 is not answering (to ICMP echo-request).
> fi

$0 should be $1, shouldn't it?

-- 
Oleg Goldshmidt | [EMAIL PROTECTED] 
If it aint't broken it hasn't got enough features yet.

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: ping

2001-05-29 Thread rcs

#!/bin/sh
if [ $# != 2 ]; then echo "usage: $0 "; exit; fi
ping -c 1 $1
if [ $? == 0 ]
then
 echo $0 is alive.
else
 echo $0 is not answering (to ICMP echo-request).
fi

Noam Meltzer <[EMAIL PROTECTED]> wrote:
> Hi!
> I know that on Solaris the output of "ping" is " is alive" or 
> "service not avaiable" (or something like that)
> i was wandering how i can achieve such answer in linux.
> 
> noam
> 
> 
> =
> To unsubscribe, send mail to [EMAIL PROTECTED] with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail [EMAIL PROTECTED]

-- 
http://www.rshell.org
Join #shellcode on EFnet.
[EMAIL PROTECTED]

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]