[arm-allstar] LOGS ?
David McGough
kb4fxc at inttek.net
Thu Jan 18 09:00:05 EST 2024
Luc,
You don't need to add a cron job. These Apache web server log files (and
some others) are managed by the linux logrotate utility. These files
automatically get cleaned up. The "stock" HamVoIP configuration preserves
up to 4 weeks of previous logs, should they be need for any analysis
purposes. Old log files get automatically deleted by this utility.
To manage logrotate for apache, see these config files:
/etc/logrotate.conf
/etc/logrotate.d/httpd
There is a manual page for the logrotate program included in the HamVoIP
image. So, from a bash shell prompt:
man logrotate
Also, here is a website with more info. There are many which explain the
logrotate utility operation:
https://linuxconfig.org/logrotate
Are you having a problem with the /var/log filesystem?? ...For example, it
it reaching 100% capacity?? If this is the case, make sure that you've
got the ssh server access hidden in some way (like an obscure TCP port).
The /var/log/btmp file (which records bad login attempts) is the most
frequent "problem" file, which can grow and completely fill the
filesystem. If /var/log/btmp is huge, you've got an issue with Internet
hackers attempting to break into your node. Sadly, this is a "normal"
problem, these days. The solution is to make ssh server inaccessible to
would-be hackers, one way or another.
73, David K4FXC
On Wed, 17 Jan 2024, Luc Drolet VE2LUQ via ARM-allstar wrote:
> I added this in "con Job" and my logs seem to be OK now
but I will see it in the next few days
Yes, a reboot resets the logs, you are correct
Thank you and good day
*/4 * * * * /usr/local/sbin/truncate_logs.sh
55 * * * * sudo rm -f /var/log/*.1
55 * * * * sudo rm -f /var/log/httpd/*.1
*/5 * * * * cat /dev/null > /var/log/btmp
4.0K /var/log/pacman.log
24K /var/log/faillog
4.0K /var/log/asterisk/connectlog
4.0K /var/log/asterisk/astdb.txt
4.0K /var/log/asterisk/queue_log
0 /var/log/asterisk/event_log
8.0K /var/log/asterisk/messages
20K /var/log/asterisk
8.0K /var/log/httpd/error_log
52K /var/log/httpd/access_log
60K /var/log/httpd
0 /var/log/btmp
20K /var/log/wtmp
4.0K /var/log/lastlog
132K /var/log
[root at NODE1495 ~]#
Luc Drolet VE2 LUQ
Président de VE2CVA
C.R.A.V.A.
Club Radio Amateur Vallée de l'Amiante
VE2 CVA
ve2cva at gmail.com
ldrolet at cgocable.ca
https://clubs.raqi.ca/ve2cva/
https://www.facebook.com/groups/ve2cva
Instagram : https://www.instagram.com/ve2cva/
Echolink = VE2RVA-R NODE #24560
Sécurité Civil du Québec, Node #1400
> Le 16 janv. 2024 à 18:26, Michael Webb via ARM-allstar <arm-allstar at hamvoip.org> a écrit :
>
> Don't they get wiped after a reboot anyway because they are in RAM?
>
> On Tue, Jan 16, 2024, 7:56â¯AM Luc Drolet VE2LUQ via ARM-allstar <
> arm-allstar at hamvoip.org> wrote:
>
>> Hello to you,
>>
>> I wonder why I have LOGS with "/var/log/httpd/error_log.1" or
>> "/var/log/httpd/access_log.1"
>>
>> how to avoid this
>>
>> can I put this in âCron Jobâ? for example a solution "B"
>> "sudo rm -f /var/log/httpd/error_log.1", I think this might be a solution,
>> but it doesn't fix the problem for example
>>
>> est-ce que vous avez des idées ?
>>
>> Merci de votre aide
>>
>>
>>
>> 4.0K /var/log/pacman.log
>> 24K /var/log/faillog
>> 4.0K /var/log/asterisk/connectlog
>> 4.0K /var/log/asterisk/astdb.txt
>> 4.0K /var/log/asterisk/queue_log
>> 0 /var/log/asterisk/event_log
>> 4.0K /var/log/asterisk/messages
>> 16K /var/log/asterisk
>> 4.0K /var/log/httpd/error_log
>> 20K /var/log/httpd/error_log.1
>> 20K /var/log/httpd/access_log
>> 180K /var/log/httpd/access_log.1
>> 224K /var/log/httpd
>> 32K /var/log/btmp
>> 4.0K /var/log/wtmp
>> 4.0K /var/log/lastlog
>> 308K /var/log
>>
>>
>> Luc Drolet VE2 LUQ
>> Président de VE2CVA
>> C.R.A.V.A.
>> Club Radio Amateur Vallée de l'Amiante
>> VE2 CVA
>> ve2cva at gmail.com
>> ldrolet at cgocable.ca
>> https://clubs.raqi.ca/ve2cva/
>> https://www.facebook.com/groups/ve2cva
>> Instagram : https://www.instagram.com/ve2cva/
>> Echolink = VE2RVA-R NODE #24560
>> Sécurité Civil du Québec, Node #1400
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>>
>> ARM-allstar mailing list
>> ARM-allstar at hamvoip.org
>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>>
>> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
>>
> _______________________________________________
>
> ARM-allstar mailing list
> ARM-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
_______________________________________________
ARM-allstar mailing list
ARM-allstar at hamvoip.org
http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
More information about the ARM-allstar
mailing list