Commit 24e7cf5c authored by Joanne Hugé's avatar Joanne Hugé

simpleran: set limit to 200M for eNB logs

parent 78c804ce
......@@ -60,7 +60,7 @@ md5sum = 52da9fe3a569199e35ad89ae1a44c30e
[template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = 083f569a42c080de426672de34421005
md5sum = be2971a53237f6aaf1707ac537a6ac45
[template-ors-enb]
_update_hash_filename_ = instance-ors-enb.jinja2.cfg
......@@ -88,7 +88,7 @@ md5sum = dd50b4e4780830ddbde28b84af118f18
[enb.jinja2.cfg]
filename = config/enb.jinja2.cfg
md5sum = 9c77f0565080e7b0322d9d5fcf4818b0
md5sum = 573cb004c21aa5f9ad8baf7b4dbbeb43
[drb_lte.jinja2.cfg]
filename = config/drb_lte.jinja2.cfg
......
......@@ -139,7 +139,7 @@
{%- else -%}
phy.level=info
{%- endif -%}
,file.rotate=1G,file.path=/dev/null",
,file.rotate=200M",
log_filename: "{{ directory['log'] }}/enb.log",
{# instantiate radio units #}
......
......@@ -116,11 +116,15 @@ inline =
(AMARISOFT_PATH=/dev/null {{ enb }}/lteenb ${directory:etc}/enb.cfg 2>&1 >/dev/null | sed -n 's/^.*\(Host ID.*\)$/\1/gp') >> ${:enb-info-log}
echo "System info: $(uname -a)" >> ${:enb-info-log}
({{ sdr }}/sdr_util version && echo) >> ${:enb-info-log}
# Remove obsolete logs
rm -f ${directory:log}/enb-2024*
rm -f ${directory:log}/gnb*
rm -f ${directory:log}/enb-output.log
# Keep the 50 latest enb radio log
stat ${:enb-start-date} && mv ${:enb-radio-log} ${directory:log}/enb-$(cat ${:enb-start-date}).log
stat ${:enb-start-date} && mv ${:enb-radio-log} ${directory:log}/enb.log.$(cat ${:enb-start-date})
rm -f $(ls -1t ${directory:log}/enb-2* | tail -n+50)
rm -f $(ls -1t ${directory:log}/enb-info-2* | tail -n+50)
date +"%Y-%m-%d-%T" > ${:enb-start-date}
date +"%Y%m%d.%T" > ${:enb-start-date}
# Trim enb info log to 500k and keep a 100M archive of enb info log
head -c -500k ${:enb-info-log} >> ${:enb-info-archive-log}
tail -c 500k ${:enb-info-log} > ${:enb-info-log}.tmp
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment