maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Help You. Identify the non-optified apps. (https://talk.maemo.org/showthread.php?t=37629)

Corso85 2009-12-18 07:15

Help You. Identify the non-optified apps. (N900)
 
Dear All,

I'm currently at 97% of my root partition with 8mb left free. On My N900.

Here is the list of apps I have installed at the moment:

Note: Using the Perl Script, I've Added the non-opt space usage
Red is unusually high

mauku - 300K
countdown-home -
wormux - 16K (that was a surprise)
vpnc-gui - 76K
scummvm - 7.58MB (!!)
load-applet - 48K
ioquake3 - 2.7MB
sopwith - 8K
ukeyboard - 140K
pidgin - 2.91MB (hmm)
panucci - 12K
bounce - 20K (nice)
pygtkeditor - 76K
drnoksnes - 24K
vor - 12K
gonvert - 244K
vpnc - 4K
systeminfowidget - 16K
liqtorch - 44K
omweather - 24k
rdesktop - 188K
dosbox - 2.22MB (hmm)
wifiinfo - 584K
dtg - 200k
mbarcode - 128K
crimson - 16k
transmission - 20K
braek - 44K
zoutube - 8K
simple-fmtx-widget - 8K
stopwatch-home - 52K
gpodder - 16K
personal-gprs-mon - 44K
vncviewer - 124K
stockthis - 28K
maelstrom - 16K
personal-ip-address - 32K
mg - 304K
mirror - 76K
simple-brightness-applet - 16K
ati85 - 216K
tennix - 8K
xchat - 664K
unzip - 328K

enigma - 3.57MB
fmradio - 12K
madbomber - 8K
petrovich - 24K
recorder - 160K
mastory - 28K
liqflow - 56K
copernicium - 24K

Questions:
1. Which do you think are the major space eaters?
2. I'm eagerly awaiting the Apps in the Ovi Store, will I still be able to install them with my current free space condition?

Thank You. I apologize if this thread caused any redundancy.

fatalsaint 2009-12-18 07:24

Re: Help You. Identify the non-optified apps.
 
Here's a debian command to sort all your applications by size...

Code:

dpkg-query --show --showformat='${Package;-50}\t${Installed-Size}\n' | sort -k2 -n
Found here. (may need to pipe it through less).

This won't show you which ones are optified or not, but on the big ones you can check where they install to with dpkg -L <package name>. If my understanding of the n900 is right, if it installs anywhere but the /opt directory then there's something wrong.

Sasler 2009-12-18 07:24

Re: Help You. Identify the non-optified apps.
 
ScummVM took quite a bit of space from root in my device, if I remember correctly.

onutz 2009-12-18 08:24

Re: Help You. Identify the non-optified apps.
 
U can also try DiskUsage, it'll show you your root space as a pie and each folder in a graphic part of the pie

Corso85 2009-12-18 09:18

Re: Help You. Identify the non-optified apps.
 
Quote:

Originally Posted by onutz (Post 433062)
U can also try DiskUsage, it'll show you your root space as a pie and each folder in a graphic part of the pie

Ironically, that's only available in extras-devel, lool :p

dantonic 2009-12-18 09:29

Re: Help You. Identify the non-optified apps.
 
This is quite an issue....
Most of what I've installed from extras also has taken up a decent amount of space in the root partition. I'm only at 76%, but I may not have installed much...

I have the following installed:

not quite sure if ALL of these are from extras, but most of them should be.
TI85
petrovic
Mirror
Bounce
Omweather
maemorecorder
VNC viewer
Conboy
ForecaWeather
zoutube
Xournal
office doc viewer suite
Hermes

I know these are from testing/devel
Dialcentral
Xchat

either way everytime I've installed something I've checked before and after installation, and rootfs definitely gets filled a bit each time...

Corwin 2009-12-18 09:29

Re: Help You. Identify the non-optified apps.
 
MPlayer takes between 10 and 20 MB Rootfs space...

aspidites 2009-12-18 09:45

Re: Help You. Identify the non-optified apps.
 
Quote:

Originally Posted by fatalsaint (Post 433009)
Here's a debian command to sort all your applications by size...

Code:

dpkg-query --show --showformat='${Package;-50}\t${Installed-Size}\n' | sort -k2 -n
Found here. (may need to pipe it through less).

Unless I've missed something, less isn't on the N900. Can pipe it through 'more' though.

Corso85 2009-12-18 09:45

Re: Help You. Identify the non-optified apps.
 
Maybe someone could explain it to me. why is it that the root was limited to 200ish, mb? was it a choice?

I mean the whole optification issue would have not been much of an issue if root was given a couple of gbs. There is like 32 on there :p

Just a matter of pushing neatness in packaging?

I'm not upset in anyway. It's fine. I just wanna enlighten myself :)

twaelti 2009-12-18 10:02

Re: Help You. Identify the non-optified apps.
 
root is on a special onboard memory chip with a size of 256 MB.
optification would not even be needed if we as devs had followed the standards, which basically say:
"This directory is reserved for all the software and add-on packages that are not part of the default installation" and "Under no circumstances are other package files to exist outside the /opt, /var/opt, and /etc/opt hierarchies except for those package files that must reside in specific locations within the filesystem tree in order to function properly"
There is also a Wiki entry. But a bit too complicated.

Rob1n 2009-12-18 10:02

Re: Help You. Identify the non-optified apps.
 
Root is on a separate 256M high-speed flash chip. I've heard that this was the largest available (integrated with the processor) at the time.

Corso85 2009-12-18 10:04

Re: Help You. Identify the non-optified apps.
 
Ah. that makes sense. it's like flash0 and flash1 on the PSP.

I see. This chip also gets flashed when one uses the Flashing Tool for the n900?

Rob1n 2009-12-18 10:09

Re: Help You. Identify the non-optified apps.
 
If you just flash the main firmware, this is the only chip that gets flashed. The eMMC firmware will flash the 32GB built-in storage (but should rarely be needed).

Corso85 2009-12-18 10:17

Re: Help You. Identify the non-optified apps.
 
Hmm. can the rootfs somehow be mounted when pluggin the n900 to a pc? from what I saw. It seems only MyDocs appears in mass storage mode.....

It'll make going through the files on it easier. instead of the terminal.

Rob1n 2009-12-18 10:47

Re: Help You. Identify the non-optified apps.
 
Nope - mass storage mode requires unmounting the filesystem (as it's exported at a low level). This obviously can't be done with the rootfs.

SubCore 2009-12-18 10:51

Re: Help You. Identify the non-optified apps.
 
Quote:

Originally Posted by Corso85 (Post 433162)
Hmm. can the rootfs somehow be mounted when pluggin the n900 to a pc?

yes that's possible, using sshfs.

sierrafoxtrot 2009-12-18 12:15

Re: Help You. Identify the non-optified apps.
 
another noob question in regards to this, after deleting apps, the rootfs space does not seem to be recovered, even after a reboot. i had installed mplayer (19.4M). rootfs usage was 189M used , according to diskusage

then i used this cmd

dpkg-query --show --showformat='${Package;-50}\t${Installed-Size}\n' | sort -k2 -n

and it was shown at the bottom of the list (sorted by size)

i uninstalled it, rebooted and diskusage still showed 189M used. running the above commandline once again showed it was still there.

dpkg -L mplayer

returned that package mplayer does not contain any files?!

so, my question; how do you purge installed files sitting on rootfs?

mikkov 2009-12-18 12:41

Re: Help You. Identify the non-optified apps.
 
Quote:

Originally Posted by sierrafoxtrot (Post 433258)
another noob question in regards to this, after deleting apps, the rootfs space does not seem to be recovered, even after a reboot. i had installed mplayer (19.4M). rootfs usage was 189M used , according to diskusage

then i used this cmd

dpkg-query --show --showformat='${Package;-50}\t${Installed-Size}\n' | sort -k2 -n

and it was shown at the bottom of the list (sorted by size)

i uninstalled it, rebooted and diskusage still showed 189M used. running the above commandline once again showed it was still there.

dpkg -L mplayer

returned that package mplayer does not contain any files?!

so, my question; how do you purge installed files sitting on rootfs?

Copy&paste output of these commands:
dpkg -l mplayer
ls -l /usr/bin/mplayer

bunanson 2009-12-18 13:20

Re: Help You. Identify the non-optified apps. (N900)
 
Quote:

Originally Posted by Corso85 (Post 432997)
...
mauku
countdown-home
wormux
vpnc-gui
scummvm
omweather-weather-com-stations-db
load-applet
touchsearch
ioquake3
sopwith
ukeyboard
amazon-installer
burgerspace
pidgin
panucci
bounce
pygtkeditor
drnoksnes
vor
uqm
gonvert
vpnc
systeminfowidget
milkyway-wallpaper
ogg-support
liqtorch
omweather
rdesktop
facebook-services
dosbox
ap-installer
wifiinfo
kmplayer
dtg
mbarcode
crimson
transmission
braek
lighttpd
zoutube
simple-fmtx-widget
midori
wiicontrol
rootsh
stopwatch-home
gpodder
personal-gprs-mon
vncviewer
microfeed
account-plugin-butterfly
stockthis
mp-fremantle-003-pr
maelstrom
thai-ttf
personal-ip-address
leafpad
mg
mirror
simple-brightness-applet
mplayer
foreca-installer
ati85
tennix
dtg-installer
xchat
unzip
pidgin-maemo-docklet
decoders-support
enigma
conversations-inbox-widget
fmradio
madbomber
facebook-installer
libzeemote-conf
petrovich
recorder
mastory
liqflow
copernicium
...

Can I take it as the above ALL installed and run? If not, mind to share the details? TIA,

bun

kwotski 2009-12-18 13:35

Re: Help You. Identify the non-optified apps.
 
Just for fun, I've knocked together a quick perl script that can find the non-optified disk usage for a given package:

Code:

#!/usr/bin/perl

%known_optified = ();
%known_nonoptified = ();

sub is_secretly_optified($) {
  my ($file) = @_;

  # print "testing $file\n";

  if($known_optified{$file}) {
    # print "known optfified $file\n";
    return 1;
  }

  if($known_nonoptified{$file}) {
    # print "known nonoptfified $file\n";
    return 0;
  }

  unless($file) {
    return 0;
  }
  my $orig = $file;

  unless( -l $file) {
    $file =~ s/\/[^\/]*$//;
    if(is_secretly_optified($file)) {
      $known_optified{$orig} = 1;
      return 1;
    } else {
      $known_nonoptified{$orig} = 1;
      return 0;
    }
  }

  my $lsresult = `/bin/ls -l $file`;
  chomp($lsresult);

  if($lsresult =~ /->\s+(.*)/) {
    my $target = $1;
    # print "found symlink to $target\n";
    if($target =~ /^\/opt/ or $target =~ /^\/home/) {
      # print "remembering $target is optified?\n";
      # print "remembering $orig is optified?\n";
      $known_optified{$orig} = 1;
      return 1;
    } else {
      if(is_secretly_optified($target)) {
        $known_optified{$orig} = 1;
        return 1;
      } else {
        $known_nonoptified{$orig} = 1;
        return 0;
      }
    }
  }
}

while(<>) {
  unless($currentfile eq $ARGV) {
    $currentfile = $ARGV;
    if($out) {
      if($total >= 1024) {
        $total = sprintf("%0.2fM", $total / 1024);
      } else {
        $total = sprintf("%0.2fK", $total);
      }
      print "$out$currentpkg : total non-opt usage: "
            . "$total\n----------\n";
    }
    $out = undef;
    $total = undef;
    $currentfile = $ARGV;

    $currentpkg = $currentfile;
    $currentpkg =~ s/\.md5sums//;
    $currentpkg =~ s/.*\///;
  }

  s/^\S+\s+//;
  $suspect = "/$_";

  $du = undef;
  unless(/^opt/ or /^home/ or /^usr\/share\/(man|doc)\//) {
    next if(is_secretly_optified($suspect));
    $du = `du -s $suspect`;
    chomp $du;
    if($du =~ /^(\d+)/) {
      $total += $1;
      if($1 >= 1024) {
        $val  = sprintf("%0.2fM", $1 / 1024);
      } else {
        $val  = sprintf("%0.2fK", $1);
      }

      $du =~ s/^\d+/$val/;
    }
    $out .= "$currentpkg : $du\n";
  }
}


if($out) {
  if($total >= 1024) {
    $total = sprintf("%0.2fM", $total / 1024);
  } else {
    $total = sprintf("%0.2fK", $total);
  }
  print "$out$currentpkg : total non-opt usage: "
        . "$total\n---------\n";
}

If you save it as /usr/local/bin/find_non_opt_files.pl, you can run it giving /var/lib/dpkg/info/<pkgname>.md5sums as an argument. Here is the commandline and output running it on a sample package:

Quote:

~# /usr/local/bin/find_non_opt_files.pl /var/lib/dpkg/info/burgerspace.md5sums
burgerspace : 4.00K /usr/share/pixmaps/burgerspace.xpm
burgerspace : 4.00K /usr/share/applications/hildon/burgerspace.desktop
burgerspace : 8.00K /usr/share/icons/hicolor/scalable/hildon/burgerspace.png
burgerspace : 4.00K /usr/share/icons/hicolor/48x48/hildon/burgerspace.png
burgerspace : 4.00K /usr/share/icons/hicolor/32x32/hildon/burgerspace.png
burgerspace : 4.00K /usr/share/menu/burgerspace
burgerspace : total non-opt usage: 28.00K
-------------------------------------------------------

It will also take multiple arguments, so to see the results for all packages:

Code:

/usr/local/bin/find_non_opt_files.pl /var/lib/dpkg/info/*.md5sums
which will produce a lot of output, including about system packages..

Edit: Just to add, this hasn't been security audited, so if you should have a line like "1234 asdf;rm -rf /" in one of your *.md5sums, or other similar problems, you're on your own!

Further Edit: Script amended to take account of symlinked directories as per posts around http://talk.maemo.org/showthread.php...655#post438655

One more edit: don't count files in /home as non-optified

benny1967 2009-12-18 14:09

Re: Help You. Identify the non-optified apps.
 
Quote:

Originally Posted by kwotski (Post 433336)
Just for fun, I've knocked together a quick perl script that can find the non-optified disk usage for a given package:

added a link to your post to this article in the wiki:
http://wiki.maemo.org/Help_testing_s...r_Optification

(last but one paragraph in the section)

Linking seemed appropriate as it preserves context and credits ;)

rusti 2009-12-18 14:30

Re: Help You. Identify the non-optified apps.
 
Alternative way to check optification. Doesn't calculate depencies though.
Note that this must be done in /home/user
If you do it in MyDocs (or elsewhere) it gives you wrong calculations due to vfat.

Code:

1.      cp <deb> /home/user/
2.      cd /home/user/
3.      mkdir tmp
4.      dpkg -x ./<deb> tmp
5.      cd tmp
6.      du -sh usr
7.      du -sh opt


Corso85 2009-12-18 17:26

Re: Help You. Identify the non-optified apps. (N900)
 
Quote:

Originally Posted by bunanson (Post 433318)
Can I take it as the above ALL installed and run? If not, mind to share the details? TIA,

bun

Yes. all the mentioned apps are currently installed on my n900.
Note that if an app on the list has recently moved to extras. i would have uninstalled and put in the extras version.

meaning that 80% of the apps are from extras. yet my root was exhasuted.........

Bundyo 2009-12-19 08:50

Re: Help You. Identify the non-optified apps.
 
MPlayer is optified now, so it shouldn't take much space in root.

Corso85 2009-12-19 17:37

Re: Help You. Identify the non-optified apps.
 
I took off mplayer, kmplayer, all the built-in installers (AB, Amazon....), Un-Quan something game, leafpad, lighttpd and the countdown widget,

now i have 28mb left in rootfs. not bad for now.

Croc 2009-12-19 18:37

Re: Help You. Identify the non-optified apps.
 
maybe we should make a thread with application list and size taken on rootfs and have it sticked with first post being updated by thread starter (whoever got time to take care of such task)
then people could post replys with
Software name:
Version:
Space Used on rootfs:


i myself didn't know much about this issue till i looked at few threads over last couple of days so i got nothing to report but from now before i isntall anything i will check rootfs usage before installation and after installation do the maths and make a note.

fatalsaint 2009-12-19 20:55

Re: Help You. Identify the non-optified apps.
 
That would be a bit painful to maintain... but definitely could be useful.

vdx29 2009-12-19 22:45

Re: Help You. Identify the non-optified apps.
 
Quote:

Code:

/usr/local/bin/find_non_opt_files.pl /var/lib/dpkg/info/*.md5sums

I'm trying to run this script. But I keep getting "-sh: /usr/local/bin/find_non_opt_files.pl: Permission denied"?

Any ideas? Am a *nix noob.

kwotski 2009-12-19 22:53

Re: Help You. Identify the non-optified apps.
 
Do

chmod +x /usr/local/bin/find_non_opt_files.pl

Sorry, should have mentioned that.

Don't run the script as root, just to be on the safe side :)

vdx29 2009-12-19 22:57

Re: Help You. Identify the non-optified apps.
 
Quote:

Originally Posted by kwotski (Post 434879)
Do

chmod +x /usr/local/bin/find_non_opt_files.pl

Sorry, should have mentioned that.

Don't run the script as root, just to be on the safe side :)

Thanks! Works great now.

Corwin 2009-12-20 00:00

Re: Help You. Identify the non-optified apps.
 
Quote:

Originally Posted by sierrafoxtrot (Post 433258)
another noob question in regards to this, after deleting apps, the rootfs space does not seem to be recovered, even after a reboot. i had installed mplayer (19.4M). rootfs usage was 189M used , according to diskusage

then i used this cmd

dpkg-query --show --showformat='${Package;-50}\t${Installed-Size}\n' | sort -k2 -n

and it was shown at the bottom of the list (sorted by size)

i uninstalled it, rebooted and diskusage still showed 189M used. running the above commandline once again showed it was still there.

dpkg -L mplayer

returned that package mplayer does not contain any files?!

so, my question; how do you purge installed files sitting on rootfs?

I expierenced the same but never found a solution for it. First installed the (not optified) SVN2 or 3, then the optified version SVN4. Still did not regain the space, though :(

vdx29 2009-12-20 00:21

Re: Help You. Identify the non-optified apps.
 
Yikes!
From kwotski's script, my apps have 323MB non opt usage. Conky shows I'm using 210MB of my rootfs. Does this mean the remaining 113MB of files are outside rootfs? If so, where? And more importantly, does it matter?

Sorry if these sound like a dumb questions. As you can tell my rootfs is almost full and I'm thinking of formatting/flashing/restoring the N900 to default settings. So I'm trying to figure out were I went wrong and what to avoid next time.

kwotski 2009-12-20 01:28

Re: Help You. Identify the non-optified apps.
 
Yeah, there's something kind of puzzling about the root fs. It's supposed to be < 256M, right? And yet:

Quote:

~# du -shx /
320.1M
~# df
Filesystem 1k-blocks Used Available Use% Mounted on
rootfs 233224 175272 53672 77% /
ubi0:rootfs 233224 175272 53672 77% /
tmpfs 1024 72 952 7% /tmp
tmpfs 256 72 184 28% /var/run
none 10240 80 10160 1% /dev
tmpfs 65536 4 65532 0% /dev/shm
/dev/mmcblk0p2 2064208 277968 1681384 14% /home
/dev/mmcblk0p1 28312128 1989760 26322368 7% /home/user/MyDocs
/dev/mmcblk1p1 15549952 256 15549696 0% /media/mmc1
Probably something clever going on somewhere... :) I'd like to know myself!

j.s 2009-12-20 01:58

Re: Help You. Identify the non-optified apps.
 
Quote:

Originally Posted by kwotski (Post 434974)
Yeah, there's something kind of puzzling about the root fs. It's supposed to be < 256M, right? And yet:

Probably something clever going on somewhere... :) I'd like to know myself!

It is a compressed file system. Part of why it might not be always faster than the 32GB internal flash drive.

Corso85 2009-12-20 14:24

Re: Help You. Identify the non-optified apps.
 
Ok. I'm going to run the Perl Script on most of my suspicious programs..........

I'll add the results to the first post.

so far, not one used more than 8mb. where did my space go?
:rolleyes:

Maybe if i sum them up.....

roamerjiang 2009-12-20 16:49

Re: Help You. Identify the non-optified apps.
 
Quote:

Originally Posted by mikkov (Post 433285)
Copy&paste output of these commands:
dpkg -l mplayer
ls -l /usr/bin/mplayer

i also have this problem, the output from my device is

~ $ dpkg -l mplayer
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
rc mplayer 1.0svn4 The Ultimate Movie Player port for N900
~ $ ls -l /usr/bin/mplayer
ls: /usr/bin/mplayer: No such file or directory
~ $

roamerjiang 2009-12-20 16:51

Re: Help You. Identify the non-optified apps.
 
this is also what exactly happened when i uninstall fbreader :(

mikkov 2009-12-20 16:55

Re: Help You. Identify the non-optified apps.
 
Quote:

Originally Posted by roamerjiang (Post 435414)
i also have this problem, the output from my device is

~ $ dpkg -l mplayer
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
rc mplayer 1.0svn4 The Ultimate Movie Player port for N900
~ $ ls -l /usr/bin/mplayer
ls: /usr/bin/mplayer: No such file or directory
~ $

If the problem was that you were thinking that mplayer wasn't properly uninstalled, your message shows that mplayer is properly uninstalled.

roamerjiang 2009-12-20 17:04

Re: Help You. Identify the non-optified apps.
 
i just reinstalled the mplayer, and then uninstalled it again from application manager, but result is still the same. any suggestion that i can uninstall it properly? thank you very much because my fbreader also get same problem :(

roamerjiang 2009-12-20 17:05

Re: Help You. Identify the non-optified apps.
 
or any way i can delete those files manually?


All times are GMT. The time now is 12:45.

vBulletin® Version 3.8.8