Good thought but I tried that. This backup process started life as a batch file. I rewrote it using Perl in Dec so that I could add better logging and an email notification at the end.
The .exe I am using is gwback32.exe. It was a download from Novell.
Watching the stats during the process should prove "exciting". I have been running a full backup for the past 3.5 hours and it is still working on step 1 of 3. Over that time the PF Usage has risen steadily from 250 to 362.
Here's a thought: Suppose the leak is in gwback.exe. As I understand it a system() command from perl does a fork to run the command. Once that spawned process ends, are the resources that were leaked during that child process released? What about in a batch file rather than a perl script? That may account for why the .bat works and the perl does not.
Here is the trimmed code. As mentioned it is pretty simple:
#!/usr/local/bin/perl use strict; use warnings; use Date::Calc qw( Today_and_Now ); use MIME::Lite; #print "** start **\n"; my ( $cmd ) = ( '' ); my $pofront = 'C:\gwbackup\gwback32.exe '; append_log ( "\n--- Begin Nightly Backup ---", 0); $cmd = $pofront . '/po-\\\\Usacscpost52\POVOL\cscpos52 /backup-e:\cscp +os52 /silent'; do_cmd_and_log( $cmd, "Copy cscpos52" ); $cmd = $pofront . '/po-\\\\Usashacmail\SYS\SHACPOST /backup-e:\shacpos +t /silent'; do_cmd_and_log( $cmd, "Copy shacpost" ); $cmd = $pofront . '/po-\\\\Usamcpost\sys\umcpost /backup-e:\umcpost /s +ilent'; do_cmd_and_log( $cmd, "Copy umcpost" ); append_log( "End Backup", 1 ); #send_complete_msg(); #print "** done **\n\n"; exit; sub append_log { my ( $txt, $dotime ) = @_; if ( $dotime ) { my @now = Today_and_Now(); $now[3] = "0$now[3]" if ($now[3] =~ /^\d{1}$/); $now[4] = "0$now[4]" if ($now[4] =~ /^\d{1}$/); $txt = " $now[1]/$now[2]/$now[0] $now[3]:$now[4] $txt"; } open( OUTFILE, '>>C:\gwbackup\gwback.log'); my $old_handle = select(OUTFILE); print "$txt\n"; close OUTFILE; select($old_handle); } # append_log sub do_cmd_and_log { my ( $cmd, $txt ) = @_; append_log( "Begin $txt", 1 ); system($cmd); } # do_cmd_and_log
In reply to Re^2: Activeperl & Memory Leaks
by Possumfoot
in thread Activeperl & Memory Leaks
by Possumfoot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |