pydf reported values are 8 times larger than those produced by df and di. df- hT Filesystem Type Size Used Avail Capacity Mounted on /dev/nda1p2 ufs 98G 14G 76G 16% / /dev/ada0p4 ufs 3.9G 311M 3.3G 9% /var di -g Filesystem Mount Gibis Used Avail %Used fs Type /dev/nda1p2 / 97.8 14.3 75.7 23% ufs /dev/ada0p4 /var 3.9 0.3 3.3 16% ufs pydf Filesystem Size Used Avail Use% Mounted on /dev/nda1p2 783G 114G 606G 14.6 [####..............] / /dev/ada0p4 31G 2486M 26G 7.9 [##................] /var Is python processing those numbers in a non-standard way?
Played a bit with command options: With --block-size=8589934592 (which is 8*1024^3) pydf shows correct values in GiB, but only for UFS. The reported values for ZFS must be divided by 32 to get the correct numbers. In Linux pydf reports the correct values without any --block-size option for all types of filesystems: ufs, zfs, ext4, btrfs, ntfs etc.
^Triage: Thank you for the report. This appears to be an issue that might be better reported upstream, along with the relevent FreeBSD / filesystem, version information
Hmm, the upstream development seems to have been stalled since 2015. The README.txt says: "pydf was written for linux, using specific linux features. The fact it runs on other systems is pure coincidence..." So, little chance for fixes to make it work in BSD! Probably better give up using it.
Sorry for the lack of feedback over those years... I'm back in the BSD world, but I'm not using pydf since long. There are other alternatives to achieve a similar purpose, such as sysutils/duf that is actively maintained, and as the upstream stopped, I don't think there is much sense in keeping this legacy port displaying a wrong output. Unless someone suddenly provides a patch to fix the erroneous values on FreeBSD. But I doubt it will happen, and I don't have cycles or appetite for diving into this, sorry.
I've just opened a bug to drop pydf: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281144
Port deprecated and marked for removal in bug #281144
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=44dab9ebc9613c89aaf1e18fc78c74b3abed951d commit 44dab9ebc9613c89aaf1e18fc78c74b3abed951d Author: Fernando Apesteguía <fernape@FreeBSD.org> AuthorDate: 2024-09-06 08:46:36 +0000 Commit: Fernando Apesteguía <fernape@FreeBSD.org> CommitDate: 2024-09-06 08:46:36 +0000 sysutils/pydf: Deprecate Inactive upstream. Does not properly work on FreeBSD. PR: 281144 252031 Approved by: baptiste@bapt.name (maintainer) sysutils/pydf/Makefile | 3 +++ 1 file changed, 3 insertions(+)