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!

newsyslog log rotation

Post/Debate your Suggestions & Requests of XigmaNAS here. This ONLY pertains to XigmaNAS.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
poiuz
NewUser
NewUser
Posts: 6
Joined: 02 Jul 2012 20:55
Status: Offline

newsyslog log rotation

Post by poiuz »

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.

poiuz
NewUser
NewUser
Posts: 6
Joined: 02 Jul 2012 20:55
Status: Offline

Re: newsyslog log rotation

Post by poiuz »

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
NewUser
Posts: 1
Joined: 28 Dec 2012 22:06
Status: Offline

Re: newsyslog log rotation

Post by Fosterimp »

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

poiuz
NewUser
NewUser
Posts: 6
Joined: 02 Jul 2012 20:55
Status: Offline

Re: newsyslog log rotation

Post by poiuz »

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.

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: newsyslog log rotation

Post by alexey123 »

poiuz
If you have full install - you can increase logfile without problem.
open to edit /etc/rc.d/clog and find strings
if [ ! -e "${clog_logdir}/daemon.log" ]; then
clog -i -s 32768 "${clog_logdir}/daemon.log"
fi
Marked as red is size of log. Adjust it as you need, for example to 262144

I check your building. from /etc/rc.d/syslogd you define:
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
green line - you define audit log, but red I marked deny local7 logging.. I don't understand, how it work.
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"
fi
You can change size and logname
Home12.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

Post Reply

Return to “Suggestions & Requests”