Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    [Request] - CLOSE ALL TASKS for N900

    Reply
    Page 2 of 3 | Prev |   1   2   3   | Next
    Estel | # 11 | 2012-01-25, 09:38 | Report

    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

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to Estel For This Useful Post:
    int_ua, Sourav.dubey

     
    jedi | # 12 | 2012-01-25, 09:49 | Report

    It's already been done!

    http://talk.maemo.org/showthread.php?t=62183

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 4 Users Say Thank You to jedi For This Useful Post:
    immi.shk, MINKIN2, nicolai, reinob

     
    demolition | # 13 | 2012-01-25, 09:53 | Report

    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

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

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to demolition For This Useful Post:
    immi.shk, reinob

     
    demolition | # 14 | 2012-01-25, 10:14 | Report

    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

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to demolition For This Useful Post:
    Estel, immi.shk

     
    jedi | # 15 | 2012-01-25, 10:18 | Report

    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..

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to jedi For This Useful Post:
    demolition

     
    reinob | # 16 | 2012-01-25, 10:24 | Report

    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!

    Edit | Forward | Quote | Quick Reply | Thanks

     
    immi.shk | # 17 | 2012-01-25, 10:32 | Report

    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...

    Edit | Forward | Quote | Quick Reply | Thanks

     
    jedi | # 18 | 2012-01-25, 12:21 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    saponga | # 19 | 2012-03-10, 13:51 | Report

    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

    Edit | Forward | Quote | Quick Reply | Thanks

     
    wnd | # 20 | 2012-03-20, 14:10 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 4 Users Say Thank You to wnd For This Useful Post:
    anthonie, peterleinchen, reinob, saponga

     
    Page 2 of 3 | Prev |   1   2   3   | Next
vBulletin® Version 3.8.8
Normal Logout