RE: script or other suggestion
- From: chloe K <chloekcy2000@xxxxxxxx>
- Date: Fri, 23 Nov 2007 11:17:06 -0500 (EST)
this is very fast
how come sometimes I get the hostname, most of the time it can't
how can I have hostname to print it out?
Host 192.168.63.245 appears to be up.
Host 192.168.63.246 appears to be up.
Host 192.168.63.247 appears to be up.
Host 192.168.63.248 appears to be up.
Host zzz.com (192.168.63.249) appears to be up.
Host 192.168.63.250 appears to be up.
Host 192.168.63.251 appears to be up.
Thank you
Jim Canfield <jcanfield@xxxxxxxxxxx> wrote: or...just use nmap to ping a range.
EX: nmap -sP 192.168.1.1-254
----- Original Message -----
From: chloe K
Sent: Fri Nov 23 2007 08:56:31 GMT-0600 (CST)
To: General Red Hat Linux discussion list
Subject: RE: script or other suggestion
Thank you
how to use dns lookups
thank you again
"Broekman, Maarten" wrote: Why not just do DNS lookups to see which ones are assigned?
To build on what Cameron mentioned, just put in "host $i" in the loop
and check to see it returns anything sane. If so, you might want to
ping it to see if it's up, but as Cameron said, the system could be down
or off so that's not 100% reliable.
Maarten Broekman
Email: maarten.broekman@xxxxxxx
-----Original Message-----
From: redhat-list-bounces@xxxxxxxxxx
[mailto:redhat-list-bounces@xxxxxxxxxx] On Behalf Of Cameron Simpson
Sent: Thursday, November 22, 2007 4:10 PM
To: General Red Hat Linux discussion list
Subject: Re: script or other suggestion
On 22Nov2007 15:35, chloe K wrote:
| I have ip list in my network
| I need to check which ip is unused
| what is better solution?
|
| Write the ping script or use other command
|
| eg:
|
| for i in ip.txt
| ping -c 3 $i
That would be:
for i in `cat ip.txt`
do ping -c 3 $i || { echo "IP $i is not in use."; break; }
done
Of course, if a machine happens to be down/off, if will look
like its IP is not in use...
You could possibly do something clever with nmap or "ping -b",
but your approach is simple and effective.
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
Getting a SCSI chain working is perfectly simple if you remember that
there
must be exactly three terminations: one on one end of the cable, one on
the
far end, and the goat, terminated over the SCSI chain with a
silver-handled
knife whilst burning *black* candles. - Anthony DeBoer
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
---------------------------------
Instant message from any web browser! Try the new Yahoo! Canada Messenger for the Web BETA
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
---------------------------------
Looking for a X-Mas gift? Everybody needs a Flickr Pro Account!
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
- Follow-Ups:
- Re: script or other suggestion
- From: Herta Van den Eynde
- Re: script or other suggestion
- References:
- RE: script or other suggestion
- From: Jim Canfield
- RE: script or other suggestion
- Prev by Date: RE: script or other suggestion
- Next by Date: Can't boot after compile kernel-2.6.23.1
- Previous by thread: RE: script or other suggestion
- Next by thread: Re: script or other suggestion
- Index(es):
Relevant Pages
- Re: BBC programme re: re-cyclling computers
... trying to connect to a service that is inactive on the foreign host. ... hostname,
did it resolve to the correct address? ... Open up a Command Prompt Window & do a Ping
of the Host heidi.ie ... Resolving the HostName OK & what IP Address it's Resolving it
to ... (uk.people.silversurfers) - Re: What is the difference between "No address associated with name" and "Unknown host"
... ping: cannot resolve accounts.eirtrade.ie: No address associated with name ...
ping: cannot resolve accounts.eirtrade.i: Unknown host ... Because the domain name server
cannot be found, it is not possible to tell the IP address of the given hostname. ... (freebsd-questions) - Ping IPv6 host by hostname
... In the host table of the Solaris system I have placed ... I can ping
the Windows system by IP address ... but I can't ping it by hostname. ... (SunManagers) - Re: connecting via broadband?
... > Ping statistics for 193.252.22.137: ... >> mail server and
that it is responsive so you get a mail session ... >> host that responds to 'ping' does
NOT mean the server program is ... >> actually running or responsive on that host.
... (microsoft.public.outlook.general) - Re: host availability
... >>>google.com, my default gateway, comcast's mail server etc. ... a
host was "up or down". ... If you don't get an answer to a ping request, ...
happened to reset the interface right then, remote system got trojaned ... (comp.security.firewalls)