Vito,
I run this from a windows PC using active state Perl.
use Net::FTP;
$ftp = Net::FTP->new("192.168.1.1",Debug => 0) or die "Cannot connect
to server: $@";
$ftp->login("login", 'password') or die "Cannot login ", $ftp->message;
$ftp->binary;
@dir=$ftp->ls;
foreach $file (@dir) {
# look for filenames beginning with auto or Call or three numbers
underscore four numbers...
# and if found, get their size and modification time. If mtime is at
least 2 minutes old and
# the file size is greater than 50K we can establish the file is
complete and more than a
#few seconds in length.
if (($file =~/^auto/) || ($file =~/^Call/) || ($file
=~/^\d\d\d_\d\d\d\d-/)) {
$size=$ftp->size($file);
$time=$ftp->mdtm($file);
if (time()-$time > 120) {
if ($size > 50000) {
$ftp->get($file,"D:\\ftproot\\phonecalls\\$file") or die
"get failed", $ftp->message;
} else {
# if the file meets the naming criteria but doesn't meet age and size
criteria, delete it
$ftp->delete($file);
next;
}
# check to see if the file came across OK, if so, remove it from the
ftp space
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$fsize,$atime,$mtime,$ctime,$blksize,$blocks)
= stat "D:\\ftproot\\phonecalls\\".$file;
if ($fsize >= $size) {
$ftp->delete($file)
}
}
}
}
$ftp->quit;
On 12/7/06, vb <[EMAIL PROTECTED]> wrote:
> Thank you. I would love a copy of that script.
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lynn
> Sent: Thursday, December 07, 2006 1:52 AM
> To: Discussion of AstLinux - Asterisk on Compact Flash
> Subject: Re: [Astlinux-users] Extremely long boot times
>
> I have a perl script running in a vmware instance on a windows PC.
> Every five minutes or so it runs from the crontab. It ftps the
> monitor files off Astlinux as long as the mtime value for the file is
> at least 2 minutes older than the current time. This ensures the file
> is closed and safe for transfer. I never worry that my kd is going to
> fill up. I did have to set my mixmonitor commands to save to the ftp
> root filespace in astlinux, though. If you want my script, I'll
> e-mail it to you directly.
>
> This is one of several instances of learning to work with Astlinux vs.
> against (i.e. my way). My life is a lot easier when I work with the
> existing design. This is why my Cepstral text to speech also happens
> off server. I'm using it solely to voice the weather report which
> doesn't change too frequently. No reason to have to do the TTS on the
> Astlinux server. Just ftp it periodically from the aforementioned
> linux vmware instance.
>
> On 12/6/06, vb <[EMAIL PROTECTED]> wrote:
> > Thanks for your reply, from the lack of replies to my 2 posted questions,
> I
> > was concerned that my breath was so bad it carried through to my email.
> >
> > While not necessarily standalone, per se, it is at a <cheap> client's site
> > so it gets minimal human interaction. The fact that the kd can fill up in
> as
> > few as 3 days of heavy usage at 1gb is a real thorn in everyones side,
> they
> > had been moving monitor files via winscp but they prefer a "set it and
> > forget it" solution, although I expect the 300gb hard drive to hit 0% in
> 6-8
> > months. Now, if I can just show them the benefits of compression.......
> > Vb
> >
> >
> >
> > -----Original Message-----
> > Have you considered simply moving the monitor files off of the box
> > periodically, or via nfs? Or does this have to operate as a
> > standalone appliance?
> >
> > On 12/6/06, vb <[EMAIL PROTECTED]> wrote:
> > > I have Astlinux running on an 850mhz laptop with 512 mb ram. With the
> > > original 1gb keydisk, boot time was less than 1 minute. Got tired of the
> > > keydisk filling up weekly (monitoring in and out in .wav) so I installed
> a
> > > 300 gb external hdd as my keydisk. Now my boot time is > 2 hours. Is
> there
> > > anyway to skip the volume check on boot? Any other suggestions to speed
> > > things along? Obviously, I cannot have a phone system down for anywhere
> > near
> > > this amount of time ever, so any ideas would be appreciated.
> > > Vb
> > >
> >
> > _______________________________________________
> > Astlinux-users mailing list
> > [email protected]
> > http://lists.kriscompanies.com/mailman/listinfo/astlinux-users
> >
> > Donations to support AstLinux are graciously accepted via PayPal to
> [EMAIL PROTECTED]
> >
> _______________________________________________
> Astlinux-users mailing list
> [email protected]
> http://lists.kriscompanies.com/mailman/listinfo/astlinux-users
>
> Donations to support AstLinux are graciously accepted via PayPal to
> [EMAIL PROTECTED]
>
> _______________________________________________
> Astlinux-users mailing list
> [email protected]
> http://lists.kriscompanies.com/mailman/listinfo/astlinux-users
>
> Donations to support AstLinux are graciously accepted via PayPal to [EMAIL
> PROTECTED]
>
_______________________________________________
Astlinux-users mailing list
[email protected]
http://lists.kriscompanies.com/mailman/listinfo/astlinux-users
Donations to support AstLinux are graciously accepted via PayPal to [EMAIL
PROTECTED]