Your last output looks good, but it never gets to line 535 correct? --> Correct
Here the code:
sub ProCount{
my ($dv,$i,$abs,$dlt,$stat,$val) = @_;
if($stat){
$main::int{$dv}{$i}{$abs} = 0 unless $main::int{$dv}{$i}{$abs};
$main::int{$dv}{$i}{$dlt} = 0 unless $main::int{$dv}{$i}{$dlt};
}else{
print " START_else ";
print "+$stat+$abs+$dlt+$val+\n";
print " END_else ";
if($main::int{$dv}{$i}{old}){
print " START_if ";
print "+$stat+$abs+$dlt+$val+\n";
print " END_if ";
my $dval = $val - $main::int{$dv}{$i}{$abs};
if( $val eq '1.84467440737096e+19' ){ # Some Cisco routers got counters stuck at > 64bit!
$val = 1;
Prt("ERR :$abs counter stuck > 64bit!\n",'');
}elsif( $val < 18446744073709551615 and $dval == abs $dval ){ # Nexus can produce overflowing 64-bit counters causing NeDi to die at DB write!
$main::int{$dv}{$i}{$dlt} = $dval;
}else{
Prt("ERR :$abs overflow, not updating\n",'');
}
}else{
$main::int{$dv}{$i}{$dlt} = 0;
}
$main::int{$dv}{$i}{$abs} = $val;
}
}
Here the output:
Network Discovery (1.7.090p2) /var/www/nedi/nedi.pl -a ASR9001
Started with 1 seed at Thu Apr 11 14:56:57 2019
-------------------------------------------------------------------------------
Device Status Todo/Done-Time
===============================================================================
192.168.123.121 ASR9001 Iv START_else ++ioc+dio+0+
END_else START_else ++ooc+doo+0+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+0+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+0+
END_else START_else ++ioc+dio+76577391758+
END_else START_else ++ooc+doo+125547711131+
END_else START_else ++ier+die+4294967293+
END_else START_else ++oer+doe+4294967294+
END_else START_else ++idi+did+3343843+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+4308130828+
END_else START_else ++ioc+dio+51539607540+
END_else START_else ++ooc+doo+1.84467440737096e+19+
END_else START_else ++ier+die+4294967292+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+0+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+8589934590+
END_else START_else ++ioc+dio+0+
END_else START_else ++ooc+doo+0+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+0+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+0+
END_else START_else ++ioc+dio+1023240497932728+
END_else START_else ++ooc+doo+1017265436800277+
END_else START_else ++ier+die+8654027+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+217+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+707803751+
END_else START_else ++ioc+dio+119163845192279+
END_else START_else ++ooc+doo+331832047785213+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+27079220+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+2305699+
END_else START_else ++ioc+dio+0+
END_else START_else ++ooc+doo+0+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+0+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+0+
END_else START_else ++ioc+dio+0+
END_else START_else ++ooc+doo+0+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+0+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+0+
END_else START_else ++ioc+dio+0+
END_else START_else ++ooc+doo+0+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+0+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+0+
END_else START_else ++ioc+dio+0+
END_else START_else ++ooc+doo+0+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+0+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+0+
END_else START_else ++ioc+dio+496059547587110+
END_else START_else ++ooc+doo+500197808777459+
END_else START_else ++ier+die+8653972+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+35+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+417345949+
END_else START_else ++ioc+dio+527180951261227+
END_else START_else ++ooc+doo+517067629015347+
END_else START_else ++ier+die+55+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+0+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+290457802+
END_else START_else ++ioc+dio+0+
END_else START_else ++ooc+doo+0+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+0+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+0+
END_else START_else ++ioc+dio+0+
END_else START_else ++ooc+doo+0+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+0+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+0+
END_else START_else ++ioc+dio+22885768959126+
END_else START_else ++ooc+doo+21464346340502+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+30257794+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+1379437+
END_else START_else ++ioc+dio+384420094344+
END_else START_else ++ooc+doo+53294595426+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+314962951+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+8509042+
END_else START_else ++ioc+dio+21045624547560+
END_else START_else ++ooc+doo+6812821317890+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+25084849+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+21567829+
END_else START_else ++ioc+dio+346490225572+
END_else START_else ++ooc+doo+28902213685+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+8944039+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+3750777+
END_else START_else ++ioc+dio+67546786038068+
END_else START_else ++ooc+doo+31085048013462+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+71788356+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+115626487+
END_else START_else ++ioc+dio+153289158606+
END_else START_else ++ooc+doo+9531232806+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+2174563+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+606258+
END_else START_else ++ioc+dio+72878593041+
END_else START_else ++ooc+doo+177840740980+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+3055126+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+1301961+
END_else START_else ++ioc+dio+50054508303746+
END_else START_else ++ooc+doo+13439715179882+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+2014271+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+307911+
END_else START_else ++ioc+dio+386820637286+
END_else START_else ++ooc+doo+62205384855+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+2103717+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+535650+
END_else START_else ++ioc+dio+711301887135+
END_else START_else ++ooc+doo+153390820951+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+2185637+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+617191+
END_else START_else ++ioc+dio+833657796505+
END_else START_else ++ooc+doo+3868829473895+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+12712644+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+11790206+
END_else START_else ++ioc+dio+2236730029758+
END_else START_else ++ooc+doo+858563388224+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+30643281+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+26302113+
END_else START_else ++ioc+dio+165634789195+
END_else START_else ++ooc+doo+19205031886+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+1622631+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+370327+
END_else START_else ++ioc+dio+182359383447+
END_else START_else ++ooc+doo+95387168758+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+6592046+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+4953773+
END_else START_else ++ioc+dio+1194905159286+
END_else START_else ++ooc+doo+522615265874+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+2196861+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+639931+
END_else START_else ++ioc+dio+1354316325875+
END_else START_else ++ooc+doo+9089536821555+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+6011250+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+3345057+
END_else START_else ++ioc+dio+6167659466+
END_else START_else ++ooc+doo+3844245723+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+2062866+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+479141+
END_else START_else ++ioc+dio+2654919893741+
END_else START_else ++ooc+doo+3815170500243+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+5052680+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+297856+
END_else START_else ++ioc+dio+3417899908135+
END_else START_else ++ooc+doo+139332875581+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+1571208+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+8+
END_else START_else ++ioc+dio+458602712628+
END_else START_else ++ooc+doo+93190789773+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+2239013+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+649789+
END_else START_else ++ioc+dio+10066466039+
END_else START_else ++ooc+doo+4396851458+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+2193677+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+625381+
END_else START_else ++ioc+dio+4102304298695+
END_else START_else ++ooc+doo+8092620782169+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+35669725+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+22814+
END_else START_else ++ioc+dio+18042990024+
END_else START_else ++ooc+doo+4392267517+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+2036011+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+465593+
END_else START_else ++ioc+dio+702288500560+
END_else START_else ++ooc+doo+67114331169+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+3437661+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+1896551+
END_else START_else ++ioc+dio+3095311122838+
END_else START_else ++ooc+doo+187151476682+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+1909419+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+323694+
END_else START_else ++ioc+dio+83945035828716+
END_else START_else ++ooc+doo+132445262022773+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+21576920+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+58259302+
END_else START_else ++ioc+dio+8891264717+
END_else START_else ++ooc+doo+2616939005+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+2171598+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+603347+
END_else START_else ++ioc+dio+15894751733749+
END_else START_else ++ooc+doo+1133784297207+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+2963997+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+1351766+
END_else START_else ++ioc+dio+9385312867937+
END_else START_else ++ooc+doo+1258765314795+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+1861976+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+7+
END_else START_else ++ioc+dio+27924244348080+
END_else START_else ++ooc+doo+1486406435615+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+5798870+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+3890485+
END_else START_else ++ioc+dio+79397317967+
END_else START_else ++ooc+doo+7590755259+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+2258409+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+645471+
END_else START_else ++ioc+dio+105117394344+
END_else START_else ++ooc+doo+12634453160+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+35641679+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+1631350+
END_else START_else ++ioc+dio+25463758502+
END_else START_else ++ooc+doo+33877683725+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+1613111+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+1116+
END_else START_else ++ioc+dio+1880179051059+
END_else START_else ++ooc+doo+172577650378+
[...]
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+210085+
END_else START_else ++ioc+dio+868836644+
END_else START_else ++ooc+doo+4173441760177+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+1890710+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+1266533+
END_else START_else ++ioc+dio+4536962539+
END_else START_else ++ooc+doo+35889301476866+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+13728718+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+47111397+
END_else START_else ++ioc+dio+567362035+
END_else START_else ++ooc+doo+40193925421+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+478194+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+1683366+
END_else START_else ++ioc+dio+559846164+
END_else START_else ++ooc+doo+9762650727+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+2637+
END_else START_else ++odi+dod+0+
END_else START_else ++ibr+dib+130482+
END_else START_else ++ioc+dio+8749248738+
END_else START_else ++ooc+doo+10888417081+
END_else START_else ++ier+die+0+
END_else START_else ++oer+doe+0+
END_else START_else ++idi+did+237396+
END_else START_else ++odi+dod+474641+
END_else START_else ++ibr+dib+657+
END_else i112 JxJxJxJxJxJxJxJxJxJxJxJxJxJxJxJxJxJxJxJxJxJxUse of uninitialized value in concatenation (.) or string at /var/www/nedi/inc/libsnmp.pm line 1915.
j140 p0 b0 m8 Ap a0/0 f0Ru(MgmtEth0%2FRSP0%2FCPU0%2F1)Ri(Bundle-Ether1.147)Ri(Bundle-Ether1.206)Ri(Bundle-Ether1.142)Ri(Bundle-Ether1.246)Ri(Bundle-Ether1.172)Ri(Bundle-Ether1.125)Ri(Bundle-Ether1.134)Ri(Bundle-Ether1.202)Ri(Bundle-Ether1.154)Ri(Bundle-Ether1.203)Ri(Bundle-Ether1.156)Ri(Bundle-Ether1.510)Ri(Bundle-Ether1.240)Ri(Bundle-Ether1.218)Ri(Bundle-Ether1.153)Ri(Loopback0)Ri(Bundle-Ether1.103)Ri(Bundle-Ether1.242)Ri(Bundle-Ether1.241)Ri(Bundle-Ether1.122)Ri(Bundle-Ether1.110)Ri(Bundle-Ether1.139)Ri(Bundle-Ether1.115)Ri(Bundle-Ether1.193)Ri(Null0)Ri(Bundle-Ether1.152)Ri(Bundle-Ether1.131)Ri(dwdm0%2F0%2F2%2F1)Ri(Bundle-Ether1.175)Ri(Bundle-Ether1.109)Ri(Bundle-Ether1.212)Ri(Bundle-Ether1.216)Ri(Bundle-Ether1.148)Ri(Bundle-Ether1.136)Ri(TenGigE0%2F0%2F2%2F2)Ri(Bundle-Ether1.531)Ri(Bundle-Ether1.126)Ri(Bundle-Ether1.196)Ri(Bundle-Ether1.4)Ri(Bundle-Ether1)Ri(dwdm0%2F0%2F2%2F2)Ri(Bundle-Ether1.201)Ri(Bundle-Ether1.9)Ri(Bundle-Ether1.120)Ri(Bundle-Ether1.197)Ri(Bundle-Ether1.238)Ri(Bundle-Ether1.158)Ri(Bundle-Ether1.151)Ri(Bundle-Ether1.149)Ri(Bundle-Ether1.144)Ri(Bundle-Ether1.107)Ri(Bundle-Ether1.50)Ri(Bundle-Ether1.200)Ri(Bundle-Ether1.157)Ri(Bundle-Ether1.205)Ri(Bundle-Ether1.3)Ri(TenGigE0%2F0%2F2%2F1)Ri(Bundle-Ether1.174)Ri(Bundle-Ether1.237)Ri(Bundle-Ether1.229)Ri(Bundle-Ether1.184)Ri(Bundle-Ether1.208)Ri(Bundle-Ether1.231)Ri(Bundle-Ether1.228)Ri(Bundle-Ether1.121)Ri(Bundle-Ether1.213)Ri(Bundle-Ether1.232)Ri(Bundle-Ether1.507)Ri(Bundle-Ether1.198)Ri(Bundle-Ether1.214)Ri(Bundle-Ether1.169)Ri(Bundle-Ether1.117)Ri(Bundle-Ether1.221)Ri(Bundle-Ether1.207)Ri(Bundle-Ether1.108)Ri(Bundle-Ether1.226)Ri(Bundle-Ether1.2)Ri(Bundle-Ether1.215)Ri(dwdm0%2F0%2F2%2F3)Ri(Bundle-Ether1.165)Ri(Bundle-Ether1.14)Ri(Bundle-Ether1.145)Ri(Bundle-Ether1.230)Ri(Bundle-Ether1.194)Ri(TenGigE0%2F0%2F2%2F3)Ri(Bundle-Ether1.183)Ri(Bundle-Ether1.217)Ri(Bundle-Ether1.163)Ri(Bundle-Ether1.105)Ri(Bundle-Ether1.178)Ri(Bundle-Ether1.179)Ri(Bundle-Ether1.188)Ri(Bundle-Ether1.204)Ri(Bundle-Ether1.189)Ri(Bundle-Ether1.19)Ri(Bundle-Ether1.219)Ri(Bundle-Ether1.171)Ri(Bundle-Ether1.164)Ri(dwdm0%2F0%2F2%2F0)Ri(Bundle-Ether1.118)Ri(Bundle-Ether1.245)Ri(Bundle-Ether1.124)Ri(Bundle-Ether1.102)Ri(MgmtEth0%2FRSP0%2FCPU0%2F0)Ri(Bundle-Ether1.116)Ri(Bundle-Ether1.249)Ri(TenGigE0%2F0%2F2%2F0)Ri(Bundle-Ether1.236)Ri(Bundle-Ether1.176)DBD::mysql::st execute failed: Out of range value for column 'outoct' at row 1 at /var/www/nedi/inc/libdb.pm line 1476.
DBD::mysql::st execute failed: Out of range value for column 'outoct' at row 1 at /var/www/nedi/inc/libdb.pm line 1476.
He is going into the else but not to the If.