[Dxspider-support] Remove old spots and data

Dirk Koopman djk at tobit.co.uk
Tue May 31 11:56:37 BST 2022


Let's see if I can address this:

1. Spot files can be automatically removed by doing a 'set/var 
$Spot::spotcachedays <some positive integer larger than 1>' in the 
startup file.
2. Debug files ARE removed after (by default) 10 days. To keep more or 
fewer debug files 'set/var $DXDebug::keepdays <some positive integer 
larger than 1>' in the startup file. To keep them forever, set this to 0.
3. Log files (for historical abuse reasons) are kept for ever. I would 
not use find like Kin does, but do it this way: spawn("find 
/spider/local_data/logs -type f -mtime +62 -exec rm -f {} \;"). Note 
that log files are monthly not daily.

Never been a fan of xargs ... Very easy to get bitten ...

Dirk G1TLH

On 31/05/2022 08:24, Jan via Dxspider-support wrote:
> Hi Kin
>
> I have put it in the de dxspider crontab yesterday but I just looked 
> this morning and all the spots and other data are still there.
> Data is stored from may 20 to may 31 and I want to reduce these to 
> only 3 days.
> Should I change the +31 +62 into smaller figures e.g. +3 and +6?
>
> 73
> Jan
> PA4JJ
>
>
> Op 30-5-2022 om 19:52 schreef Kin via Dxspider-support:
>>
>> Jan, I don't see what's wrong, but I have it implemented in the 
>> dxspider crontab like this:
>>
>> 0 0 * 1-12 * spawn("find /spider/local_data/debug -type f -mtime +31 
>> | xargs rm -rf")
>> 2 0 * 1-12 * spawn("find /spider/local_data/log -type f -mtime +62 | 
>> xargs rm -rf")
>> 3 0 * 1-12 * spawn("find /spider/local_data/spots -type f -mtime +31 
>> | xargs rm -rf")
>>
>> Regards.
>>
>> Kin EA3CV
>>
>>
>> El 30/05/2022 a las 17:09, Jan via Dxspider-support escribió:
>>> Hello
>>>
>>> I am running DX-Spider ver. 1.57 build 441 on a raspberry Pi zero W.
>>>
>>> When I used ver.1.55 build 249 there was a script called spider 
>>> saved in etc/cron.daily/spider which removed
>>> data in /spider/data/log, /spider/data/debug and /spider/data/spots
>>>
>>> So with the build 441 the path now should be
>>> /spider/local_data/log, /spider/local_data/debug and 
>>> /spider/local_data/spots
>>>
>>> So to remove older spots I have these lines:
>>>
>>> #!/bin/sh We need to delete old files.
>>> spiderdir="/spider/local_data/spots/2022"
>>> if [ -n "$spiderdir" ] && [ -d"$spiderdir" ]; then
>>> # only keep three days' depth of these
>>> find "$spiderdir" -type f -mtime +3 -exec rm {} \; fi
>>>
>>> I did chmod a+x spider
>>>
>>> But I the spots are not removed. I still see spots starting  may 20 
>>> til may 30
>>> (which should be may27 til may 30)
>>>
>>> What is wrong?
>>> Do I need to place the script elswhere or maybe use a complete 
>>> different one?
>>>
>>> Please some help
>>> -- 
>>> 73
>>> Jan
>>> PA4JJ
>>> ______________________________________________________
>>>
>>> My dxspider clusters running 24/7 on a raspberry pi 2
>>> pa4jj-2 telnet 77.174.195.163 port 7300
>>> pa4jj-3 telnet 77.174.195.163 port 7388
>>>
>>> _______________________________________________
>>> Dxspider-support mailing list
>>> Dxspider-support at tobit.co.uk
>>> https://mailman.tobit.co.uk/mailman/listinfo/dxspider-support
>>
>> _______________________________________________
>> Dxspider-support mailing list
>> Dxspider-support at tobit.co.uk
>> https://mailman.tobit.co.uk/mailman/listinfo/dxspider-support
>
> -- 
> 73
> Jan
> PA4JJ
> ______________________________________________________
>
> My dxspider clusters running 24/7 on a raspberry pi 2
> pa4jj-2 telnet 77.174.195.163 port 7300
> pa4jj-3 telnet 77.174.195.163 port 7388
>
> _______________________________________________
> Dxspider-support mailing list
> Dxspider-support at tobit.co.uk
> https://mailman.tobit.co.uk/mailman/listinfo/dxspider-support
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.tobit.co.uk/pipermail/dxspider-support/attachments/20220531/d5da8ca9/attachment.htm>


More information about the Dxspider-support mailing list