Active Topics

 



Notices


Reply
Thread Tools
SubCore's Avatar
Posts: 850 | Thanked: 626 times | Joined on Sep 2009 @ Vienna, Austria
#51
Originally Posted by kwotski View Post
Yeah, there's something kind of puzzling about the root fs. It's supposed to be < 256M, right?
j.s already said it, but here a link with a detailed explanation for this discrepancy:
http://www.linux-mtd.infradead.org/f...ml#L_df_report

"df" only reports the physically allocated memory and does not account for the compression that's taking place.
"du" however reports the actual size of the files, and not their compressed, physical size.
Thus, "du" will always report a higher usage than "df".
__________________
"What we perceive is not nature itself, but nature exposed to our method of questioning."
-- Werner Karl Heisenberg
 
Posts: 236 | Thanked: 223 times | Joined on Oct 2009 @ NE UK
#52
Thanks for the interesting link. Just one minor nitpick (I can't help myself )

Originally Posted by SubCore View Post
"du" however reports the actual size of the files
Well, kind of. du is supposed to report the disk allocation associated with the file. On an ext3 filesystem where the block size is 4k, even a 1 byte file will have a 4k block allocated to it, and du will show this.

On a compressed filesystem, this might be misleading because the "4k block" has only a virtual existence and doesn't reflect the actual disk usage associated with the file. At least as I understand it.

You can see this below. ls shows the file size (1 byte) whereas du shows (what it thinks is) the disk allocation..

~# echo > testfile
~# ls -l testfile
-rw-r--r-- 1 root root 1 Dec 22 12:18 testfile
~# du -h testfile
4.0k testfile
 

The Following 2 Users Say Thank You to kwotski For This Useful Post:
jukey's Avatar
Posts: 246 | Thanked: 204 times | Joined on Jun 2007 @ Potsdam (Germany)
#53
Hi,
thanks for the long list of non-optified applications. There is a list in the wiki where the applications should be added to track which are already optified for which are already exististing bug reports and so on:

http://wiki.maemo.org/Opt_Problem/Non-Optified_packages

For example fennec/firefox and vagalume are optified after reporting and a lot of other developers which are contacted are aware of the problem and will optify their packages.

Thank you,
Uwe
__________________
-> Join the SailfishOS Meetup Berlin - every first Monday a month <-

Me on twitter
 

The Following 2 Users Say Thank You to jukey For This Useful Post:
Posts: 118 | Thanked: 45 times | Joined on Dec 2009 @ Germany
#54
Originally Posted by SubCore View Post
"du" does NOT follow symbolic links, i just tested it.

btw, -P is the du-switch to deactivate symlinks, but it's not present on the tablet, and it's supposed to be default anyways.

what makes you say that du follows links? any hard evidence?
I confirm the "du" behavior.

What I did is:
I put the perl script on my device. I run it:
Code:
ssh root@mydevice
mentionedPerlScript.pl /var/lib/dpkg/info/*.md5sums > /home/user/apps/nonOptified.txt
Then I look at the output and get (for mc as an example):
Code:
mc : 4.00K	/usr/share/applications/hildon/mc.desktop
mc : 4.00K	/usr/share/icons/hicolor/64x64/apps/mc.png
mc : 68.00K	/usr/share/locale/az/LC_MESSAGES/mc.mo
mc : 68.00K	/usr/share/locale/be/LC_MESSAGES/mc.mo
mc : 80.00K	/usr/share/locale/bg/LC_MESSAGES/mc.mo
mc : 68.00K	/usr/share/locale/ca/LC_MESSAGES/mc.mo
mc : 72.00K	/usr/share/locale/cs/LC_MESSAGES/mc.mo
mc : 64.00K	/usr/share/locale/da/LC_MESSAGES/mc.mo
mc : 72.00K	/usr/share/locale/de/LC_MESSAGES/mc.mo
mc : 8.00K	/usr/share/locale/el/LC_MESSAGES/mc.mo
mc : 76.00K	/usr/share/locale/es/LC_MESSAGES/mc.mo
mc : 68.00K	/usr/share/locale/eu/LC_MESSAGES/mc.mo
mc : 20.00K	/usr/share/locale/fi/LC_MESSAGES/mc.mo
mc : 68.00K	/usr/share/locale/fr/LC_MESSAGES/mc.mo
mc : 76.00K	/usr/share/locale/hu/LC_MESSAGES/mc.mo
mc : 76.00K	/usr/share/locale/it/LC_MESSAGES/mc.mo
mc : 64.00K	/usr/share/locale/ja/LC_MESSAGES/mc.mo
mc : 64.00K	/usr/share/locale/ko/LC_MESSAGES/mc.mo
mc : 76.00K	/usr/share/locale/lt/LC_MESSAGES/mc.mo
mc : 64.00K	/usr/share/locale/lv/LC_MESSAGES/mc.mo
mc : 84.00K	/usr/share/locale/mn/LC_MESSAGES/mc.mo
mc : 72.00K	/usr/share/locale/nl/LC_MESSAGES/mc.mo
mc : 64.00K	/usr/share/locale/no/LC_MESSAGES/mc.mo
mc : 76.00K	/usr/share/locale/pl/LC_MESSAGES/mc.mo
mc : 68.00K	/usr/share/locale/pt/LC_MESSAGES/mc.mo
mc : 64.00K	/usr/share/locale/pt_BR/LC_MESSAGES/mc.mo
mc : 68.00K	/usr/share/locale/ro/LC_MESSAGES/mc.mo
mc : 76.00K	/usr/share/locale/ru/LC_MESSAGES/mc.mo
mc : 68.00K	/usr/share/locale/sk/LC_MESSAGES/mc.mo
mc : 68.00K	/usr/share/locale/sl/LC_MESSAGES/mc.mo
mc : 68.00K	/usr/share/locale/sr/LC_MESSAGES/mc.mo
mc : 68.00K	/usr/share/locale/sv/LC_MESSAGES/mc.mo
mc : 12.00K	/usr/share/locale/ta/LC_MESSAGES/mc.mo
mc : 64.00K	/usr/share/locale/tr/LC_MESSAGES/mc.mo
mc : 76.00K	/usr/share/locale/uk/LC_MESSAGES/mc.mo
mc : 80.00K	/usr/share/locale/vi/LC_MESSAGES/mc.mo
mc : 48.00K	/usr/share/locale/wa/LC_MESSAGES/mc.mo
mc : 60.00K	/usr/share/locale/zh_CN/LC_MESSAGES/mc.mo
mc : 56.00K	/usr/share/locale/zh_TW/LC_MESSAGES/mc.mo
mc : 8.00K	/usr/share/mc/extfs/README
mc : 4.00K	/usr/share/mc/extfs/bpp
mc : 12.00K	/usr/share/mc/extfs/rpm
mc : 12.00K	/usr/share/mc/extfs/trpm
mc : 4.00K	/usr/share/mc/extfs/u7z
mc : 4.00K	/usr/share/mc/extfs/a
mc : 12.00K	/usr/share/mc/extfs/apt
mc : 4.00K	/usr/share/mc/extfs/audio
mc : 8.00K	/usr/share/mc/extfs/deb
mc : 4.00K	/usr/share/mc/extfs/deba
mc : 12.00K	/usr/share/mc/extfs/debd
mc : 12.00K	/usr/share/mc/extfs/dpkg
mc : 4.00K	/usr/share/mc/extfs/iso9660
mc : 4.00K	/usr/share/mc/extfs/hp48
mc : 4.00K	/usr/share/mc/extfs/lslR
mc : 8.00K	/usr/share/mc/extfs/mailfs
mc : 12.00K	/usr/share/mc/extfs/patchfs
mc : 4.00K	/usr/share/mc/extfs/rpms
mc : 4.00K	/usr/share/mc/extfs/ualz
mc : 4.00K	/usr/share/mc/extfs/uar
mc : 4.00K	/usr/share/mc/extfs/uarj
mc : 4.00K	/usr/share/mc/extfs/uha
mc : 4.00K	/usr/share/mc/extfs/ulha
mc : 4.00K	/usr/share/mc/extfs/urar
mc : 16.00K	/usr/share/mc/extfs/uzip
mc : 4.00K	/usr/share/mc/extfs/uzoo
mc : 4.00K	/usr/share/mc/bin/mc.csh
mc : 4.00K	/usr/share/mc/bin/mc.sh
mc : 4.00K	/usr/share/mc/bin/mc-wrapper.csh
mc : 4.00K	/usr/share/mc/bin/mc-wrapper.sh
mc : 4.00K	/usr/share/mc/mc.hint
mc : 4.00K	/usr/share/mc/mc.hint.cs
mc : 4.00K	/usr/share/mc/mc.hint.es
mc : 4.00K	/usr/share/mc/mc.hint.hu
mc : 4.00K	/usr/share/mc/mc.hint.it
mc : 4.00K	/usr/share/mc/mc.hint.nl
mc : 4.00K	/usr/share/mc/mc.hint.pl
mc : 8.00K	/usr/share/mc/mc.hint.ru
mc : 8.00K	/usr/share/mc/mc.hint.sr
mc : 8.00K	/usr/share/mc/mc.hint.uk
mc : 4.00K	/usr/share/mc/mc.hint.zh
mc : 12.00K	/usr/share/mc/mc.menu.sr
mc : 160.00K	/usr/share/mc/mc.hlp.es
mc : 140.00K	/usr/share/mc/mc.hlp.hu
mc : 136.00K	/usr/share/mc/mc.hlp.it
mc : 156.00K	/usr/share/mc/mc.hlp.pl
mc : 284.00K	/usr/share/mc/mc.hlp.ru
mc : 240.00K	/usr/share/mc/mc.hlp.sr
mc : 128.00K	/usr/share/mc/mc.hlp
mc : 4.00K	/usr/share/mc/syntax/ada95.syntax
mc : 4.00K	/usr/share/mc/syntax/aspx.syntax
mc : 12.00K	/usr/share/mc/syntax/assembler.syntax
mc : 8.00K	/usr/share/mc/syntax/c.syntax
mc : 4.00K	/usr/share/mc/syntax/changelog.syntax
mc : 8.00K	/usr/share/mc/syntax/cs.syntax
mc : 20.00K	/usr/share/mc/syntax/css.syntax
mc : 20.00K	/usr/share/mc/syntax/d.syntax
mc : 4.00K	/usr/share/mc/syntax/diff.syntax
mc : 4.00K	/usr/share/mc/syntax/dos.syntax
mc : 4.00K	/usr/share/mc/syntax/eiffel.syntax
mc : 12.00K	/usr/share/mc/syntax/fortran.syntax
mc : 4.00K	/usr/share/mc/syntax/html.syntax
mc : 4.00K	/usr/share/mc/syntax/idl.syntax
mc : 4.00K	/usr/share/mc/syntax/java.syntax
mc : 8.00K	/usr/share/mc/syntax/js.syntax
mc : 12.00K	/usr/share/mc/syntax/latex.syntax
mc : 4.00K	/usr/share/mc/syntax/lisp.syntax
mc : 4.00K	/usr/share/mc/syntax/lsm.syntax
mc : 8.00K	/usr/share/mc/syntax/lua.syntax
mc : 4.00K	/usr/share/mc/syntax/m4.syntax
mc : 4.00K	/usr/share/mc/syntax/mail.syntax
mc : 4.00K	/usr/share/mc/syntax/makefile.syntax
mc : 8.00K	/usr/share/mc/syntax/ml.syntax
mc : 8.00K	/usr/share/mc/syntax/nroff.syntax
mc : 12.00K	/usr/share/mc/syntax/octave.syntax
mc : 12.00K	/usr/share/mc/syntax/pascal.syntax
mc : 12.00K	/usr/share/mc/syntax/perl.syntax
mc : 320.00K	/usr/share/mc/syntax/php.syntax
mc : 4.00K	/usr/share/mc/syntax/po.syntax
mc : 12.00K	/usr/share/mc/syntax/povray.syntax
mc : 12.00K	/usr/share/mc/syntax/python.syntax
mc : 8.00K	/usr/share/mc/syntax/ruby.syntax
mc : 12.00K	/usr/share/mc/syntax/sh.syntax
mc : 8.00K	/usr/share/mc/syntax/smalltalk.syntax
mc : 4.00K	/usr/share/mc/syntax/slang.syntax
mc : 8.00K	/usr/share/mc/syntax/spec.syntax
mc : 20.00K	/usr/share/mc/syntax/sql.syntax
mc : 8.00K	/usr/share/mc/syntax/swig.syntax
mc : 4.00K	/usr/share/mc/syntax/syntax.syntax
mc : 4.00K	/usr/share/mc/syntax/tcl.syntax
mc : 12.00K	/usr/share/mc/syntax/texinfo.syntax
mc : 4.00K	/usr/share/mc/syntax/unknown.syntax
mc : 4.00K	/usr/share/mc/syntax/xml.syntax
mc : 4.00K	/usr/share/doc-base/MC-FAQ
mc : 4.00K	/usr/share/menu/mc
mc : 0.00K	/usr/bin/mc
mc : 4.00K	/usr/bin/mcmfmt
mc : 4.00K	/usr/bin/mcview-debian
mc : 4.00K	/usr/bin/mcedit-debian
mc : 8.00K	/usr/libexec/mc/cons.saver
mc : total non-opt usage: 4.48M
Then I checked /usr/share/mc (which holds some 2xx kb files). So I did:
Code:
ls -l /usr/share/mc
lrwxrwxrwx    1 root     root           18 Dec 21 18:35 /usr/share/mc -> /home/usr/share/mc
Code:
df /usr/share
rootfs                  233224    147480     81460  64% /
Code:
df /usr/share/mc
/dev/mmcblk0p1        27871100    914160  25541160   3% /home
Code:
du -sch /home/usr/share/mc
2.1M    /home/usr/share/mc
Contrary to
Code:
l /usr/bin/mc
lrwxrwxrwx    1 root     root           16 Dec 21 19:46 /usr/bin/mc -> /home/usr/bin/mc
Code:
l -h /home/usr/bin/mc
-rwxr-xr-x    1 root     root       773.3k Oct 10 11:46 /home/usr/bin/mc
The linked file /usr/bin/mc is given with 0 size. But all files that are in a linked folder show up with a size (even though they are on a different file system). My expectation would be - that there are also shown as zero sized, because they are not on rootfs. So assume, there is something wrong?

Last edited by emesem; 2009-12-23 at 06:49.
 

The Following User Says Thank You to emesem For This Useful Post:
Posts: 236 | Thanked: 223 times | Joined on Oct 2009 @ NE UK
#55
Originally Posted by emesem View Post
I confirm the "du" behavior.
Yep, that's definitely a problem with the script. (du is behaving as expected, but the script doesn't take account of symlinked directories). I'll try and fix soon. In the meantime, anyone else.. please feel free
 
Posts: 236 | Thanked: 223 times | Joined on Oct 2009 @ NE UK
#56
Ok, here's an amended version of the script which tries to check for symlinked directories (by parsing the output of ls -l .. yuck!) ... recursively and with caching. May well be full of holes.. feedback welcome

I've put the extension as .txt to allow file-upload.

Edit: I've also updated the original script where first posted between [code] tags, above.
Attached Files
File Type: txt find_non_opt_files.txt (2.2 KB, 128 views)

Last edited by kwotski; 2009-12-23 at 11:10.
 

The Following User Says Thank You to kwotski For This Useful Post:
SubCore's Avatar
Posts: 850 | Thanked: 626 times | Joined on Sep 2009 @ Vienna, Austria
#57
Originally Posted by kwotski View Post
Ok, here's an amended version of the script which tries to check for symlinked directories (by parsing the output of ls -l .. yuck!) ... recursively and with caching. May well be full of holes.. feedback welcome
instead of parsing for "->", you can just use this file test function:
Code:
if -l $file
that's probably more reliable

i'll give your script a go a bit later when i have more time.
__________________
"What we perceive is not nature itself, but nature exposed to our method of questioning."
-- Werner Karl Heisenberg
 
Posts: 236 | Thanked: 223 times | Joined on Oct 2009 @ NE UK
#58
Originally Posted by SubCore View Post
instead of parsing for "->", you can just use this file test function:
Code:
if -l $file
that's probably more reliable
Actually, I do use that, but I need to find where it is linked to
 
SubCore's Avatar
Posts: 850 | Thanked: 626 times | Joined on Sep 2009 @ Vienna, Austria
#59
Originally Posted by kwotski View Post
Actually, I do use that, but I need to find where it is linked to
ah yes, i'm sorry, should've read your script more careful.

for parsing the target of a link, there's a dedicated command available: readlink

Code:
~ $ readlink /opt
/home/opt
__________________
"What we perceive is not nature itself, but nature exposed to our method of questioning."
-- Werner Karl Heisenberg
 

The Following User Says Thank You to SubCore For This Useful Post:
Posts: 118 | Thanked: 45 times | Joined on Dec 2009 @ Germany
#60
Thank you for the rework. Also thank you for the effort you invest (script size doubled).

Unfortunately I still see some issues (and I still did not learn perl ).

The mc package (which I moved away and linked it) seems to be handled correctly now. Thank you .

But now I just saw the following thing.

Report from the actual script version; from your original post (which I used):

Code:
adblock-plus-1.0 : 84.00K	/home/user/.mozilla/microb/adblockplus/patterns.ini
adblock-plus-1.0 : 4.00K	/home/user/.mozilla/microb/adblockplus/patterns-backup1.ini
adblock-plus-1.0 : 20.00K	/home/user/.mozilla/microb/extensions/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}/components/nsAdblockPlus.js
adblock-plus-1.0 : 1.31M	/home/user/.mozilla/microb/extensions/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}/chrome/adblockplus.jar
adblock-plus-1.0 : 4.00K	/home/user/.mozilla/microb/extensions/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}/install.js
adblock-plus-1.0 : 8.00K	/home/user/.mozilla/microb/extensions/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}/chrome.manifest
adblock-plus-1.0 : 4.00K	/home/user/.mozilla/microb/extensions/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}/install.rdf
adblock-plus-1.0 : 4.00K	/home/user/.mozilla/microb/extensions/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}/defaults/preferences/adblockplus.js
adblock-plus-1.0 : total non-opt usage: 1.43M
Code:
l /home/user/.mozilla/microb/extensions/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}/chrome/adblockplus.jar
-rw-r--r--    1 root     root      1367870 Oct 15 09:08 /home/user/.mozilla/microb/extensions/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}/chrome/adblockplus.jar
Code:
df /home/user/.mozilla/microb/extensions/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}/chrome/adblockplus.jar
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/mmcblk0p1        27871100    989128  25466192   4% /home
So I guess there are more filesystem checks needed. Because for me it looks like the addblock-plus reported by the script are not on rootfs. For me "optified" means more "not on rootfs" than in a specific directory. Maybe thats where my problem comes from ^^.

But I would tend to say adblock-plus-1.0 is optified, though it is not in /opt.

Sorry for that trouble .
 
Reply


 
Forum Jump


All times are GMT. The time now is 16:29.