Coder Social home page Coder Social logo

dfrs's People

Contributors

anthraxx avatar kpcyrd avatar svenstaro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dfrs's Issues

durs?

This is great; good work :)

Just a suggestion / request, but... a du -hcs * equivalent, durs, would be really nice. Essentially for something like kdirstat, but at the command line.

If enough of the code was shared, it might make sense to have the same executable behave differently based on its argv[0] name (durs or dfrs), as some other tools (whatis, mtools, gawk, etc.) do.

Edit: never mind. inspired by this, I found a few du equivalents on crates.io, like parallel-disk-usage :)

Fails on FreeBSD: Error: No such file or directory (os error 2)

i
[yuri@yv /usr/ports/sysutils/dfrs]$ dfrs 
Error: No such file or directory (os error 2)

It doesn't say what file it was trying to open.
It was actually /proc/self/mounts.

 15940 dfrs     NAMI  "/proc/self/mounts"
 15940 dfrs     RET   openat -1 errno 2 No such file or directory

sysctl kern.disks reads mounted disks on FreeBSD.

Feature request : Add the ability to list mounts options

Hi dear devβ‹…s !

Can you please add the ability to list mount options (or tell us if you plan to release this feature since the MOUNT structure has the mnt_opts element, which seems to imply that it is planned) as seen in parse_mount() test and like the dfctool do :
file : dfrs/src/mount.rs:12 (for the struct β†’ :17) :

#[derive(Clone)]
pub struct Mount {
    pub mnt_fsname: String,
    pub mnt_dir: String,
    pub mnt_type: String,
    pub mnt_opts: String,
    pub mnt_freq: i32,
    pub mnt_passno: i32,
    pub capacity: u64,
    pub free: u64,
    pub used: u64,
    pub statfs: Option<nix::sys::statfs::Statfs>,
}

file : dfrs/src/mount.rs:166 (for the test) :

 #[test]
    fn parse_mounts() {
        let file = r#"sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime,hidepid=2 0 0
udev /dev devtmpfs rw,nosuid,relatime,size=2009144k,nr_inodes=502286,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=402800k,mode=755 0 0
/dev/mapper/vg0-root / ext4 rw,relatime,errors=remount-ro 0 0
tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
pstore /sys/fs/pstore pstore rw,relatime 0 0
configfs /sys/kernel/config configfs rw,relatime 0 0
tmpfs /run/shm tmpfs rw,nosuid,nodev,noexec,relatime,size=805580k 0 0
/dev/mapper/vg0-boot /boot ext4 rw,relatime 0 0
/dev/mapper/vg0-tmp /tmp ext4 rw,relatime 0 0
none /cgroup2 cgroup2 rw,relatime 0 0
"#;

Thank you for this great tool and to contrib to the rustutils'vers πŸ‘

Calculate sum over all shown file systems

df has --total. Could be interesting to have this in dfrs. Together with the better defaults of dfrs, it would show the net storage with ``

$ df --help | grep total
      --total           elide all entries insignificant to available space,
                          and produce a grand total
field names are: 'source', 'fstype', 'itotal', 'iused', 'iavail', 'ipcent',
# df --total -T / /boot /dev 
Filesystem                  Type     1K-blocks      Used Available Use% Mounted on
/dev/mapper/nvme0n1p5_crypt btrfs    478497792 158877508 318601596  34% /
/dev/nvme0n1p1              btrfs       487424    188340    240604  44% /boot
udev                        devtmpfs  16161996         0  16161996   0% /dev
total                       -        495147212 159065848 335004196  33% -

To keep things simple, maybe --total should be limited to fs on actual block devices and not tmpfs nor udev?

feature request: show ZFS filesystems by default

When using dfrs, ZFS datasets/filesystems aren't displayed unless dfrs -aa is used. However, -aa also displays a lot of filesystems that probably aren't useful to look at, like tmpfs, hugetlbfs etc.

Feature request: Support CIFS mounts

Assume a CIFS mount at /mnt/x, running dfrs /mnt/x results in

dfrs /mnt/x
Filesystem          Type                       Used% Avail   Used   Size Mounted on
/xxxxxx/root        ext4 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇╍╍  88.8% 52.4G 414.3G 466.7G /

which is equivalent to dfrs / while df -h shows usage of the filesystem at //cifshost/folder.

Feature request: Hide squashfs filesystems by default.

currently on Ubuntu 22.04 and currently have several snap package installed. When using dfrs (0.0.7), all looped devices for every snap application shows up in the listing which is rather useless since they all show 100% utilization. Was wondering if squashfs filesystems could be added to the list of filesystems that are normally hidden unless -a or -aa is used to show them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.