如何减少选项-打开日志文件大小。项目-开放[基于openACS框架并生成大量日志。
一个例子是经常发生的不推荐使用的警告。
几天后,日志文件的大小是几GB,这是非常恼人的,使编辑器真的很慢,使它很难找到重要的信息。
我做到了
set debug false
在etc/config.tcl中
编辑:
启动/usr/lib/aolserver4/bin/nsd -it /web/projop/etc/config.tcl -u projop -g projop
文件:/web/projop/etc/config.tcl
ns_log notice "nsd.tcl: starting to read config file..."
######################################################################
#
# Instance-specific settings
# These default settings will only work in limited circumstances
# Two servers with default settings cannot run on the same host
#
######################################################################
# Wait until PostgreSQL has come up...
# Sleep 5 is apparently not enough in certain situations
exec sleep 15
#---------------------------------------------------------------------
# Web server ports. Change to 80 and 443 for production use or
# use "Pound" as a reverse proxy.
# If setting httpport below 1024 then please read comments in file:
# /var/lib/aolserver/service0/packages/etc/daemontools/run
#
set httpport 8000
set httpsport 8443
# The hostname and address should be set to actual values.
# setting the address to 0.0.0.0 means aolserver listens on all interfaces
# set hostname localhost
set hostname [ns_info hostname]
# set address 127.0.0.1
set address "0.0.0.0"
set server "projop"
set servername "Sybit and Peers"
set serverroot "/web/${server}"
# Debug is turned on for demo servers. Please turn off for
# performance critical production installations.
set debug false
# Which database do you want? postgres or oracle
# The name of the database is the same as the server by default.
set database postgres
set db_name $server
# Home directory of AOLserver
set homedir /usr/lib/aolserver4
set bindir ${homedir}/bin
# Hard limits for up- and downloads
set max_file_upload_mb 20
set max_file_upload_min 5
######################################################################
#
# End of instance-specific settings发布于 2015-08-23 08:28:06
日志文件如此之大的原因是您是在调试模式下登录的。您需要更改以下设置并重新启动AOLserver。
在AOLserver配置文件中,验证/添加以下内容
set debug false在ns/server/${server}/module/nslog部分中,确保存在以下行
ns_param debug $debug此外,还要在ns_section ns/parameters部分中,确保已设置此项
ns_param debug $debug发布于 2015-12-17 01:46:03
我在crontab中放了一行,强制AOLserver每隔两个小时左右轮换一次日志:
1 */2 * * * /bin/killall -HUP nsd干杯,弗兰克
发布于 2015-08-24 19:23:56
大多数无用的(和大的)日志条目都是关于不推荐使用的函数的openAOL服务器日志警告。
因此,第一步是删除How to remove deprecated warning in log-file of open-ACS, Project-Open中讨论的不推荐使用的警告
https://stackoverflow.com/questions/32093283
复制相似问题