Prcimage is an application that allows a snapshot of current running processes to be taken as base, and killing all processes which were not included in this base at a later time.
Warning - this application requires some knowledge and understanding with the shell - do NOT use if you are the non adventurer type person.
Mono framework is required so install if you haven't yet.
Extract the application files to some folder and give write permissions to it + exec permission to "prcimage.exe". This will be called the homedir from now on.
Run with no parameters to see usages:
mono [homedir]/prcimage.exe
Parameters:
"snapshot" - typically to be used at startup - will save a snapshot of all currently running process commands
"status" - simulate termination - show the "to be killed processes" if used with the "clean" parameter. In addition, duplicate processes will also be shown - only for information.
"clean" - Terminate all existing processes which answers one of the following conditions according to priority:
1. If a string from one of the lines in "PrcImage.includes" is found as a substring of the process command
2. If none of the strings in all lines of "PrcImage.excludes" was found as a substring of the process command
3. If the process command is not found as one that existed when the snapshot was taken.
Application Files:
"prcimage.exe" - the application executable
"PrcImage.excludes" - a list of strings. If one of the strings is found in a process command line, the process will be excluded from the termination list
"PrcImage.includes" - a list of strings. If one of the strings is found in a process command line, the process will be included in the termination list
Created files:
"PrcImage.snapshot" - a snapshot of all running processes (taken when using the application with the "snapshot" parameter.
"PrcImage.log"
If application is called with "clean", the terminated processes list will be written to this log file. It is good to check this list from time to time to see if there are any processes that were terminated and should have been permanently excluded from the termination list.
My own use case:
1. Add "processestakesnapshot" file to /etc/event.d (modify the 2nd parameter to the application's homedir) - this will take a snapshot off all processes 2 minutes after system starts.
2. Add "CleanProcesses.desktop" to "/usr/share/applications/hildon" - this will create the clean processes application link
3. Add a menu item to "/etc/systemui/systemui.xml":
<menuitem priority="7" name="Clean Processes">
<icon>htop</icon>
<callback service="com.nokia.HildonDesktop.AppMgr"
path="/com/nokia/HildonDesktop/AppMgr"
interface="com.nokia.HildonDesktop.AppMgr" method="LaunchApplication"
bus="session" autostart="true">
<argument type="string">CleanProcesses</argument>
</callback>
</menuitem>
This will allow clean to be executed from the system menu
4. System becomes too heavy - if almost no response - clicking the power button and running "Clean Processes". Otherwise - running with "status" to see what's going on.
Execution examples:
mono /home/user/smart/prcimage/prcimage.exe snapshot
mono /home/user/smart/prcimage/prcimage.exe status
mono /home/user/smart/prcimage/prcimage.exe clean
Warning - this application requires some knowledge and understanding with the shell - do NOT use if you are the non adventurer type person.
Mono framework is required so install if you haven't yet.
Extract the application files to some folder and give write permissions to it + exec permission to "prcimage.exe". This will be called the homedir from now on.
Run with no parameters to see usages:
mono [homedir]/prcimage.exe
Parameters:
"snapshot" - typically to be used at startup - will save a snapshot of all currently running process commands
"status" - simulate termination - show the "to be killed processes" if used with the "clean" parameter. In addition, duplicate processes will also be shown - only for information.
"clean" - Terminate all existing processes which answers one of the following conditions according to priority:
1. If a string from one of the lines in "PrcImage.includes" is found as a substring of the process command
2. If none of the strings in all lines of "PrcImage.excludes" was found as a substring of the process command
3. If the process command is not found as one that existed when the snapshot was taken.
Application Files:
"prcimage.exe" - the application executable
"PrcImage.excludes" - a list of strings. If one of the strings is found in a process command line, the process will be excluded from the termination list
"PrcImage.includes" - a list of strings. If one of the strings is found in a process command line, the process will be included in the termination list
Created files:
"PrcImage.snapshot" - a snapshot of all running processes (taken when using the application with the "snapshot" parameter.
"PrcImage.log"
If application is called with "clean", the terminated processes list will be written to this log file. It is good to check this list from time to time to see if there are any processes that were terminated and should have been permanently excluded from the termination list.
My own use case:
1. Add "processestakesnapshot" file to /etc/event.d (modify the 2nd parameter to the application's homedir) - this will take a snapshot off all processes 2 minutes after system starts.
2. Add "CleanProcesses.desktop" to "/usr/share/applications/hildon" - this will create the clean processes application link
3. Add a menu item to "/etc/systemui/systemui.xml":
<menuitem priority="7" name="Clean Processes">
<icon>htop</icon>
<callback service="com.nokia.HildonDesktop.AppMgr"
path="/com/nokia/HildonDesktop/AppMgr"
interface="com.nokia.HildonDesktop.AppMgr" method="LaunchApplication"
bus="session" autostart="true">
<argument type="string">CleanProcesses</argument>
</callback>
</menuitem>
This will allow clean to be executed from the system menu
4. System becomes too heavy - if almost no response - clicking the power button and running "Clean Processes". Otherwise - running with "status" to see what's going on.
Execution examples:
mono /home/user/smart/prcimage/prcimage.exe snapshot
mono /home/user/smart/prcimage/prcimage.exe status
mono /home/user/smart/prcimage/prcimage.exe clean
Have fun tracking and cleaning system processes.
Last edited by impeham; 2012-03-02 at 14:49.