Priority Script
v1.1
Description:
This Script is written by buyukbang and inspired from the script made By MalMen.
PriorityManager automatically changes the priorities of the processes to give optimal performance for the menu being used.
I tested all processes one by one, decided their effects on the performance of all modules and wrote a bug-free (hopefully)
priority manager script.
Code:PriorityManager automatically changes the priorities of the processes to give optimal performance for the menu being used. I found huge bugs on both MalMen's and massimo1167's scripts and decided to write a new one. I tested all processes one by one, decided their effects on the performance of all modules and wrote a bug-free (hopefully) priority manager script. Here are the details: Fixed: All process priorities updated according to the results of my long tests. Mediaplayer performance, IP TV, Recording, ECM Time (for EMUs) are optimized. Fixed: Old scripts use "snice +XX" command to give processes positive nice values (lower priority). But this command does not guarantee to decrease the priority and system sometimes ignore this command. You can check old scripts by top command while changing menu modes. "<" sign means negative nice value and high priority, "N" sign means positive nice value and low priority. After a few times changing the menu modes everything has "<" sign and this is really nonfunctional situation. To fix this problem I used "snice STOP" which cannot be ignored by the system. Fixed: massimo1167's script is not compatible with the option "Always Start in TV Mode" and this causes totally wrong prioritization. This is fixed. Fixed: Old scripts block firmware upgrades and upgrade process sticks at "Extracting". S99PriorityManager fixes this issue and fully compatible Opensat upgrades. Just wait 60 seconds (maximum) at "Extracting", upgrade process will continue. Added: ftp,samba,telnet prioritization in sleep mode. I suggest you to transfer your files with FTP during sleep mode prioritization. This is the fastest method. Added: Photo prioritization Added: Browser prioritization Added: RSS prioritization Added: Use this command to stop the script (does not work in old scripts): /DISK2/etc/start.d/S99PriorityManager.sh stop Added: Use this command to restart the script (does not work in old scripts): use command /DISK2/etc/start.d/S99PriorityManager.sh stop restart Added: Logging. Use this command to see log file: tail -f S99PriorityManager_IsRunning Important Notes: - Put this script under "/DISK2/etc/start.d", use command "chmod 755 /DISK2/etc/start.d/S99PriorityManager.sh", finally restart the box. - Scripts works in a loop with 60 seconds sleep times. So wait max 60 seconds for prioritization. You can decrease 60 seconds if you want, but values below 10 will cause performance degradation. - Mediaplayer prioritization will start after playing a movie file. File browser will not be prioritized since there is no need and this is logged as "CURRENT_MENU=UNKNOWN". This is the same as with the sleep mode prioritization and so ftp, samba, telnet will have higher priority. - A looped script in /DISK2/etc/start.d/ will block the other scripts with a higher heading value. So use only looped script (and this is it). This is the reason why I used "99" in the script name. This will not block any script with two digit but will block scripts with higher values as heading value. v1.1 ----- RSS and Browser components stay in memory after first usage. Added support for automatically killing RSS and Browser components when using other menu.




Reply With Quote