Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
112
Merge Requests
112
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
e012bfb7
Commit
e012bfb7
authored
Mar 13, 2025
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
log files
parent
1b662c1e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
14 deletions
+27
-14
software/simpleran/buildout.hash.cfg
software/simpleran/buildout.hash.cfg
+1
-1
software/simpleran/instance-enb.jinja2.cfg
software/simpleran/instance-enb.jinja2.cfg
+26
-13
No files found.
software/simpleran/buildout.hash.cfg
View file @
e012bfb7
...
...
@@ -60,7 +60,7 @@ md5sum = 52da9fe3a569199e35ad89ae1a44c30e
[template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
md5sum =
b5fafebe6d28fba36f7bdc4d5439a2f3
md5sum =
492b50aad5bd9be834091eca1dfb0149
[template-ors-enb]
_update_hash_filename_ = instance-ors-enb.jinja2.cfg
...
...
software/simpleran/instance-enb.jinja2.cfg
View file @
e012bfb7
...
...
@@ -134,7 +134,6 @@ xlog-fluentbit = ${:var}/xlog-fluentbit
recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_}
enb-info-log = ${directory:log}/enb-info.log
enb-info-archive-log = ${directory:log}/enb-info.log
enb-radio-log = ${directory:log}/enb.log
enb-start-date = ${directory:run}/enb-start.date
inline =
...
...
@@ -149,21 +148,35 @@ inline =
echo "System info: $(uname -a)" >> ${:enb-info-log}
({{ amarisoft['sdr_dir'] }}/sdr_util version && echo) >> ${:enb-info-log}
# Remove obsolete logs
rm -f ${directory:log}/enb-2
024
*
rm -f ${directory:log}/enb-2*
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.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}
# 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
mv ${:enb-info-log}.tmp ${:enb-info-log}
tail -c 100M ${:enb-info-archive-log} > ${:enb-info-archive-log}.tmp
mv ${:enb-info-archive-log}.tmp ${:enb-info-archive-log}
# Archive current log
stat ${:enb-start-date} && mv ${:enb-radio-log} ${:enb-radio-log}.$(cat ${:enb-start-date})
# Split enb info log into 500k chunks
if test $(du ${:enb-info-log} | cut -f1) -ge 100000 ; then
stat ${:enb-start-date} || date +"%Y%m%d.%T" > ${:enb-start-date}
head -c -500k ${:enb-info-log} > ${:enb-info-log}.$(cat ${:enb-start-date})
tail -c 500k ${:enb-info-log} > ${:enb-info-log}.tmp
mv ${:enb-info-log}.tmp ${:enb-info-log}
fi
# Keep only 5Gb for radio logs and 1Gb for eNB info log
trim() {
i=-1
N=$(ls -1t $2* | wc -l)
TOTAL=$1
while test $TOTAL -ge $1 ; do
i=$((i+1))
TOTAL=$(du -c $(ls -1t $2* | head -n$((N-i))) | tail -n1 | cut -f1)
done
rm -f $(ls -1t $2* | tail -n$i)
}
trim 5000000 ${:enb-radio-log}.
trim 1000000 ${:enb-info-log}.
# Remove almost empty enb radio archive log files
rm -f $(find $(dirname ${:enb-radio-log}) -name "$(basename ${:enb-radio-log}).*" -size -5k)
# Launch lteenb
date +"%Y%m%d.%T" > ${:enb-start-date}
{{ amarisoft['enb_dir'] }}/lteenb ${directory:etc}/enb.cfg >> ${:enb-info-log} 2>> ${:enb-info-log}
[enb-service]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment