Bug 252031 - sysutils/pydf: Reports different values than df and di
Summary: sysutils/pydf: Reports different values than df and di
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Fernando Apesteguía
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2020-12-21 21:06 UTC by eu9gu4
Modified: 2024-09-06 08:49 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description eu9gu4 2020-12-21 21:06:44 UTC
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?
Comment 1 eu9gu4 2020-12-21 23:07:49 UTC
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.
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2020-12-22 01:13:37 UTC
^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
Comment 3 eu9gu4 2020-12-22 01:34:55 UTC
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.
Comment 4 baptiste 2024-07-10 22:01:52 UTC
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.
Comment 5 baptiste 2024-08-30 20:56:31 UTC
I've just opened a bug to drop pydf: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281144
Comment 6 Fernando Apesteguía freebsd_committer freebsd_triage 2024-09-06 08:48:55 UTC
Port deprecated and marked for removal in bug #281144
Comment 7 commit-hook freebsd_committer freebsd_triage 2024-09-06 08:49:07 UTC
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(+)