Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 17 Oct 2019, 16:45
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » System
freememapplet_tray v2.8.6 and v2.8.6f - includes source
Post new topic   Reply to topic View previous topic :: View next topic
Page 5 of 5 [69 Posts]   Goto page: Previous 1, 2, 3, 4, 5
Author Message
MochiMoppel


Joined: 26 Jan 2011
Posts: 1921
Location: Japan

PostPosted: Mon 21 Sep 2015, 03:20    Post subject:  

Thank you! I changed the .svg files into symlinks to the old .xpm icons. Even easier: Renaming the .xpm files and letting them masquerade as .svg files. I'm probably breaking some rules here, but I enjoy it Laughing
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1638
Location: Brisbane, Australia

PostPosted: Tue 22 Sep 2015, 05:49    Post subject:  

01micko wrote:
If you don't mind, I'd like to make a post in the translations section so we can get some .po files for different languages, or you can do it if you like.
You're welcome to take it and do what you want with it. I'm quite happy to say that I've done all I came to do with freememapplet_tray.

gyro
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1638
Location: Brisbane, Australia

PostPosted: Tue 22 Sep 2015, 10:23    Post subject: Are we showing the correct number?  

I've just done a little digging into why partview and freememapplet_tray give such different numbers?
The simple answer is, they use different numbers.

Let me explain:
1) Firstly lets put aside the difference between GB 1000*1000*1000 and GiB 1024*1024*1024, since they both actually use GiB.
2) But which numbers should be used?
There are 2 numbers available for the size, the total size of the partition as seen by probepart, and the size as seen by the filesystem.
There are 2 numbers to use for the free space, the actual number of free blocks or the number available to an unprivileged user.

An example:
I have a 293GiB (approx) ext4 partition.
probepart sees it as 292.97GiB
statfs sees it as 288.25GiB
df shows it as 289G
ROX shows it as 289G
PCManFM shows it as 288.2GiB
partview shows it as 293.0G
freememapplet_tray would show it as 288GiB

statfs says it has 276.53GiB free, and 261.87GiB available
df shows 12G used and 262G available
ROX shows 262G free
PCManFM shows 261.9GiB free
partview shows 281.2 free
freememapplet_tray would show 261GiB

Part of the confusion comes from the difference between "free" and "available". "free" means exactly that, but "available" means the amount of space available to an unprivileged user.
Some file systems reserve some space for use by the OS, so not all the "free" space is available to an unprivileged user.
It's not surprising that the file managers show the "available" number as being free.
df shows "Used" as ("1K-blocks" - "free"), and "Available" as available. That is why ("1K-blocks" - "Used") is larger than "Available".
partview gets a unique "free" number because it subtracts the "Used" number from df from the size number from probepart. Unfortunately I therefore suspect that this number's accuracy is suspect.

So which "size" number should we use?
Which "free" number should we use?

Notes:
It's not difficult to change partview to get any of the numbers by using more of the numbers from df.
Its easy to get frememapplet_tray to use the "free" number instead of the "available" number.
The larger "size" number is not available to freememapplet_tray at the moment.

Ideas??

gyro
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1638
Location: Brisbane, Australia

PostPosted: Wed 23 Sep 2015, 00:03    Post subject:  

The following is a patch to change freememapplet_tray.c to get it to use "free" instead of "available":
Code:
--- freememapplet_tray.orig.c   2015-09-19 09:59:26.448279855 +1000
+++ freememapplet_tray.c   2015-09-23 13:52:11.218923080 +1000
@@ -66,7 +66,7 @@
    {
       sizetotal = vfs.f_blocks;
       sizetotal = (sizetotal * vfs.f_bsize) / 1048576;
-      sizefree = vfs.f_bavail;
+      sizefree = vfs.f_bfree;
       sizefree = (sizefree * vfs.f_bsize) / 1048576;
    }
    else
It's a fairly trivial change to the source.

gyro
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1638
Location: Brisbane, Australia

PostPosted: Thu 24 Sep 2015, 00:09    Post subject: Version 2.8.6f  

I have released and alternate version freememapplet-2.8.6f.tar.gz.
The only difference is that the patch from my previous post has been applied. From all the information returned by "statfs", it uses the "free" number instead of the "avail" number.
So if you've applied the patch to version 2.8.6, then there's no point in downloading this one.

Please see first post for download.

gyro
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 3067

PostPosted: Thu 24 Sep 2015, 00:40    Post subject: Re: Are we showing the correct number?  

gyro wrote:

It's not difficult to change partview to get any of the numbers by using more of the numbers from df.
Its easy to get frememapplet_tray to use the "free" number instead of the "available" number.
The larger "size" number is not available to freememapplet_tray at the moment.

Ideas??

I would think that status quo is fine, in the sense that partview is more of a "hardware checking" app and the rest "user information" apps. So would be OK for partview to show "actual" and the rest "usable". Though a little note may be needed in the partview UI to clarify that.

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1638
Location: Brisbane, Australia

PostPosted: Thu 24 Sep 2015, 01:09    Post subject: Re: Are we showing the correct number?  

mavrothal wrote:
I would think that status quo is fine
If you mean the current "partview" then I would have to disagree.
The "free" number that current "partview" provides seems to be a figment of it's imagination. It should show either the real "free" or the real "available".

Does the "avail" number represent usable space when running as root?
The doco states that this number relates to a non-privileged user.

gyro
Back to top
View user's profile Send private message 
ASRI éducation


Joined: 09 May 2009
Posts: 3203
Location: France

PostPosted: Sun 11 Oct 2015, 10:41    Post subject: Re: freememapplet_tray v2.8.6 and v2.8.6f - includes source
Subject description: Two versions, one shows "avail" the other "free"
 

gyro wrote:
freememapplet-2.8.6f.tar.gz

Compiled with Puppy Precise 571-woofce.
All seems ok.
Regards,

_________________
Projet ASRI éducation => Association | Forum | Dépôt | Espace kids
Back to top
View user's profile Send private message Visit poster's website 
gyro

Joined: 28 Oct 2008
Posts: 1638
Location: Brisbane, Australia

PostPosted: Sun 11 Oct 2015, 12:23    Post subject:  

@ASRI éducation,
Thanks.
gyro
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 5 of 5 [69 Posts]   Goto page: Previous 1, 2, 3, 4, 5
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » System
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0681s ][ Queries: 13 (0.0230s) ][ GZIP on ]