Active Topics

 



Notices


Reply
Thread Tools
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#11
If OP got problems with multitasking, he should first find culprit, instead of developing ways of "killing" - my device doesn't have any slowdowns even with plentora of opened things. Program itself can work slowly, but N900 interface *never*.

It's just matter of using swap on microSD (with eMMC swap disabled), and proper swap-related settings.

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 

The Following 2 Users Say Thank You to Estel For This Useful Post:
jedi's Avatar
Posts: 1,411 | Thanked: 1,330 times | Joined on Jan 2010 @ Tatooine
#12
It's already been done!

http://talk.maemo.org/showthread.php?t=62183
__________________
May the source be with you.
 

The Following 4 Users Say Thank You to jedi For This Useful Post:
Posts: 560 | Thanked: 422 times | Joined on Mar 2011
#13
Originally Posted by reinob View Post
Define "all tasks". Killing every single process will make your N900 reboot. So now take your time to make a list of processes that should not be killed. Then you can easily write a script to kill all pids not in your list (plus the name to pid mapping).
The term all tasks, to my mind, would be all applications with open windows so a shut-all command would close the all open windows. Some applications have additional background services so just closing the window remotely, probably wouldn't free up a noticeable amount of resources.

One way this might work would be to run as a daemon. It would be able to detect when the system has fully booted so it can recognise the baseline state. As each application, and its supporting services, initialises these would be logged so when shut-all is actioed it wouldn't kill off core system services.
...thinking aloud

Plus leave the RAM management to the kernel. He knows it better than you.
Yes.
 

The Following 2 Users Say Thank You to demolition For This Useful Post:
Posts: 560 | Thanked: 422 times | Joined on Mar 2011
#14
Originally Posted by Estel View Post
If OP got problems with multitasking, he should first find culprit, instead of developing ways of "killing"
This isn't the only reason to quit everything that's open. Sometimes it's just handy to close all windows (and associated process).

@Jedi. Thanks for this script. I'm not a real whizz with on such matters, so please would you explain
- why does it require BASH?
- is there a way to convert it to be used with the standard shell?
If you've evolved your script over time, it'd be good to see the most recent edition.

There's also this - killing them all and being able to restart them all as well. This post is in the same thread as your
 

The Following 2 Users Say Thank You to demolition For This Useful Post:
jedi's Avatar
Posts: 1,411 | Thanked: 1,330 times | Joined on Jan 2010 @ Tatooine
#15
Originally Posted by demolition View Post
- why does it require BASH?
No definitive reason, other than that's the way I roll
Originally Posted by demolition View Post
- is there a way to convert it to be used with the standard shell?
Probably.
Originally Posted by demolition View Post
If you've evolved your script over time, it'd be good to see the most recent edition.
I haven't 'evolved' it - but it still works for me..
__________________
May the source be with you.
 

The Following User Says Thank You to jedi For This Useful Post:
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#16
Originally Posted by sulu View Post
No, I'm using bash. The commands I posted work on bash, dash, csh and tcsh and I didn't even think about it that busybox might not support such basic things.
Hmmm.. I mean the ps ux!
 
Posts: 432 | Thanked: 544 times | Joined on Feb 2011
#17
Originally Posted by reinob View Post
Define "all tasks". Killing every single process will make your N900 reboot. So now take your time to make a list of processes that should not be killed. Then you can easily write a script to kill all pids not in your list (plus the name to pid mapping).

Plus leave the RAM management to the kernel. He knows it better than you.
By the time i wrote it i meant "Close all tasks" to be all the applications visible in Dashboard... & nothing from background processes or desktop...
but when i used the command @sulu gave
Code:
ps ux
i am able to see a lot of apps in "user" i haven't even started(or exited hours ago) such as image-viewer, browser,macucuo2 and they aren't visible in "Dashboard"

so "Close all tasks" should include all those apps too...

@jedi
thanks for the script... is your script killing the unseeable apps i mentioned above...
 
jedi's Avatar
Posts: 1,411 | Thanked: 1,330 times | Joined on Jan 2010 @ Tatooine
#18
Originally Posted by immi.shk View Post
is your script killing the unseeable apps i mentioned above...
No, as it uses wmctrl to identify which windows are open, and attempts to close them. It won't close any that are in the NOCLOSE=(....) line.
__________________
May the source be with you.
 
Posts: 432 | Thanked: 917 times | Joined on Jun 2011
#19
is it nomal some processes running in background are doubled ?

Code:
1559 user     58156 S <  /usr/bin/mafw-dbus-wrapper mafw-gst-renderer 
 1565 user      8084 S    /usr/bin/mafw-dbus-wrapper mafw-iradio-source 
 1571 user     17672 S    /usr/bin/mafw-dbus-wrapper mafw-tracker-source 
 1576 user      9292 S    /usr/bin/mafw-dbus-wrapper mafw-upnp-source 
 1578 user      1524 S    /usr/sbin/temp-reaper 
 1591 user      4908 S    /usr/sbin/maesync_controller 
 1607 user     16880 S    /usr/bin/syncd 
 1610 user     24624 S    /usr/bin/osso-abook-home-applet                      
 1618 root      8292 S    /usr/sbin/ke-recv 
 1710 user     13724 S    /usr/share/foreca-weather/control 
 1844 user     26592 S    /usr/sbin/as-daemon -D 
 1853 user      3932 S    /usr/bin/browser 
 1854 user     69476 S    /usr/bin/browser                                     
 1856 user      3932 S    /usr/bin/image-viewer 
 1857 user     38232 S    /usr/bin/image-viewer                                
 2171 root         0 SW<  [mmcqd]
 2828 user     15744 S    /usr/libexec/hildon-thumbnailerd 
 4380 root     15156 S    python /opt/smscon/smscon_daemon 
 6540 user     14740 S    /usr/bin/mafw-playlist-daemon 
 8497 user      3932 S    /usr/bin/modest 
 8498 user     69124 S    /usr/bin/modest                                      
 8724 user      3932 S    /usr/bin/osso-addressbook 
 8725 user     32408 S    /usr/bin/osso-addressbook                            
 8870 user      3932 S    /usr/bin/rtcom-messaging-ui 
 8871 user     34768 S    /usr/bin/rtcom-messaging-ui                          
 8872 user     78680 S    /usr/sbin/browserd -s 8872 -n RTComMessagingServer 
 9582 user      2088 S    grep -q Call answered 
 9787 user      3932 S    /usr/bin/Calendar 
 9788 user     32412 S    /usr/bin/Calendar                                    
10586 user      120m S    /usr/sbin/browserd -s 10586 -n browserui 
10781 user      3932 S    /usr/bin/osso-xterm 
10782 user     39376 S    /usr/bin/osso-xterm                                  
10783 user      2788 S    gnome-pty-helper 
10784 user      2160 S    -sh 
10795 root      2088 S    /bin/sh /usr/sbin/gainroot 
10796 root      2160 S    /bin/sh 
10838 user      3932 S    /usr/bin/rtcom-call-ui 
10839 user     34808 S    /usr/bin/rtcom-call-ui
 
Posts: 99 | Thanked: 65 times | Joined on Jan 2008 @ Finland
#20
Originally Posted by saponga View Post
is it nomal some processes running in background are doubled ?

Code:
 1856 user      3932 S    /usr/bin/image-viewer 
 1857 user     38232 S    /usr/bin/image-viewer                                
 8497 user      3932 S    /usr/bin/modest 
 8498 user     69124 S    /usr/bin/modest                                      
 8724 user      3932 S    /usr/bin/osso-addressbook 
 8725 user     32408 S    /usr/bin/osso-addressbook                            
 8870 user      3932 S    /usr/bin/rtcom-messaging-ui 
 8871 user     34768 S    /usr/bin/rtcom-messaging-ui                          
10781 user      3932 S    /usr/bin/osso-xterm 
10782 user     39376 S    /usr/bin/osso-xterm
I think it's normal. Most if not all applications that come with the system are started by a combination of maemo-invoker and maemo-launcher. This allows the system to launch those applications faster because maemo-launcher has many of the libraries preloaded. I haven't worked with the internals of this part of Maemo 5 so I don't know the exact details or why maemo-invoker doesn't exit before the application has quit. In any case, I wouldn't worry about those processes too much as they share most of their memory with the other instances of maemo-{invoker,launcher}. You can read a bit more about this at http://maemo.org/intro/platform/ .

For example, if you take a closer look at processes 10781 and 10782 you'll notice that 10781 is an instance of maemo-invoker ("ls -l /proc/10781/exe") and 10782 is an instance of maemo-launcher. If you further look at 10782, you'll notice that its parent is maemo-launcher ("grep PPid /proc/10782/status" or "ps aux | grep $(grep PPid /proc/10782/status | awk '{print $2}')"). Once created, process 10782 is replaced with the actual application (osso-xterm). This way "master maemo-launcher" can load commonly needed libraries such as glib and gtk at start, fork another instance of maemo-launcher to share those libraries without reloading and start other applications faster.
 

The Following 4 Users Say Thank You to wnd For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 10:34.