Since my samba full_audit vfs is generating a large log file, I looked for a built-in log rotating solution but could not find one, since newsyslog and logrotate are not on the machine.
I am doing the necessary moving, touching and restarting via cron now, but a configuration file for one of the above would be easier to maintain for all generated log files.
So I suggest adding newsyslog or logrotate to NAS4Free.
This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!
I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!
it will taken offline by the end of march 2021!
I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!
newsyslog log rotation
-
poiuz
- NewUser

- Posts: 6
- Joined: 02 Jul 2012 20:55
- Status: Offline
Re: newsyslog log rotation
By the way, if anybody has compiled a binary file of newsyslog for NAS4Free, please send me a PM or post a message in this thread.
-
Fosterimp
- NewUser

- Posts: 1
- Joined: 28 Dec 2012 22:06
- Status: Offline
Re: newsyslog log rotation
Have you had any luck finding a solution?? I am logging all my firewall activity but the file needs archiving every 24hrs. I started to use the newsyslog.conf until I found out its not installed. Any Ideas?
Don
Don
-
poiuz
- NewUser

- Posts: 6
- Joined: 02 Jul 2012 20:55
- Status: Offline
Re: newsyslog log rotation
No Fosterimp, since my self-made script does all the necessary steps and works fine, I was too lazy to compile my own newsyslog. At least I installed FreeBSD in a virtual machine, but that's it.
- alexey123
- Moderator

- Posts: 1469
- Joined: 19 Aug 2012 08:22
- Location: Israel, Karmiel
- Contact:
- Status: Offline
Re: newsyslog log rotation
poiuz
If you have full install - you can increase logfile without problem.
open to edit /etc/rc.d/clog and find strings
I check your building. from /etc/rc.d/syslogd you define:
If you want help, pls, step by step write what you replace
If you need simple log rotation add to /etc/rc.d/clog
You can change size and logname
If you have full install - you can increase logfile without problem.
open to edit /etc/rc.d/clog and find strings
Marked as red is size of log. Adjust it as you need, for example to 262144if [ ! -e "${clog_logdir}/daemon.log" ]; then
clog -i -s 32768 "${clog_logdir}/daemon.log"
fi
I check your building. from /etc/rc.d/syslogd you define:
green line - you define audit log, but red I marked deny local7 logging.. I don't understand, how it work.local7.* %/var/log/samba/log.audit
ftp.* %/var/log/ftp.log
daemon.* %/var/log/daemon.log
*.notice;kern.debug;lpr.info;mail.crit;mail.info;news.err;local0.none;local7.none %/var/log/system.log
If you want help, pls, step by step write what you replace
If you need simple log rotation add to /etc/rc.d/clog
Code: Select all
if [ ! -e "${clog_logdir}/daemon.log" ]; then
clog -i -s 32768 "${clog_logdir}/log.audit"
fiHome12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600