04-27-2005
ping from Unix script
I have two queries in regard to a Unix script.
1) From a Unix script, I want to read the IP of another remote HP-UX server and want to just check if that machine is reachable or the IP exists. I don't know the login Id and password of the remote machine. I could not properly manage with ping. How can I proceed to do ?
2) I want to see the installed version of Java on the machine where the script will run and check if it is higher than 1.4.2. I did using a bulky code (read the version, cut against the dots and compare one by one). Is there any better/ rugged way to do?
It will be great if someone can give some idea.
Regards
AC
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
how do i change and ip in sco unix. (10 Replies)
Discussion started by: pdoug76
10 Replies
2. UNIX for Dummies Questions & Answers
I have Digital UNIX V4.0B (Rev. 564) on alpha machine.
I'm trying to acces network in subnet (192.168.1.x).
Ip on Alpha comp. is from 192.168.3.X subnet. My default gateway on this network is 192.168.3.1 and it working OK from other machines. This machine is visible from same subnet... (2 Replies)
Discussion started by: ermingut
2 Replies
3. IP Networking
I have one problem and it is giving me hard time
I can ping my windows machine
root@x1ChXpress:/sbin
>ping 192.168.129.66
192.168.129.66 is alive
root@x1ChXpress:/sbin
>netstat -rn
Routing Table:
Destination Gateway Flags Ref Use Interface... (3 Replies)
Discussion started by: amon
3 Replies
4. Programming
Hi Friends,
Can some one please guide me on how to make a script run on a remote UNIX machine from a java application.
Or may if you can just tell me how do u ping to the remote UNIX machine using java code.
Been looking for the solution since 5-6 hrs, didn't got any where near :(
Thanks. (1 Reply)
Discussion started by: Sanjay MD
1 Replies
5. Red Hat
Hi All,
I have recently setup a Windows 2003 server as AD / Domain Controller. In it, I have a VMWare for RHEL 4. I have 3 other computers connected to the network all using Windows 7. These computers can ping each other by name. But none of these can ping the Unix OS in the VMWare of the... (5 Replies)
Discussion started by: adshocker
5 Replies
6. Shell Programming and Scripting
Hi,
I need to ping all the systems in my network and then create a log for the ones, from where I successfully get the ping-response (ICMP packet).
Now, I've used the ping command successfully, but am unable to use 'grep' command to locate the IPs for which the ping was successful (so that I... (5 Replies)
Discussion started by: psychoTHEIST
5 Replies
7. Shell Programming and Scripting
Hi,
I develop simple animation ping script on Solaris Platform. It is like Cisco ping.
Examples and source code are below.
bash-3.00$ gokcell 152.155.180.8 30
Sending 30 Ping Packets to 152.155.180.8
!!!!!!!!!!!!!.!!!!!!!!!!!!!!!.
% 93.33 success... % 6.66 packet loss...... (1 Reply)
Discussion started by: gokcell
1 Replies
8. Shell Programming and Scripting
HI,
I have a file serverlist in that all host names are placed.
i have written a small script
#./testping
#! /bin/bash
for i in `cat serverlist`
do
ping $i >> output.txt
done
so now it creates a file output.txt till here fine..
now each time i run this script the output file... (4 Replies)
Discussion started by: madhudeva
4 Replies
9. IP Networking
All of sudden in this morning, some computers could not connect to our UNIX server while other still could.
Some computers could ping the server while some could not.
Same on the server side.
It could ping some clients but not some.
All Windows clients could ping each other.
And more, the... (1 Reply)
Discussion started by: jonapa
1 Replies
10. Programming
help with bash script!
im am working on this script to make sure my server will stay online, so i made this script..
HOSTS="192.168.138.155"
COUNT=4
pingtest(){
for myhost in "$@"
do
ping -c "$COUNT" "$myhost" &&return 1
done
return 0
}
if pingtest $HOSTS
#100% failed... (4 Replies)
Discussion started by: mort3924
4 Replies
LEARN ABOUT CENTOS
ipa-replica-conncheck
ipa-replica-conncheck(1) IPA Manual Pages ipa-replica-conncheck(1)
NAME
ipa-replica-conncheck - Check a replica-master network connection before installation
SYNOPSIS
ipa-replica-conncheck [OPTION]...
DESCRIPTION
When an IPA replica is being installed a network connection between a replica machine and a replicated IPA master machine has to be pre-
pared for master-replica communication. In case of a flawed connection the installation may fail with inconvenient error messages. A common
connection problem is a misconfigured firewall with closed required port on a replica or master machine.
The connection is checked by running a set of tests from both master and replica machines. The program is incorporated to
ipa-replica-install(1) but can be also run separately.
OPTIONS
REPLICA MACHINE OPTIONS
This set of options is used when the connection check is run on a prepared IPA replica machine.
-m MASTER, --master=MASTER
Remote master machine address
-a, --auto-master-check
Automatically log in to master machine and execute the master machine part of the connection check. The following options for
replica part are only evaluated when this option is set
-r REALM, --realm=REALM
The Kerberos realm name for the IPA server
-k KDC, --kdc=KDC
KDC server address. Defaults t MASTER
-p PRINCIPAL, --principal=PRINCIPAL
Authorized Kerberos principal to use to log in to master machine. Defaults to admin
-w PASSWORD, --password=PASSWORD
Password for given principal. The password will be prompted interactively when this option is missing
MASTER MACHINE OPTIONS
This set of options is used when the connection check is run on a master machine against a running ipa-replica-conncheck(1) on a replica
machine.
-R REPLICA, --replica=REPLICA
Remote replica machine address
COMMON OPTIONS
-c, --check-ca
Include in a check also a set of dogtag connection requirements. Only needed when the master was installed with Dogtag 9 or lower.
-h HOSTNAME, --hostname=HOSTNAME
The hostname of this server (FQDN). By default a nodename from uname(2) is used
-d, --debug
Print debugging information
-q, --quiet
Output only errors
EXAMPLES
ipa-replica-conncheck -m master.example.com
Run a replica machine connection check against a remote master master.example.com. If the connection to the remote master machine is
successful the program will switch to listening mode and prompt for running the master machine part. The second part check the con-
nection from master to replica.
ipa-replica-conncheck -R replica.example.com
Run a master machine connection check part. This is either run automatically by replica part of the connection check program (when
-a option is set) or manually by the user. A running ipa-replica-conncheck(1) in a listening mode must be already running on a
replica machine.
ipa-replica-conncheck -m master.example.com -a -r EXAMPLE.COM -w password
Run a replica-master connection check. In case of a success switch to listening mode, automatically log to master.example.com in a
realm EXAMPLE.COM with a password password and run the second part of the connection check.
EXIT STATUS
0 if the connection check was successful
1 if an error occurred
SEE ALSO
ipa-replica-install(1)
IPA
Jun 2 2011 ipa-replica-conncheck(1)