Poll

When your Zaurus first boots up (on normal use), how much memory are you using?  (type "free" in the Terminal)

I don't know
0 (0%)
0-10 MB
2 (14.3%)
10-20 MB
6 (42.9%)
20-30 MB
4 (28.6%)
30-40 MB
2 (14.3%)
Over 40 MB
0 (0%)
N/A.  I don't own a Zaurus
0 (0%)

Total Members Voted: 4

Author Topic: TaskManager in Linux? Freeing up memory and reducing...  (Read 7286 times)

TonyOlsen

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
    • http://www.userdimensions.com/Tony/Resume.html
TaskManager in Linux? Freeing up memory and reducing...
« on: May 11, 2004, 05:43:31 pm »
Is there a linux command to get a list of threads, their CPU consumption, and Memory usage?  How can you kill those individual threads?  (Wasn\'t it \"kill ...\"?)

Also, I\'ve heard people talk about setting up the programs to not load quickly, or something like that.  Appearantly some programs load into memory at boot time and just stay there so that they can load quickly when needed.  How do I turn this off?

How else can I minimize the amount of memory used during idle times?  (I have a Zaurus SL-C860 and it is using about 30 MB during idle... I suspect that can be greatly optimized).

Also... is it possible for Linux to run out of memory when there is still room in the Swap File (on my CF card)?  Are there ways around this?

How optimized is Linux with memory usage?

Thanks in advance, =)
Tony Olsen
Ferris@Myself.Com
Resume
Zaurus SL-C860 QTopia
2 GB Static CF
1 GB MMC (although it isn't working yet)
My Quest: To get an x86 emulator working on my Zaurus and to have my Zaurus replace my laptop as my MAIN computer
Publically available Videos for the default Zaurus SL-C860 video player

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
TaskManager in Linux? Freeing up memory and reducing...
« Reply #1 on: May 11, 2004, 06:42:43 pm »
Quote
Is there a linux command to get a list of threads, their CPU consumption, and Memory usage?


\'ps\' with various switches - look on google for the full list.
\'top\'

Quote
How can you kill those individual threads? (Wasn\'t it \"kill ...\"?)


kill -9 <pid>
killall -9 <processname>

Quote
Also, I\'ve heard people talk about setting up the programs to not load quickly, or something like that. Appearantly some programs load into memory at boot time and just stay there so that they can load quickly when needed. How do I turn this off?


Quickload keeps the process in memory (with files already open) so it seems to start quickly. Try holding down the stylus on the various icons until you get a pop-up menu - on this menu there will be a checkbox etc.

Quote
How else can I minimize the amount of memory used during idle times? (I have a Zaurus SL-C860 and it is using about 30 MB during idle... I suspect that can be greatly optimized).


Why do you care? During idle time you don\'t need the memory.

Note that cache memory is actually free memory which Linux is using to do something useful (cache recently used programs etc. - try a google for better info). It will be freed immediately if it is required by another app.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

TonyOlsen

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
    • http://www.userdimensions.com/Tony/Resume.html
TaskManager in Linux? Freeing up memory and reducing...
« Reply #2 on: May 11, 2004, 06:49:41 pm »
Thanks.

Quote
Why do you care? During idle time you don\'t need the memory.


I suspect my problems with Stratagus (WarCraft2) are caused by memory issues.  I suspect it demands memory faster than the Zaurus can free it up.  I want to try running Stratagus with as much memory freed up as possible and see if it still crashes.
Tony Olsen
Ferris@Myself.Com
Resume
Zaurus SL-C860 QTopia
2 GB Static CF
1 GB MMC (although it isn't working yet)
My Quest: To get an x86 emulator working on my Zaurus and to have my Zaurus replace my laptop as my MAIN computer
Publically available Videos for the default Zaurus SL-C860 video player

Tehas

  • Full Member
  • ***
  • Posts: 157
    • View Profile
    • http://users.adelphia.net/~stonerrl/rick/
TaskManager in Linux? Freeing up memory and reducing...
« Reply #3 on: May 11, 2004, 09:55:00 pm »
There is also a package called Process Manager that allows you to see a the processes running and you can sort the list various ways.  You can also killl a procss from the GUI.

As far as Fast Load - I think that only the Sharp PIM apps support it so don\'t waste your time checking all the icons.
+SL-5600 v1.32 ROM (Special pre-emptive kernel with overclock)  +Viking 256CF  +SimpleTech 256CF  +Viking 128SD (as ext2)  +AmbiCom WL1100C +Micro Innovations KB  +Hawking Ethernet CF  
+SL6000L +Lexar 1GB SD (as ext2)  +Windows 98/Me/Nt/XP  +Mandrake 8.1 My Zaurus Page[img]http://users.adelphia.net/~stonerrl/rick/rls_userbar.gif\" border=\"0\" class=\"linked-sig-image\" /]

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
TaskManager in Linux? Freeing up memory and reducing...
« Reply #4 on: May 12, 2004, 05:26:51 am »
Quote
I suspect it demands memory faster than the Zaurus can free it up.


I doubt this. I think memory allocation is a blocking call to the kernel so the kernel can take as long as it needs (admittedly if there were another thread waiting for that one, with a time out, etc......), plus freeing cache memory is a quick process AFAIK.

More likely your game is requesting more memory than is available or something like that.

Can you get console output from Stratagus, or a log file etc.?


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

TonyOlsen

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
    • http://www.userdimensions.com/Tony/Resume.html
TaskManager in Linux? Freeing up memory and reducing...
« Reply #5 on: May 12, 2004, 09:32:55 am »
There aren\'t any errors displayed in Stratagus... it simply freezes up the entire Zaurus.  I\'m using Zaurus SL-C860 64 MB RAM + 128 MB SwapFile (on my CF Card).

See here for more information on my problems with Stratagus, including screen shots (with digital camera) of the last moments before freezing, on this thread:

http://www.zaurususergroup.com/index.php?n...atagus&start=75
Tony Olsen
Ferris@Myself.Com
Resume
Zaurus SL-C860 QTopia
2 GB Static CF
1 GB MMC (although it isn't working yet)
My Quest: To get an x86 emulator working on my Zaurus and to have my Zaurus replace my laptop as my MAIN computer
Publically available Videos for the default Zaurus SL-C860 video player

TonyOlsen

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
    • http://www.userdimensions.com/Tony/Resume.html
TaskManager in Linux? Freeing up memory and reducing...
« Reply #6 on: May 12, 2004, 09:34:55 am »
Quote
(admittedly if there were another thread waiting for that one, with a time out, etc......),


Maybe stratagus doesn\'t handle the memory request timeout correctly?
Tony Olsen
Ferris@Myself.Com
Resume
Zaurus SL-C860 QTopia
2 GB Static CF
1 GB MMC (although it isn't working yet)
My Quest: To get an x86 emulator working on my Zaurus and to have my Zaurus replace my laptop as my MAIN computer
Publically available Videos for the default Zaurus SL-C860 video player

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
TaskManager in Linux? Freeing up memory and reducing...
« Reply #7 on: May 12, 2004, 11:26:19 am »
That was just a guess - I\'m doubtful that the program itself would implement a timeout.
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
TaskManager in Linux? Freeing up memory and reducing...
« Reply #8 on: May 12, 2004, 11:29:21 am »
It looks like you start the program from the terminal

try sshing in and starting it that way, then you\'ll be able to see the output up to the point where it crashes (or perhaps see that it hasn\'t actually crashed?).


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

TonyOlsen

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
    • http://www.userdimensions.com/Tony/Resume.html
TaskManager in Linux? Freeing up memory and reducing...
« Reply #9 on: May 12, 2004, 12:08:28 pm »
sshing?  Tell me more...   would the log be corrupt if the zaurus freezes and then needs a hard reboot?
Tony Olsen
Ferris@Myself.Com
Resume
Zaurus SL-C860 QTopia
2 GB Static CF
1 GB MMC (although it isn't working yet)
My Quest: To get an x86 emulator working on my Zaurus and to have my Zaurus replace my laptop as my MAIN computer
Publically available Videos for the default Zaurus SL-C860 video player

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
TaskManager in Linux? Freeing up memory and reducing...
« Reply #10 on: May 12, 2004, 12:45:49 pm »
SSH/telnet allows you to log in remotely and run things, so it\'s not logging in the way I think you mean. If the Z crashes then you just won\'t get any more info sent to your SSH/telnet window on the PC, but you\'ll still be able to see the output.

Telnet may be better for you as you\'re running the standard anglicised ROM(?), otherwise you\'ll have to install ssh - which I\'d recommend, but not just to do one thing.

Telnet may work straight away (it ought to if you log in as user zaurus). In a command prompt (on Windows or Linux) type:

telnet 192.168.129.201 (assuming this is the IP address)

then log in (username & password), then just run the commands as you would from the native terminal. You\'ll see the text output on your PC and the graphics on the Z.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

TonyOlsen

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
    • http://www.userdimensions.com/Tony/Resume.html
TaskManager in Linux? Freeing up memory and reducing...
« Reply #11 on: May 12, 2004, 12:53:20 pm »
Ah... got it.

My Zaurus is still offline.  (Unable to get USB Network Driver working on Windows98... see http://www.zaurususergroup.com/index.php?n...light=windows98 thread)... so I guess Telnet isn\'t an option until after I get connected...
Tony Olsen
Ferris@Myself.Com
Resume
Zaurus SL-C860 QTopia
2 GB Static CF
1 GB MMC (although it isn't working yet)
My Quest: To get an x86 emulator working on my Zaurus and to have my Zaurus replace my laptop as my MAIN computer
Publically available Videos for the default Zaurus SL-C860 video player

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
TaskManager in Linux? Freeing up memory and reducing...
« Reply #12 on: May 12, 2004, 01:10:45 pm »
Oh, I see. How\'s about over a serial link? Do you have one of those?

I also posted a question in your other thread.

Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

Miami_Bob

  • Sr. Member
  • ****
  • Posts: 483
    • View Profile
TaskManager in Linux? Freeing up memory and reducing...
« Reply #13 on: May 12, 2004, 03:09:43 pm »
Tony -

C860, Sharp ROM, fresh boot to Qtopia desktop, open Konsole & run \'free\' gives

total: .. 62120
used: . 38772
free: .. 23348
shared: ..... 0
buffers: .. 560
swap: ........ 0

this is with SubApplet v1.0.7 running 22 applets.

Taskman, Dash & WhatsUponZ (and probably others) all let you kill processes from the GUI.

WhatsUpOnZ gives a graphic CPU load & Memory usage history.

SystemInfo gives memory useage bar.

Memory Monitor Plugin applet pops up from the applet bar with detailed dynamic memory use info.

For some unknown reason, I seem to gain some free memory when I\'ve run a few programs after bootup & then closed them.


total: .. 62120
used: . 35368
free: .. 26752
shared: ..... 0
buffers: .. 108
swap: ........ 0


Qkonsole gives different numbers with free than Konsole.

total: .. 62120
used: . 43340
free: .. 18780
shared: ..... 0
buffers: .. 188
swap: ........ 0


Run free in Konsole, close Konsole, run free in Qkonsole, close Qkonsole, run free again in Konsole gives slightly different numbers on 2nd Knosole run compared to first one. Go figure. <G>


Bob W
Miami FL
Bob W - Miami FL
--------------------
"The legs of the duck are short and
 cannot be lengthened without distress
 to the duck.

The legs of the crane are long and
 cannot be shortened without distress
 to the crane."

Chuang-tzu

--------------------
C860 main - Sharp 1.40 JP ROM
Language conversion by hand

alts: Cacko 1.22 / OZ 3.5.1 / pdaXrom
512Mb SanDisk SD (x2) / 512Mb SanDisk CF (x2)
Lexar 1Gb CF / AmbiCom WL1100C-CF 802.11b WiFi

Out of Hp200LX, from HP100LX, via HP95LX
--------------------
Desktop MegaTower c/ twin DataPort HD racks;
12 removable HDs with multi OSs - no waiting.

--------------------

Miami_Bob

  • Sr. Member
  • ****
  • Posts: 483
    • View Profile
TaskManager in Linux? Freeing up memory and reducing...
« Reply #14 on: May 12, 2004, 03:13:41 pm »
After rereading posts - tony, can you boot directly to  command prompt & try to run (instead of terminal under GUI)?

Bob W
Bob W - Miami FL
--------------------
"The legs of the duck are short and
 cannot be lengthened without distress
 to the duck.

The legs of the crane are long and
 cannot be shortened without distress
 to the crane."

Chuang-tzu

--------------------
C860 main - Sharp 1.40 JP ROM
Language conversion by hand

alts: Cacko 1.22 / OZ 3.5.1 / pdaXrom
512Mb SanDisk SD (x2) / 512Mb SanDisk CF (x2)
Lexar 1Gb CF / AmbiCom WL1100C-CF 802.11b WiFi

Out of Hp200LX, from HP100LX, via HP95LX
--------------------
Desktop MegaTower c/ twin DataPort HD racks;
12 removable HDs with multi OSs - no waiting.

--------------------