[mythtv-users] Autoexpire issues

Chris Pinkham cpinkham at bc2va.org
Thu Sep 11 18:38:52 EDT 2003


Could you go into programs/mythbackend/autoexpire.cpp and add some
debugging statements?

goto around line 59 and add the following printf statements:

        if (statfs(recordfileprefix.ascii(), &statbuf) == 0) {
            freespace = statbuf.f_bavail / (1024*1024*1024/statbuf.f_bsize);
        }

        printf( "bavail  = %lld\n", statbuf.f_bavail);
        printf( "bsize   = %lld\n", statbuf.f_bsize);
        printf( "bfree   = %lld\n", statbuf.f_bfree);
        printf( "freespace = %d\n", freespace);

Also add the same 4 printf lines around line 100 after it calculates
freespace at the bottom of the while freespace < minFree loop.

That should help show why it thinks there's only 5 gigs free but you say you
have 17.  Should also show why it frees up more than it needs to if it is
doing that.  The smb stuff should be unrelated.

> I'm seeing some odd behavior from autoexpire (CVS 8/28). 
> 
> The mythbackend logs the following:
> 
> -Want 5 Gigs free but only have 4
> -Autoexpire deletes 2G file
> -Autoexpire deletes 4G file
> -Myth records 2G file
> -Want 5 Gigs free but only have 4
> -Autoexpire deletes 4G file
> -Autoexpire deletes 4G file
> 
> Seems odd that autoexpire would kick in after deleting 6G of data, but
> only recording 2G. Also, 'df' shows the partition as having 17G free, so
> the whole "under 5" warning is wrong.
> 
> I have several remote SMB shares mounted in this partition. Could that
> have an effect on autoexpire's calculating of free space. Those mounts
> are unrelated to any of the TV stuff.
> 
> Any thoughts?
> 
> Thanks,
> Joe

-- 

Chris



More information about the mythtv-users mailing list