[root@dhcp-nebula-priv-52-7 pinger-2.0.3]# cat /usr/local/share/pinger/pingerCronStat.stderr
SrcIP could not be determined. Without the results produced by PingER2 are not useable.
[root@dhcp-nebula-priv-52-7 pinger-2.0.3]#

pinger2.pl uses /usr/local/share/pinger/dnsV4Cmd.pl to derive the IP address from the name.

if (scalar(@ARGV) > 0){
my $hostname = $ARGV[0];
my ($true_name, $aliases, $addrtype, $addrlength, @addrs) = gethostbyname($hostname);

if (defined $true_name) {
my ($a, $b, $c, $d) = unpack('C4', $addrs[0]);

print "$a.$b.$c.$d\n";
}
};

Check that the SrcName works withe the above script, e.g. 

[root@dhcp-nebula-priv-52-7 pinger-2.0.3]# perl -d /usr/local/share/pinger/dnsV4Cmd.pl dhcp-nebula-124-66.slac.stanford.edu

Loading DB routines from perl5db.pl version 1.32
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main::(/usr/local/share/pinger/dnsV4Cmd.pl:6):
6: if (scalar(@ARGV) > 0){
DB<1> s
main::(/usr/local/share/pinger/dnsV4Cmd.pl:7):
7: my $hostname = $ARGV[0];
DB<1> s
main::(/usr/local/share/pinger/dnsV4Cmd.pl:8):
8: my ($true_name, $aliases, $addrtype, $addrlength, @addrs) = gethostbyname($hostname);
DB<1> s
main::(/usr/local/share/pinger/dnsV4Cmd.pl:10):
10: if (defined $true_name) {
DB<1> s
main::(/usr/local/share/pinger/dnsV4Cmd.pl:11):
11: my ($a, $b, $c, $d) = unpack('C4', $addrs[0]);
DB<1> s
main::(/usr/local/share/pinger/dnsV4Cmd.pl:13):
13: print "$a.$b.$c.$d\n";
DB<1> s
134.79.124.66
Debugged program terminated. Use q to quit or R to restart,
use o inhibit_exit to avoid stopping after program termination,
h q, h R or h o to get additional info.

  • No labels