rolinh / dfc Goto Github PK
View Code? Open in Web Editor NEWReport file system space usage information with style
License: BSD 3-Clause "New" or "Revised" License
Report file system space usage information with style
License: BSD 3-Clause "New" or "Revised" License
Hi,
It seems that dfc -p [FSNAME]
does not work:
$ dfc -p /home
FILESYSTEM (=) USED FREE (-) %USED AVAILABLE TOTAL MOUNTED ON
$ echo $?
0
Can you please fix this ?
I'd like to include it in the Solus repos: https://dev.solus-project.com/T2459
On my hosts I have this display in en :
$ LANG= /bin/dfc
FILESYSTEM (=) USED FREE (-) %USED AVAILABLE TOTAL MOUNTED ON
dev [--------------------] 0.0% 7.8G 7.8G /dev
run [=-------------------] 0.0% 7.8G 7.8G /run
/dev/nvme0n1p2 [==========----------] 46.3% 251.5G 468.0G /
tmpfs [=-------------------] 0.0% 7.8G 7.8G /dev/shm
tmpfs [--------------------] 0.0% 4.0M 4.0M /sys/fs/cgroup
tmpfs [=-------------------] 0.0% 7.8G 7.8G /tmp
/dev/nvme0n1p1 [=====---------------] 24.9% 383.6M 511.0M /boot
tmpfs [=-------------------] 0.0% 1.6G 1.6G /run/user/1000
And I have this display on fr :
$ LANG=fr_FR.UTF-8 /bin/dfc -Tw
SYSTÈME DE FICHIERS TYPE (=) UT. LIB. (-) %UTILISÉ DISPO. TOTAL MONTÉ SUR
dev devtmpfs [--------------------------------------------------] 0,0% 7,8G 7,8G /dev
run tmpfs [=-------------------------------------------------] 0,0% 7,8G 7,8G /run
/dev/nvme0n1p2 ext4 [========================--------------------------] 46,3% 251,5G 468,0G /
tmpfs tmpfs [=-------------------------------------------------] 0,0% 7,8G 7,8G /dev/shm
tmpfs tmpfs [--------------------------------------------------] 0,0% 4,0M 4,0M /sys/fs/cgroup
tmpfs tmpfs [=-------------------------------------------------] 0,0% 7,8G 7,8G /tmp
/dev/nvme0n1p1 vfat [=============-------------------------------------] 24,9% 383,6M 511,0M /boot
tmpfs tmpfs [=-------------------------------------------------] 0,0% 1,6G 1,6G /run/user/1000
po files seems ok, and I tried to debug it, but I'm not able to test debug or release compiled bin in fr, I must forget something (never tried to work with gettext in c yet).
Can I test something else to help ? Is there any way to test it myself ?
SSL cert is fine, but nginx is returning a 502 error:
curl -v https://projects.gw-computing.net/projects/dfc
* Trying 37.59.30.58:443...
* Connected to projects.gw-computing.net (37.59.30.58) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /usr/local/etc/[email protected]/cert.pem
* CApath: /usr/local/etc/[email protected]/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: CN=projects.gw-computing.net
* start date: Nov 9 18:29:01 2020 GMT
* expire date: Feb 7 18:29:01 2021 GMT
* subjectAltName: host "projects.gw-computing.net" matched cert's "projects.gw-computing.net"
* issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3
* SSL certificate verify ok.
> GET /projects/dfc HTTP/1.1
> Host: projects.gw-computing.net
> User-Agent: curl/7.74.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 502 Bad Gateway
< Server: nginx
< Date: Fri, 25 Dec 2020 08:58:45 GMT
< Content-Type: text/html; charset=UTF-8
< Content-Length: 150
< Connection: keep-alive
<
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>
dfc blindly statfs()
es every filesystem it find, not just the ones asked about.
This leads to blocking when some automounted filesystems cannot be mounted, but the problematic filesystem is excluded either by type or -l
.
In comparison coreutils df only statfs()
es the filesystems it will actually print.
kandre@mainframe(pts/11)[master!] ~/git-repos/dfc/build % strace -e statfs,stat bin/dfc -W -f -T -l
stat("/home/kandre/.config/dfc/dfcrc", 0x7ffd438bf890) = -1 ENOENT (No such file or directory)
stat("/home/kandre/.config/dfc/dfcrc/.dfcrc", 0x7ffd438bf890) = -1 ENOENT (No such file or directory)
statfs("/sys", {f_type="SYSFS_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4142}) = 0
statfs("/proc", {f_type="PROC_SUPER_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4128}) = 0
statfs("/dev", {f_type="TMPFS_MAGIC", f_bsize=4096, f_blocks=1270410, f_bfree=1270410, f_bavail=1270410, f_files=1270410, f_ffree=1269742, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4130}) = 0
statfs("/dev/pts", {f_type="DEVPTS_SUPER_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4138}) = 0
statfs("/run", {f_type="TMPFS_MAGIC", f_bsize=4096, f_blocks=254636, f_bfree=248118, f_bavail=248118, f_files=1273178, f_ffree=1272063, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4138}) = 0
statfs("/", {f_type="EXT2_SUPER_MAGIC", f_bsize=4096, f_blocks=9579685, f_bfree=2962987, f_bavail=2958891, f_files=2444624, f_ffree=1935236, f_fsid={-331120939, 823145904}, f_namelen=255, f_frsize=4096, f_flags=4128}) = 0
statfs("/sys/kernel/security", {f_type="SECURITYFS_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4142}) = 0
statfs("/dev/shm", {f_type="TMPFS_MAGIC", f_bsize=4096, f_blocks=1273178, f_bfree=1195064, f_bavail=1195064, f_files=1273178, f_ffree=1272951, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=38}) = 0
statfs("/run/lock", {f_type="TMPFS_MAGIC", f_bsize=4096, f_blocks=1280, f_bfree=1279, f_bavail=1279, f_files=1273178, f_ffree=1273165, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4142}) = 0
statfs("/sys/fs/cgroup", {f_type="TMPFS_MAGIC", f_bsize=4096, f_blocks=1273178, f_bfree=1273178, f_bavail=1273178, f_files=1273178, f_ffree=1273164, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=47}) = 0
statfs("/sys/fs/cgroup/systemd", {f_type="CGROUP_SUPER_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4142}) = 0
statfs("/sys/fs/pstore", {f_type="PSTOREFS_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4142}) = 0
statfs("/proc/sys/fs/binfmt_misc", {f_type="BINFMTFS_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4128}) = 0
statfs("/dev/mqueue", {f_type=0x19800202, f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4128}) = 0
statfs("/sys/kernel/debug", {f_type="DEBUGFS_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4128}) = 0
statfs("/dev/hugepages", {f_type="HUGETLBFS_MAGIC", f_bsize=2097152, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=2097152, f_flags=4128}) = 0
statfs("/boot/efi", {f_type="MSDOS_SUPER_MAGIC", f_bsize=8192, f_blocks=63965, f_bfree=63924, f_bavail=63924, f_files=0, f_ffree=0, f_fsid={2050, 0}, f_namelen=1530, f_frsize=8192, f_flags=4128}) = 0
statfs("/proc/sys/fs/binfmt_misc", {f_type="BINFMTFS_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4128}) = 0
statfs("/proc/fs/nfsd", {f_type=0x6e667364, f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4128}) = 0
statfs("/run/user/122", {f_type="TMPFS_MAGIC", f_bsize=4096, f_blocks=254636, f_bfree=254635, f_bavail=254635, f_files=1273178, f_ffree=1273172, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4134}) = 0
statfs("/run/user/1000", {f_type="TMPFS_MAGIC", f_bsize=4096, f_blocks=254636, f_bfree=254631, f_bavail=254631, f_files=1273178, f_ffree=1273160, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4134}) = 0
statfs("/sys/kernel/debug/tracing", 0x7ffd438bf760) = -1 EACCES (Permission denied)
WARNING: /sys/kernel/debug/tracing was skipped because it could not be stated : Permission denied
statfs("/net/debs", {f_type="NFS_SUPER_MAGIC", f_bsize=1048576, f_blocks=18645, f_bfree=14534, f_bavail=13565, f_files=1220608, f_ffree=1163361, f_fsid={0, 0}, f_namelen=255, f_frsize=1048576, f_flags=4144}) = 0
statfs("/net/fynn", 0x7ffd438bf760) = -1 ENODEV (No such device)
// this last stats() blocked until the automounter gave up
WARNING: /net/fynn was skipped because it could not be stated : No such device
statfs("/net/hive", {f_type="NFS_SUPER_MAGIC", f_bsize=1048576, f_blocks=50269, f_bfree=33155, f_bavail=30763, f_files=3276800, f_ffree=2960926, f_fsid={0, 0}, f_namelen=255, f_frsize=1048576, f_flags=4144}) = 0
statfs("/net/mainframe", {f_type="NFS_SUPER_MAGIC", f_bsize=1048576, f_blocks=37421, f_bfree=11575, f_bavail=11559, f_files=2444624, f_ffree=1935236, f_fsid={0, 0}, f_namelen=255, f_frsize=1048576, f_flags=4144}) = 0
statfs("/net/debs", {f_type="NFS_SUPER_MAGIC", f_bsize=1048576, f_blocks=18645, f_bfree=14534, f_bavail=13565, f_files=1220608, f_ffree=1163361, f_fsid={0, 0}, f_namelen=255, f_frsize=1048576, f_flags=4144}) = 0
statfs("/net/hive", {f_type="NFS_SUPER_MAGIC", f_bsize=1048576, f_blocks=50269, f_bfree=33155, f_bavail=30763, f_files=3276800, f_ffree=2960926, f_fsid={0, 0}, f_namelen=255, f_frsize=1048576, f_flags=4144}) = 0
statfs("/net/mainframe", {f_type="NFS_SUPER_MAGIC", f_bsize=1048576, f_blocks=37421, f_bfree=11575, f_bavail=11559, f_files=2444624, f_ffree=1935236, f_fsid={0, 0}, f_namelen=255, f_frsize=1048576, f_flags=4144}) = 0
FILESYSTEM TYPE (=) USED FREE (-) %USED AVAILABLE TOTAL MOUNTED ON
udev devtmpfs [--------------------] 0.0% 4.8G 4.8G /dev
tmpfs tmpfs [=-------------------] 2.6% 969.2M 994.7M /run
/dev/mapper/vg_seven-root ext4 [==============------] 69.1% 11.3G 36.5G /
tmpfs tmpfs [==------------------] 6.1% 4.6G 4.9G /dev/shm
tmpfs tmpfs [=-------------------] 0.1% 5.0M 5.0M /run/lock
tmpfs tmpfs [--------------------] 0.0% 4.9G 4.9G /sys/fs/cgroup
/dev/sda2 vfat [=-------------------] 0.1% 499.4M 499.7M /boot/efi
tmpfs tmpfs [=-------------------] 0.0% 994.7M 994.7M /run/user/122
tmpfs tmpfs [=-------------------] 0.0% 994.7M 994.7M /run/user/1000
+++ exited with 0 +++
in comparison to
mainframe(pts/11)[master!] ~/git-repos/dfc/build % strace -e statfs,stat df -Tl
stat("/sys", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
stat("/proc", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
stat("/dev", {st_mode=S_IFDIR|0755, st_size=4260, ...}) = 0
stat("/dev/pts", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat("/run", {st_mode=S_IFDIR|0755, st_size=1240, ...}) = 0
stat("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/sys/kernel/security", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat("/dev/shm", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=220, ...}) = 0
stat("/run/lock", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=140, ...}) = 0
stat("/sys/fs/cgroup", {st_mode=S_IFDIR|0755, st_size=300, ...}) = 0
stat("/sys/fs/cgroup/systemd", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
stat("/sys/fs/pstore", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat("/proc/sys/fs/binfmt_misc", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat("/dev/mqueue", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=40, ...}) = 0
stat("/sys/kernel/debug", {st_mode=S_IFDIR|0700, st_size=0, ...}) = 0
stat("/dev/hugepages", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat("/boot/efi", {st_mode=S_IFDIR|0755, st_size=16384, ...}) = 0
stat("/proc/sys/fs/binfmt_misc", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat("/proc/fs/nfsd", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat("/run/user/122", {st_mode=S_IFDIR|0700, st_size=80, ...}) = 0
stat("/run/user/1000", {st_mode=S_IFDIR|0700, st_size=140, ...}) = 0
stat("/sys/kernel/debug/tracing", 0x7ffff2f68340) = -1 EACCES (Permission denied)
stat("/net/debs", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/net/fynn", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat("/net/hive", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
stat("/net/mainframe", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
statfs("/dev", {f_type="TMPFS_MAGIC", f_bsize=4096, f_blocks=1270410, f_bfree=1270410, f_bavail=1270410, f_files=1270410, f_ffree=1269742, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4130}) = 0
statfs("/run", {f_type="TMPFS_MAGIC", f_bsize=4096, f_blocks=254636, f_bfree=248118, f_bavail=248118, f_files=1273178, f_ffree=1272063, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4138}) = 0
statfs("/", {f_type="EXT2_SUPER_MAGIC", f_bsize=4096, f_blocks=9579685, f_bfree=2962985, f_bavail=2958889, f_files=2444624, f_ffree=1935236, f_fsid={-331120939, 823145904}, f_namelen=255, f_frsize=4096, f_flags=4128}) = 0
statfs("/sys/kernel/security", {f_type="SECURITYFS_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4142}) = 0
statfs("/dev/shm", {f_type="TMPFS_MAGIC", f_bsize=4096, f_blocks=1273178, f_bfree=1194580, f_bavail=1194580, f_files=1273178, f_ffree=1272948, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=38}) = 0
statfs("/run/lock", {f_type="TMPFS_MAGIC", f_bsize=4096, f_blocks=1280, f_bfree=1279, f_bavail=1279, f_files=1273178, f_ffree=1273165, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4142}) = 0
statfs("/sys/fs/cgroup", {f_type="TMPFS_MAGIC", f_bsize=4096, f_blocks=1273178, f_bfree=1273178, f_bavail=1273178, f_files=1273178, f_ffree=1273164, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=47}) = 0
statfs("/sys/fs/cgroup/systemd", {f_type="CGROUP_SUPER_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4142}) = 0
statfs("/sys/fs/pstore", {f_type="PSTOREFS_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4142}) = 0
statfs("/proc/sys/fs/binfmt_misc", {f_type="BINFMTFS_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4128}) = 0
statfs("/dev/hugepages", {f_type="HUGETLBFS_MAGIC", f_bsize=2097152, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=2097152, f_flags=4128}) = 0
statfs("/boot/efi", {f_type="MSDOS_SUPER_MAGIC", f_bsize=8192, f_blocks=63965, f_bfree=63924, f_bavail=63924, f_files=0, f_ffree=0, f_fsid={2050, 0}, f_namelen=1530, f_frsize=8192, f_flags=4128}) = 0
statfs("/proc/fs/nfsd", {f_type=0x6e667364, f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4128}) = 0
statfs("/run/user/122", {f_type="TMPFS_MAGIC", f_bsize=4096, f_blocks=254636, f_bfree=254635, f_bavail=254635, f_files=1273178, f_ffree=1273172, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4134}) = 0
statfs("/run/user/1000", {f_type="TMPFS_MAGIC", f_bsize=4096, f_blocks=254636, f_bfree=254631, f_bavail=254631, f_files=1273178, f_ffree=1273160, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4134}) = 0
statfs("/sys/kernel/debug/tracing", 0x7ffff2f67c00) = -1 EACCES (Permission denied)
Filesystem Type 1K-blocks Used Available Use% Mounted on
udev devtmpfs 5081640 0 5081640 0% /dev
tmpfs tmpfs 1018544 26072 992472 3% /run
/dev/mapper/vg_seven-root ext4 38318740 26466800 11835556 70% /
tmpfs tmpfs 5092712 314392 4778320 7% /dev/shm
tmpfs tmpfs 5120 4 5116 1% /run/lock
tmpfs tmpfs 5092712 0 5092712 0% /sys/fs/cgroup
/dev/sda2 vfat 511720 328 511392 1% /boot/efi
tmpfs tmpfs 1018544 4 1018540 1% /run/user/122
tmpfs tmpfs 1018544 20 1018524 1% /run/user/1000
+++ exited with 0 +++
Hello,
first and foremost, I really like dfc
. On my server I have multiple hard drives of different size:
FILESYSTEM TYPE (=) USED FREE (-) %USED USED AVAILABLE TOTAL MOUNTED ON
/dev/sdb1 fuseblk [=================---] 81.0% 754.7G 176.9G 931.5G /media/00
/dev/mapper/vc1 ext4 [===================-] 90.2% 498.8G 57.1G 585.8G /media/01
/dev/mapper/vc2 ext4 [=================---] 82.0% 704.6G 164.6G 915.9G /media/02
/dev/mapper/vc3 ext4 [==============------] 69.0% 374.6G 181.4G 585.8G /media/03
Now, as you can see, the hard drives are of different sizes each so it's a bit hard at first glance to see which one has the most free space.
For this reason I was thinking of an alternative graph display where each graph resembles the absolute size of the fs and is filled up accordingly, something like this:
FILESYSTEM TYPE (=) USED FREE (-) %USED USED AVAILABLE TOTAL MOUNTED ON
/dev/sdb1 fuseblk [==============----] 81.0% 754.7G 176.9G 931.5G /media/00
/dev/mapper/vc1 ext4 [=========-] 90.2% 498.8G 57.1G 585.8G /media/01
/dev/mapper/vc2 ext4 [=============---] 82.0% 704.6G 164.6G 915.9G /media/02
/dev/mapper/vc3 ext4 [=======---] 69.0% 374.6G 181.4G 585.8G /media/03
This is a very crude mock up of what I have in mind. (I know that my specific scenario is rather a thing for LVM but I'm to lazy.)
Let me know what you think about this and if you're interested in a feature like this, I'd work on a PR.
Hi,
Can you please add the ability to list mount points because one does not know the FSNAME of standard mount points (like /home or /var) in advance:
$ dfc /home /var /usr
/dev/mapper/home_VG-home [================----] 75,2% 24,8G 100,0G /home
+v/mapper/KUbuntu_VG-var [===-----------------] 14,7% 8,3G 9,7G /var
+er/KUbuntu_VG-usr_local [====----------------] 16,0% 4,2G 5,0G /usr/local
Thank you for this great tool 👍
One would expect dfc -p <filesystem>
to result in either exact string matching, or substring matching, but it seems it does half of both by doing substring matching but only on the first instance it encounters, which is unexpected:
(venv) speedster@hoffman:/mnt$ dfc -p acre
FILESYSTEM (=) USED FREE (-) %USED AVAILABLE TOTAL MOUNTED ON
acre1 [==================--] 86.5% 5.7T 42.0T /farm/acre1
(venv) speedster@hoffman:/mnt$ df |grep acre
acre1 45119552512 39009344512 6110208000 87% /farm/acre1
/dev/sdak1 15625875456 15623655424 2220032 100% /farm/acre2
/dev/sdao2 4883638272 4782704640 100933632 98% /farm/acre7
/dev/sdam2 1953463296 1806845952 146617344 93% /farm/acre3
/dev/sdap2 976745472 956641024 20104448 98% /farm/acre6
/dev/sdf2 15625859072 3976003584 11649855488 26% /farm/acre4
/dev/sdan1 5860519936 3721060352 2139459584 64% /farm/acre8
/dev/sdar1 5860519936 1806887296 4053632640 31% /farm/acre5
/dev/sdas1 3907014912 2869947264 1037067648 74% /farm/acre12
/dev/sdat1 3907014912 123648 3906891264 1% /farm/acre14
Ideally, it would be cool to get the substring search result of both device and mount path strings but if that's too complicated, matching only exact would be less confusing because it gives heart attack the way it's currently implemented ;)
[note: and if you do decide to implement full substring matching, number sort would be a nice cherry on top, but certainly not required 😀
Thanks for making such a wonderful console visual utility ! ⭐⭐⭐⭐⭐
-=dave
(venv) speedster@hoffman:/mnt$ dfc -v
dfc 3.1.1
(venv) speedster@hoffman:/mnt$ uname -a
Linux hoffman 5.4.106-1-pve #1 SMP PVE 5.4.106-1 (Fri, 19 Mar 2021 11:08:47 +0100) x86_64 GNU/Linux
$ dfc -t ext4 -b
FILESYSTEM %USED AVAILABLE TOTAL MOUNTED ON
+ilk--hdd--internal-root 76.4% 6.9G 29.4G /
+milk--hdd--internal-var 74.3% 3.8G 14.7G /var
+ilk--hdd--internal-home 98.1% 2.1G 112.7G /home
+k--hdd--internal-lmedia 94.6% 4.5G 83.4G /home/lmedia
$ dfc -t ext4
FILESYSTEM (=) USED FREE (-) %USED AVAILABLE TOTAL MOUNTED ON
+ilk--hdd--internal-root [================----] 76.4% 6.9G 29.4G /
+milk--hdd--internal-var [===============-----] 73.6% 3.9G 14.7G /var
+ilk--hdd--internal-home [====================] 98.1% 2.1G 112.7G /home
+k--hdd--internal-lmedia [===================-] 94.6% 4.5G 83.4G /home/lmedia
$ dfc -t ext4 -w
FILESYSTEM (=) USED FREE (-) %USED AVAILABLE TOTAL MOUNTED ON
+ilk--hdd--internal-root [=======================================-----------] 76.4% 6.9G 29.4G /
+milk--hdd--internal-var [======================================------------] 74.1% 3.8G 14.7G /var
+ilk--hdd--internal-home [==================================================] 98.1% 2.1G 112.7G /home
+k--hdd--internal-lmedia [================================================--] 94.6% 4.5G 83.4G /home/lmedia
df gives
$ df
Filesystem Size Used Avail Use% Mounted on
dev 1.6G 0 1.6G 0% /dev
run 1.6G 1.3M 1.6G 1% /run
/dev/mapper/milk--hdd--internal-root 30G 18G 7.0G 73% /
tmpfs 1.6G 88M 1.6G 6% /dev/shm
tmpfs 1.6G 0 1.6G 0% /sys/fs/cgroup
tmpfs 1.6G 12K 1.6G 1% /tmp
/dev/sdc1 504M 72M 408M 15% /boot
/dev/mapper/milk--hdd--internal-var 15G 10G 4.0G 72% /var
/dev/mapper/milk--hdd--internal-home 113G 105G 2.2G 98% /home
/dev/mapper/milk--hdd--internal-lmedia 84G 79G 4.6G 95% /home/lmedia
tmpfs 327M 52K 327M 1% /run/user/1000
The site https://projects.gw-computing.net/ seems not to be available, though there is a GitHub organization https://github.com/gw-computing . Should the current repository be regarded as the main one?
This project github description say it is a mirror of https://projects.gw-computing.net/projects/dfc , but I am unable to reach the URL. Is the upstream project disappeared from the Internet?
Hi,
I'd like to know how to build dfc for arm-linux-gnueabi ?
Can you help ?
Hi,
Here is what I get when I try and build dfc for CC=arm-linux-androideabi-gcc
:
[ 40%] Building C object CMakeFiles/dfc.dir/src/util.c.o
/home/sebastien/src/dfc/src/util.c: In function 'getttywidth':
/home/sebastien/src/dfc/src/util.c:488:17: error: storage size of 'win' isn't known
/home/sebastien/src/dfc/src/util.c:488:17: warning: unused variable 'win' [-Wunused-variable]
make[2]: *** [CMakeFiles/dfc.dir/src/util.c.o] Error 1
make[1]: *** [CMakeFiles/dfc.dir/all] Error 2
make: *** [all] Error 2
Can you help ?
Hi,
I have the following error when building :
make[3]: Entering directory `/home/nemo/src/dfc/build'
[ 70%] Generating ../../po/nl.po
/usr/bin/msgmerge: error while opening "/home/nemo/src/dfc/po/nl.po" for reading: No such file or directory
make[3]: *** [../po/nl.po] Error 1
make[3]: Leaving directory `/home/nemo/src/dfc/build'
make[2]: *** [po/CMakeFiles/generate-dfc-nl-po.dir/all] Error 2
make[2]: Leaving directory `/home/nemo/src/dfc/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/nemo/src/dfc/build'
make: *** [release] Error 2
Can you help me ?
Awesome tool! Thank you
This is a thing I noticed working on #24 :
If I draw a graph in the latex output, every empty graph element is outputted as a \-
:
dev & \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- & 0\% & 2.8G & 2.8G & /dev
However, using pdflatex
(and I'm pretty sure every other TeX compiler), the \-
is interpreted as a suggestion to hyphenate.
So this graph is drawn is empty:
If I were to replace every \-
with a simple -
, it instead is drawn just like the text ouptut:
(notice the tiny line in between)
Is the current behaviour supposed to be like that? I read in the source that there might be an overhaul to the latex graph output at some point, but what about now?
If you want to change this, I can do it with #24 as well.
Hello,
dfc is actually displaying warnings when it cannot stat some files/folders due to permissions.
I don't know if it's intended since df (from gnu coreutils) does not do that.
Again, I didn't read any code of dfc and I don't know if it's wanted.
Thanks for making this awesome tool !
I tried to change the graph character (which is set by default with "="
) to "■"
or other ASCII character in the files /etc/xdg/dfc/en/dfcrc
and /etc/xdg/dfc/dfcrc
(and all other places where it is possible) but it does not work.
Do you know why? And how to fix it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.