03-19-2003
Sorry, I may be telling you wrong on that part. I don't have a computer set up to test Perl right now.. you could try pushing the result directly into the @results array:
# now ping all machines
foreach (@pinglist) {
push(@result, system("ping $_"));
}
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I know how to ping in Perl. That is easy. What I am wondering is if there is a way for Perl to determine whether the ping was successful or not. Or do I need to save the results out and parse the results seperately looking for the #of tries and successful revieves.
Thanks. (1 Reply)
Discussion started by: gdboling
1 Replies
2. Shell Programming and Scripting
All
Please help, i will telnet to router to obain the ping status and compare, if higher than normal latency, i will have further action..
if i do the telent and in perl script then ....
e.g the result i obtain from the router will be =' Success rate is 100 percent (5/5), round-trip... (4 Replies)
Discussion started by: optimus
4 Replies
3. Shell Programming and Scripting
Dear All
Any one able been writing any command ping in perl??basically i want to wring ping script to send 1000 packet ping then initiate "Ctrl C' terminal to ping example below:-]
#!/usr/local/bin/perl
$r=`/bin/ping 172.23.11.254`;
Thank You
---------- Post updated at 10:27 PM ----------... (2 Replies)
Discussion started by: netxus
2 Replies
4. Shell Programming and Scripting
Hi,
I have this script in ksh, what it does is loop every ip in the nodes_nso and produced another variable up_nodes_nso of only ip's that are up.
nodes_nso=$(cat /var/tmp/nodes.txt)
echo "ICMP Tests:"
up_nodes_nso=""
for ip in ${nodes_nso} ; do
ping ${ip} 3 > /dev/null
if ; then
... (1 Reply)
Discussion started by: borderblaster
1 Replies
5. Programming
Hi All
i have an issue with ping, we are using dhcp and so if the machine has been offline and i ping it, i get " ping: unknown host <hostname>
is there a way i can stick a loop somewhere so it would keep trying when it got the unknown host error and then when the machine came back online... (2 Replies)
Discussion started by: ab52
2 Replies
6. Shell Programming and Scripting
Hi There
i have little situation that i could us some help with. We have a dhcp server, but the problem is if that a machine has been offline for a while it loose it's lease and so if you ping it you get unknown host
if there a way using perl that it will continue to try and ping it, even tho... (1 Reply)
Discussion started by: ab52
1 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
I have written perl ping program to ping list of IPs one by one and print the status.But each and every time it is showing the status as Pass for all IPs even though the IP is wrong.
multipleip.pl
use Net::Ping;
$p = Net::Ping->new();
$ifile="inventory.txt";
... (2 Replies)
Discussion started by: scriptscript
2 Replies
9. Shell Programming and Scripting
Hi all,
I am using the below code to ping a code and print whehter the connection is successful or not.
use Net::Ping;
$p = Net::Ping->new();
my $host = "x.x.x.x";
# print "$host is alive.\n" if $p->ping($host);
if ($p->ping($host,3))
{
print... (0 Replies)
Discussion started by: scriptscript
0 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
slasq5.f
slasq5.f(3) LAPACK slasq5.f(3)
NAME
slasq5.f -
SYNOPSIS
Functions/Subroutines
subroutine slasq5 (I0, N0, Z, PP, TAU, SIGMA, DMIN, DMIN1, DMIN2, DN, DNM1, DNM2, IEEE, EPS)
SLASQ5 computes one dqds transform in ping-pong form. Used by sbdsqr and sstegr.
Function/Subroutine Documentation
subroutine slasq5 (integerI0, integerN0, real, dimension( * )Z, integerPP, realTAU, realSIGMA, realDMIN, realDMIN1, realDMIN2, realDN,
realDNM1, realDNM2, logicalIEEE, realEPS)
SLASQ5 computes one dqds transform in ping-pong form. Used by sbdsqr and sstegr.
Purpose:
SLASQ5 computes one dqds transform in ping-pong form, one
version for IEEE machines another for non IEEE machines.
Parameters:
I0
I0 is INTEGER
First index.
N0
N0 is INTEGER
Last index.
Z
Z is REAL array, dimension ( 4*N )
Z holds the qd array. EMIN is stored in Z(4*N0) to avoid
an extra argument.
PP
PP is INTEGER
PP=0 for ping, PP=1 for pong.
TAU
TAU is REAL
This is the shift.
DMIN
DMIN is REAL
Minimum value of d.
DMIN1
DMIN1 is REAL
Minimum value of d, excluding D( N0 ).
DMIN2
DMIN2 is REAL
Minimum value of d, excluding D( N0 ) and D( N0-1 ).
DN
DN is REAL
d(N0), the last value of d.
DNM1
DNM1 is REAL
d(N0-1).
DNM2
DNM2 is REAL
d(N0-2).
IEEE
IEEE is LOGICAL
Flag for IEEE or non IEEE arithmetic.
Author:
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date:
September 2012
Definition at line 132 of file slasq5.f.
Author
Generated automatically by Doxygen for LAPACK from the source code.
Version 3.4.2 Tue Sep 25 2012 slasq5.f(3)