04-14-2010
Thanks folks.
for amitranjansahu:
I didn't have any luck with the script. I'd like to be able to scan all servers inside /etc/hosts one at a time for ping connection and some servers for a specific connection such as Oracle or MySql
For ygemici:
I did try using your script but it wasn't able to read the hostname ( i made change as well because field 8 is empty and it had to be changed to field 6)
Also my hostfile is under /etc/hosts (the script complained about not knowing the hostfile)
9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I am going to take up a position in Data & Network Security.
I would need to write network shell scripts doing the following task:
Going to around 2000 servers and findout which groups has access to each servers and which ids are there in each group that has access.
I need to implement... (1 Reply)
Discussion started by: pinnacle
1 Replies
2. Shell Programming and Scripting
I want to test if my host can connect to any of the following 10 hosts (192.168.1.0 to 192.168.1.9)
I didnt know which command i should use, so i chose ping. (i wonder if i should use tracepath or sth else)
my code is the following:
#!/bin/bash
clear
firstPart="192.168.1"
maxNum="9"
... (2 Replies)
Discussion started by: shadow_boi
2 Replies
3. Shell Programming and Scripting
This is the code:
while test 1 -eq 1
do
read a
$a
if test $a = stop
then
break
fi
done
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
Discussion started by: Max89
1 Replies
4. Shell Programming and Scripting
How to check weather a string is like test* or test* ot *test* in if condition (5 Replies)
Discussion started by: johnjerome
5 Replies
5. IP Networking
hi, I've wrote my own network routing algorithm in java, now i wanna test it and see if it works correctly, also i wanna test it's performance in comparison with other network routing algorithms like RIP. can anyone tell me how can i do this? is there any simulator or something for network routing... (0 Replies)
Discussion started by: gongotar
0 Replies
6. Shell Programming and Scripting
Hello everyone,
I have 2 questions :
1) I have a backup shell script, let's call it backup.sh, that is called every hour as a cron job.
As a matter of fact a backup could last more than one hour.
It mounts a NAS and then do some rsync on important directories, so really I don't want to... (2 Replies)
Discussion started by: freddie50
2 Replies
7. IP Networking
Hello,
I'm attempting to setup a test network with a client-server based architecture using a proprietary application. The client works by communicating with the server on separate links (typically cellular connections) and then initiates a tunnel over each active link. However, in place of the... (0 Replies)
Discussion started by: shadyuk
0 Replies
8. Hardware
Dear all,
Would you know how to measure the max speed of a WIFI connection between a router and a laptop for instance?
Many thanks for your help!
Regards, (3 Replies)
Discussion started by: freddie50
3 Replies
9. UNIX for Beginners Questions & Answers
Hi there.
First things first, this is nothing to do with the internet or ISP speed, I know what that is, I know what it's doing.
I have a cluster of 128 single board computers running a branch of Debian. I want to run some kind of stress test to ensure they can transfer data (a) to each... (2 Replies)
Discussion started by: MuntyScrunt
2 Replies
HOSTS(5) File Formats Manual HOSTS(5)
NAME
hosts - hostname to IP address database
SYNOPSIS
/etc/hosts
DESCRIPTION
The hosts database lists the IP addresses and the hostnames that translate to these IP addresses. It is used by nonamed(8) in a network
without name servers. A simple /etc/hosts may look like this:
127.0.0.1 localhost
192.9.200.1 darask
192.9.200.2 burask
The localhost entry lists a special address that refers to the local host itself (a kind of /dev/tty for hosts.) You should only list it
if nonamed needs it! The other entries are actual machines. The file may contain comments marked with '#'.
You can have aliases (more hostnames on the same line), but it is not recommended, because nonamed can't present them to the system as
CNAME records. An often seen form like
192.9.200.1 darask.home.cs.vu.nl darask
is harmless though, and has the small advantage that you can use the short name in /etc/ethers so rarpd can match it at boot time.
FILES
/etc/hosts Hosts database.
SEE ALSO
ethers(5), nonamed(8), rarpd(8), boot(8).
AUTHOR
Kees J. Bot (kjb@cs.vu.nl)
HOSTS(5)