You are not logged in.

#26 2012-04-16 12:33:19

jakobcreutzfeldt
Member
Registered: 2011-05-12
Posts: 1,041

Re: dfc: Display file system space usage using graph and colors

Thanks for the detailed reply. Sorry, I don't like the feeling of running in, pointing my finger and yelling "bloat!". It's pretty accusatory and I'm not that dogmatic about it. I agree that adding the extra options won't slow down its core operation. I was mainly thinking about maintainability of an extra 1300 lines of code. Anyway, I'm not really complaining since I use dfc every day!

Offline

#27 2012-04-16 13:40:17

Rolinh
Member
From: Switzerland
Registered: 2011-05-07
Posts: 144
Website

Re: dfc: Display file system space usage using graph and colors

You're welcome! And don't be sorry. I actually like when users share their point of view! If I had thought you were right, I would have re-think dfc.

About your concern about maintainability:
Before implementing all those new options, I took quite some time to think about dfc's code structure. I rearranged the code from a monolithic structure to something adapted to the growth of code.
For the new export format (which is the main cause of the growth in terms of lines of code), I use a design pattern very similar to the factory method pattern which makes the code very easy to adapt and with only minor changes when required. All that only to say I pay a special attention to the code structure and readability so it is really easy for me to maintain dfc over time (the code is also much commented).
So you should not be worry about it. wink

jakobcreutzfeldt wrote:

I'm not really complaining since I use dfc every day!

Woaoo...! I do not even use dfc every day myself! I'm glad you it's helpful for you. smile

Offline

#28 2012-04-21 19:24:18

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: dfc: Display file system space usage using graph and colors

df can handle devices arguments (e.g. df /dev/sda3), could dfc do the same?


gh · da · ds

Offline

#29 2012-04-22 10:59:48

Rolinh
Member
From: Switzerland
Registered: 2011-05-07
Posts: 144
Website

Re: dfc: Display file system space usage using graph and colors

Hi,

in the development version, I've added a new filter which works like this:

[robin@thor ~] % dfc -p /dev
FILESYSTEM  (=) USED      FREE (-) %USED AVAILABLE     TOTAL MOUNTED ON 
/dev        [--------------------]    0%      3.8G      3.8G /dev
/dev/sdc1   [===========---------]   54%     12.8G     27.9G /
/dev/sda7   [====----------------]   16%     80.5M     95.4M /boot
/dev/sda3   [==============------]   69%    105.7G    344.6G /home
/dev/sda5   [============--------]   59%      5.2G     12.6G /var
/dev/sdb1   [===============-----]   73%     81.3G    297.8G /mnt/Videos
[robin@thor ~] % dfc -p /dev/sda
FILESYSTEM  (=) USED      FREE (-) %USED AVAILABLE     TOTAL MOUNTED ON 
/dev/sda7   [====----------------]   16%     80.5M     95.4M /boot
/dev/sda3   [==============------]   69%    105.7G    344.6G /home
/dev/sda5   [============--------]   59%      5.2G     12.6G /var
[robin@thor ~] % dfc -p /dev/sda,/dev/sdb
FILESYSTEM  (=) USED      FREE (-) %USED AVAILABLE     TOTAL MOUNTED ON 
/dev/sda7   [====----------------]   16%     80.5M     95.4M /boot
/dev/sda3   [==============------]   69%    105.7G    344.6G /home
/dev/sda5   [============--------]   59%      5.2G     12.6G /var
/dev/sdb1   [===============-----]   73%     81.3G    297.8G /mnt/Videos
[robin@thor ~] % dfc -p -/dev/sda,/dev/sdb
FILESYSTEM  (=) USED      FREE (-) %USED AVAILABLE     TOTAL MOUNTED ON 
rootfs      [===========---------]   54%     12.8G     27.9G /
/dev        [--------------------]    0%      3.8G      3.8G /dev
run         [=-------------------]    0%      3.8G      3.8G /run
/dev/sdc1   [===========---------]   54%     12.8G     27.9G /
shm         [=-------------------]    3%      3.7G      3.8G /dev/shm
tmpfs       [=-------------------]    0%      6.0G      6.0G /tmp
[robin@thor ~] % dfc -p /
FILESYSTEM  (=) USED      FREE (-) %USED AVAILABLE     TOTAL MOUNTED ON 
/dev        [--------------------]    0%      3.8G      3.8G /dev
/dev/sdc1   [===========---------]   54%     12.8G     27.9G /
/dev/sda7   [====----------------]   16%     80.5M     95.4M /boot
/dev/sda3   [==============------]   69%    105.7G    344.6G /home
/dev/sda5   [============--------]   59%      5.2G     12.6G /var
/dev/sdb1   [===============-----]   73%     81.3G    297.8G /mnt/Videos
[robin@thor ~] % dfc -p /dev/sdc1
FILESYSTEM  (=) USED      FREE (-) %USED AVAILABLE     TOTAL MOUNTED ON 
/dev/sdc1   [===========---------]   54%     12.8G     27.9G /

It works a little bit differently but I think you get about the same result.

Offline

#30 2012-04-22 11:59:02

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: dfc: Display file system space usage using graph and colors

Great.


gh · da · ds

Offline

#31 2012-04-22 17:24:01

dodo3773
Member
Registered: 2011-03-17
Posts: 801

Re: dfc: Display file system space usage using graph and colors

Can dfc also show a "used" column in space (gb, mb, etc..) along with the bar graph? I looked through the options and could not figure it out. Thanks.

Offline

#32 2012-04-22 18:14:06

Rolinh
Member
From: Switzerland
Registered: 2011-05-07
Posts: 144
Website

Re: dfc: Display file system space usage using graph and colors

Sure. How is it even possible I did not pay attention to this? It'll be added for version 3.0.0 then.

Offline

#33 2012-04-22 18:27:29

dodo3773
Member
Registered: 2011-03-17
Posts: 801

Re: dfc: Display file system space usage using graph and colors

Rolinh wrote:

Sure. How is it even possible I did not pay attention to this? It'll be added for version 3.0.0 then.

Thank you.

Offline

#34 2012-05-03 17:03:57

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: dfc: Display file system space usage using graph and colors

I might be useful to show the used space in absolute size and not just as a percentage of the available space.


gh · da · ds

Offline

#35 2012-05-03 17:43:11

dodo3773
Member
Registered: 2011-03-17
Posts: 801

Re: dfc: Display file system space usage using graph and colors

bloom wrote:

I might be useful to show the used space in absolute size and not just as a percentage of the available space.

That is what I meant by my previous comment:

Can dfc also show a "used" column in space (gb, mb, etc..) along with the bar graph? I looked through the options and could not figure it out. Thanks.

and it is getting added in version 3.0.0

Sure. How is it even possible I did not pay attention to this? It'll be added for version 3.0.0 then.

Offline

#36 2012-05-03 20:26:17

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: dfc: Display file system space usage using graph and colors

First of all, thank you for dfc -- it's a really nice utility. I have a little problem with the difference in computed sizes when I run dfc (v. 2.5 and 3.0.0-devel) and df side by side:

~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda5        14G  3.6G  9.2G  29% /
/dev/sda1       9.7G  3.6G  5.6G  39% /mnt/sda1
/dev/sda3       396G  289G   87G  77% /mnt/sda3
tmpfs           1.5G   73M  1.5G   5% /tmp

vs

~ $ dfc
FILESYSTEM  (=) USED      FREE (-) %USED AVAILABLE     TOTAL MOUNTED ON 
/dev/sda5   [=======-------------]   32%      9.1G     13.4G /
/dev/sda1   [=========-----------]   42%      5.6G      9.6G /mnt/sda1
/dev/sda3   [================----]   78%     86.7G    395.0G /mnt/sda3
tmpfs       [=-------------------]    5%      1.4G      1.5G /tmp

Where does the difference in reported disk usage come from? What am I missing?


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#37 2012-05-03 21:26:56

Rolinh
Member
From: Switzerland
Registered: 2011-05-07
Posts: 144
Website

Re: dfc: Display file system space usage using graph and colors

Actually, computing sizes is really more complicated than it seems. There is lots of things to consider and it gets even worse when considering other OS (read *BSD type). They all have their specific stuff.
If you read stavfs(3) man page, you will notice that the statvfs structure contains various information and that, for instance, the free blocks number differs for a privileged and an unprivileged user. In df(1) they compute the used size by subtracting what is available to the root user from the total size. In dfc, I compute the used size using f_bavail instead because it seems more logical to me. This is different so this is why I mention this in dfc(1) man page. wink
To be honest, I planned to review how I size is computed in dfc(1) for all platforms on which dfc(1) currently runs or is planned to be ported on.
However, I do not think dfc(1) provides wrong values, it just depends on the point of view. I compared dfc(1) with other similar tools (pydf, cdf, xdf, discus and di) and they all display different values...

@dodo3773 & bloom: I just implemented this as an option (-d) in the development branch. wink

Offline

#38 2012-05-04 00:32:46

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: dfc: Display file system space usage using graph and colors

Thank you so much for your comprehensive explanation (and some reading recommendation). I suspected my 'frame of reference' was to blame which made me search for fixed, file system relative values. Now the thing seems clearer, though even more complicated. ;-)


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#39 2012-05-18 13:37:26

Rolinh
Member
From: Switzerland
Registered: 2011-05-07
Posts: 144
Website

Re: dfc: Display file system space usage using graph and colors

Hi all,

dfc 3.0.0 is near (should be released in about 2 weeks from now) and... among lots of other things, it brings translation support.
If you feel like wanting to help or want dfc into a language you speak fluently, your contribution would be much appreciated. smile
I wrote a news that explains the process to follow.

Cheers

Offline

#40 2012-05-30 23:56:38

Rolinh
Member
From: Switzerland
Registered: 2011-05-07
Posts: 144
Website

Re: dfc: Display file system space usage using graph and colors

Hi,

dfc 3.0.0 is out smile
Read the announcement for details (and there are a lot of changes!).

I hope you will enjoy it.

Offline

#41 2012-05-31 02:09:05

dodo3773
Member
Registered: 2011-03-17
Posts: 801

Re: dfc: Display file system space usage using graph and colors

Awesome. Thanks for the "show used size" switch. Exactly what I wanted.

Offline

#42 2012-06-19 16:14:24

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: dfc: Display file system space usage using graph and colors

It might be nice to support mount points:

df /media/foo

works while

dfc -p /media/foo

doesn't.


gh · da · ds

Offline

#43 2012-06-19 18:06:45

Rolinh
Member
From: Switzerland
Registered: 2011-05-07
Posts: 144
Website

Re: dfc: Display file system space usage using graph and colors

Very nice suggestion.
I'll add it on the roadmap for version 3.1.0 wink

Offline

#44 2012-09-29 09:59:20

Rolinh
Member
From: Switzerland
Registered: 2011-05-07
Posts: 144
Website

Re: dfc: Display file system space usage using graph and colors

Hi all,

I just released version 3.0.1 which fixes really minor bugs and adds a changelog file as I have been requested.
I'll probably start working on version 3.1.0 now. If you have some feature requests, don't hesitate. ;-)

By the way, I set up a Github mirror so if you would like to contribute (either by providing new translations or patches) you can also do it using this social coding platform.

Cheers

Offline

#45 2012-11-08 14:52:36

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: dfc: Display file system space usage using graph and colors

I'd like to be able to specify bold colors in the configuration file.


gh · da · ds

Offline

#46 2012-11-08 18:05:19

Rolinh
Member
From: Switzerland
Registered: 2011-05-07
Posts: 144
Website

Re: dfc: Display file system space usage using graph and colors

I see no reason for not implementing this minor feature. Therefore, I opened a task for it.
However, I'll be too busy until the end of this year to be able to work on dfc. So don't expect it before early next year.

Offline

#47 2012-11-09 12:00:47

Pranavg1890
Member
From: Nagpur,India
Registered: 2012-09-07
Posts: 114

Re: dfc: Display file system space usage using graph and colors

Hi, Rolinh , can you add an option to print the label of the partition?


Using Openbox + Tint2 + Idesk

Offline

#48 2012-11-09 18:13:39

Rolinh
Member
From: Switzerland
Registered: 2011-05-07
Posts: 144
Website

Re: dfc: Display file system space usage using graph and colors

Pranavg1890 wrote:

Hi, Rolinh , can you add an option to print the label of the partition?

Hi,

This was already planned actually. See this ticket. wink
However, same remark as in my last message: I won't have time to work on dfc before the very end of this year so be patient. wink

Last edited by Rolinh (2012-11-09 18:14:53)

Offline

#49 2013-04-08 13:31:14

Rolinh
Member
From: Switzerland
Registered: 2011-05-07
Posts: 144
Website

Re: dfc: Display file system space usage using graph and colors

Hi guys,

I just released dfc 3.0.2 which brings 2 bug fixes (a minor and an annoying one). See this annoucement for information.
Therefore, I updated the AUR package to 3.0.2.

Version 3.1.0 is still on the way but unfortunately I haven't much time to spend on it at the moment.

Cheers

Offline

#50 2013-08-19 13:58:45

Rolinh
Member
From: Switzerland
Registered: 2011-05-07
Posts: 144
Website

Re: dfc: Display file system space usage using graph and colors

Hi guys,

I just released version 3.0.3 which mostly packs minor bug and security fixes. See the announcement for details.
Of course, the AUR package has been updated.

Cheers

Offline

Board footer

Powered by FluxBB