Comments (10)
It's probably the logs.
There are two things you can do. The first is to recreate the container with a log rule:
docker run <the rest of your config> --log-driver json-file --log-opt max-size=10m oznu/unms
This will keep the docker log size to less than 10MB.
The second is to clear the UNMS logs:
> /config/unms/logs/unms.log
You can run that command inside the container, or from the host if you replace /config
with the path to your mapped volume. You could setup a cron to do this. Alternatively a logrotate
policy would work too.
from docker-unms.
Ok I started the container with docker-compose and the yaml file for it.
The log was only 300 MB from 5 GB the docker folder was -.-
pi@snotberry:/var/lib $ sudo du -sh /var/lib/docker/
5.0G /var/lib/docker/
from docker-unms.
Where are the downloaded firmware images stored?
This could be the issue here -- is it possible to define/override the location of fw files?
from docker-unms.
I would recommend you run the container with QUIET_MODE = 1 as mentioned in Issue #4.
For example,
docker run -e QUIET_MODE=1 -d oznu/unms
If you need to clear a giant container log, do the following
docker ps -a
You should see something like this:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1fd7bcbd5fa4 oznu/unms:latest "/init" 17 minutes ago Up 17 minutes 0.0.0.0:10080->80/tcp, 0.0.0.0:10443->443/tcp
Note the CONTAINER ID
, and become root
sudo su
# stop the unms container
docker stop 1fd7bcbd5fa4
Remove the container's json log file
rm /var/lib/docker/containers/1fd7bcbd5fa40f6ae79c403aa73eecc0ad410a52f78fbf92893fb96a944961f6/1fd7bcbd5fa40f6ae79c403aa73eecc0ad410a52f78fbf92893fb96a944961f6-json.log
Restart the container
docker start 1fd7bcbd5fa4
Hope that helps!
from docker-unms.
QUIET_MODE=1 solved heavy logging to docker container log but /config/unms/logs/unms.log kept growing rapidly. Let's see if logrotate can keep this file from growing too big. Link logrotate rule file as volume to container in docker-compose.yml like so
volumes: - ./config:/config - ./unms-logrotate:/etc/logrotate.d/unms-logrotate
And set contents of unms-logrotate to following
/config/unms/logs/*.log { size 10M copytruncate missingok rotate 7 compress delaycompress }
from docker-unms.
Thanks @petekaik.
I've added logrotate to the latest build using the config you posted. This should keep the internal log file under control.
from docker-unms.
I refreshed my container to your latest image and can see "unms" logrotate rule is now in place. Let's see if that takes care of controlling unms.log size.
from docker-unms.
Thanks @petekaik.
I've added logrotate to the latest build using the config you posted. This should keep the internal log file under control.
That 10M rule didn't seem to work afterall. I made another try with "daily" option and check if that cuts it.
/config/unms/logs/*.log { daily copytruncate missingok rotate 7 compress delaycompress }
Edit: That didn’t work either. May have to fall back to docker host cron triggering container logrotate.
Update: After few days testing this setup seems to work well enough. Not a 100% clean container solution (not exactly sure what best practice with containers and cron is) but now host crontab triggered container logrotate rotates unms.log and keeps filesizes under control (about 13M of log per day)
Host crontab:
58 23 * * * /path/to/your/host/docker exec unms sh -c 'logrotate -f /etc/logrotate.d/unms'
from docker-unms.
Thanks @petekaik.
from docker-unms.
So its not possible to deactivate the logging into unms.log ?
from docker-unms.
Related Issues (20)
- Postgres doesn't start HOT 2
- Changing Port HOT 1
- 64bit arm?
- [Synology] Error on install HOT 2
- 0.13.3 image in docker hub HOT 3
- High load on raspberry with raspberian default install HOT 3
- Let's encrypt still not working on 0.13.3 HOT 9
- Docker Compose UNMS setup help please
- cannot download docker package
- Where do you put SSL certificates and how do you update them?
- Error when installing docker-compose HOT 2
- UNMS on Synology DS 918+ with Synology as reverse proxy HOT 2
- Instalation on Raspberry PI ZERO HOT 3
- Clear huge unms.log HOT 6
- Wiki: installing docker-compose can be done via apt-get
- Request: arm64 support
- image for 0.14.x HOT 2
- WebSocket Issue on 0.13.3
- oznu/docker-unms is no longer maintained HOT 10
- UNMS is starting this should not take more than a minute
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-unms.