Open pczhang opened 1 month ago
api/4/fs returns the following:
[{"device_name":"/dev/nvme0n1p5","fs_type":"ext4","mnt_point":"/etc/resolv.conf","size":3821550878720,"used":3090866900992,"free":536483299328,"percent":85.2,"key":"mnt_point"},{"device_name":"/dev/nvme0n1p5","fs_type":"ext4","mnt_point":"/etc/hostname","size":3821550878720,"used":3090866900992,"free":536483299328,"percent":85.2,"key":"mnt_point"},{"device_name":"/dev/nvme0n1p5","fs_type":"ext4","mnt_point":"/etc/hosts","size":3821550878720,"used":3090866900992,"free":536483299328,"percent":85.2,"key":"mnt_point"}]
@pczhang Could you give us more info on you host system?
Also could i get the output of this?
python -c "import psutil; print(psutil.disk_partitions())"
Please replace python
with python3 or whatever works for your system
I installed it through docker. The host system is debian, which doesn't have python installed. I assume you want me to run the command inside the docker container.
sudo docker exec -ti bcc5a9f5161e /bin/sh /app # python -c "import psutil; print(psutil.disk_partitions())" [sdiskpart(device='/dev/nvme0n1p5', mountpoint='/etc/resolv.conf', fstype='ext4', opts='rw,relatime,errors=remount-ro'), sdiskpart(device='/dev/nvme0n1p5', mountpoint='/etc/hostname', fstype='ext4', opts='rw,relatime,errors=remount-ro'), sdiskpart(device='/dev/nvme0n1p5', mountpoint='/etc/hosts', fstype='ext4', opts='rw,relatime,errors=remount-ro')]
same command run on the host system has no issue.
sdiskpart(device='/dev/nvme0n1p5', mountpoint='/', fstype='ext4', opts='rw,relatime,errors=remount-ro', maxfile=255, maxpath=4096)
@pczhang
The current output that you have received is normal since docker automatically mounts those files in all containers. Getting the exact same result as the host is not possible due to docker's layer of virtualization.
If you are just interested in the disk usage, you can go ahead and use one of those entries. They all represent the same disk values. They are not hidden by default as you are able to get host disk info through them.
If you want to hide them (or just a portion of them) you can edit config file's fs
plugin section (example)
I'll go ahead and close the issue if you don't face any other problems.
Please fill the issue template completely next time as it would make investigating such cases faster.
Check the bug Before filling this bug report, please search if a similar issue already exists. In this case, just add a comment on this existing issue.
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Environement (please complete the following information)
Operating System (lsb_release -a or OS name/version):
To be completed with result of: lsb_release -a
Glances & psutil versions: Glances version: 4.1.2 Glances API version: 4 PsUtil version: 6.0.0 Log file: /tmp/glances-root.log
How do you install Glances (Pypi package, script, package manager, source): docker
Glances test: fs [OK] 0.00077s key=mnt_point [{'device_name': '/dev/nvme0n1p5', 'free': 536221671424, 'fs_type': 'ext4', 'key': 'mnt_point', 'mnt_point': '/etc/resolv.conf', 'percent': 85.2, 'size': 3821550878720, 'used': 3091128528896}, ...]
Additional context Add any other context about the problem here.
You can also pastebin: