feature: `docker system df` also display local log size
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Description
One of our servers' disk was completely full.
Docker images + containers + volumes + build cache (as reported by docker system df) was not nearly equal to du -h -d 0 /var/lib/docker. We had 30 GiB of json.logs. Some other people on StackOverflow had similar problems with disk full and not finding the problem.
It would be nice if docker system df also had a local logs entry, like:
$ docker system df
TYPE TOTAL ACTIVE SIZE RECLAIMABLE
Images 21 18 16GB 10.07GB (60%)
Containers 18 17 812.8MB 15.24MB (1%)
Local Volumes 69 14 6.428GB 395.9MB (6%)
Build Cache 0 0 0B 0B
Local log 18 18 30GB 0B
Of course, this only works for the logging drivers that save the files on the same machine (local, json-log, ...). For remote logging, it is another story.
Output of docker version:
Client:
Version: 18.09.7
API version: 1.39
Go version: go1.10.1
Git commit: 2d0083d
Built: Fri Aug 16 14:20:06 2019
OS/Arch: linux/amd64
Experimental: false
Server:
Engine:
Version: 18.09.7
API version: 1.39 (minimum version 1.12)
Go version: go1.10.1
Git commit: 2d0083d
Built: Wed Aug 14 19:41:23 2019
OS/Arch: linux/amd64
Experimental: false
Output of docker info:
Containers: XX
Running: XX
Paused: XX
Stopped: XX
Images: XX
Server Version: 18.09.7
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version:
runc version: N/A
init version: v0.18.0 (expected: fec3683b971d9c3ef73f284f176672c44b448662)
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.15.0-1031-oracle
Operating System: Ubuntu 18.04.3 LTS
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 15.66GiB
Name: xxxx
ID: D246:MT7L:TCMQ:ZF5W:AGKZ:767O:DBMD:REXV:HWID:ALVQ:FOAZ:2AJL
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: No swap limit support
Additional environment details (AWS, VirtualBox, physical, etc.):
any
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the docker system df CLI entry point and trace how image, container, volume, and build-cache sizes are collected. Check how local json-file and local logging drivers expose log paths and sizes; done means a Local log row appears for local-file drivers without counting remote logs, with output tests covering the new entry.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100