Subject: | memory leak in perl-module net::netconf::manager |
Net-Netconf-1.02
[server]$ perl -v
This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi
[server]$ uname -a
Linux orange.zvezdatel.ru 2.6.32-220.4.2.el6.x86_64 #1 SMP Tue Feb 14 04:00:16 GMT 2012 x86_64 x86_64 x86_64 GNU/Linux
A memory leak occurs when successful connect to devices
(my $jnx = new Net::Netconf::Manager(%deviceinfo))
in cycle
Full text of script (netconf.pl) is attached
After 30 minutes the amount of used memory has increased from 13 to 102 Mbytes!!!:
[server]$ date && top -p 30309 -b -n 1 | tail -3f
Mon Dec 28 16:30:00 MSK 2015
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ SWAP COMMAND
30309 equipmen 20 0 174m 13m 3856 S 0.0 0.1 0:00.09 0 netconf.pl
[server]$ date && top -p 30309 -b -n 1 | tail -3f
Mon Dec 28 17:01:00 MSK 2015
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ SWAP COMMAND
30309 equipmen 20 0 292m 102m 3856 S 0.0 0.2 0:00.64 0 netconf.pl
Subject: | netconf.pl |
#!/usr/bin/perl
use Net::Netconf::Manager;
while (1)
{
my %deviceinfo = (
access => 'ssh',
login => 'orange',
password => 'Fbbr893L#df-',
hostname => '10.20.3.22',
port => 22,
debug_level=> 0
);
#debug_level=> 0
my $jnx;
$jnx = new Net::Netconf::Manager(%deviceinfo);
unless ( ref $jnx ) {
die "ERROR: $deviceinfo{hostname}: failed to connect.";
}
$jnx->disconnect();
sleep 3;
}