New_Priority_Script_V.1.1

Nastavení a vše kolem Azboxu HD.

Moderátoři: gorick, schmegea, monkus

zbyneksk Czech Republic
Mírně pokročilý
Mírně pokročilý
Příspěvky: 294
Registrován: 06 kvě 2009, 22:18
Bydliště: Doma
Dal poděkování: 2 poděkování
Kontaktovat uživatele:

New_Priority_Script_V.1.1

Příspěvek od zbyneksk »

New_Priority_Script_V.1.1

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

Prevzato z azboxhd.org, zatim netestovano.
Nemáte oprávnění prohlížet přiložené soubory.


zbyneksk Czech Republic
Mírně pokročilý
Mírně pokročilý
Příspěvky: 294
Registrován: 06 kvě 2009, 22:18
Bydliště: Doma
Dal poděkování: 2 poděkování
Kontaktovat uživatele:

New_Priority_Script_V.1.1

Příspěvek od zbyneksk »

Jeste script S99PriorityManager.sh v textove podobe.

Kód: Vybrat vše

#!/bin/sh
# 
# S99PriorityManager 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.
# 
# History
# ----------------------------
# v1.1
# -----
# Added: RSS and Browser components stay in memory after first usage. Added support for automatically killing RSS and Browser
#        components when using other menu.
# 
# v1.0
# -----
# 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 fasted 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" and 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.
#
#
# Desctiption of the processes:
# ----------------------------
# SDecoderServer - A/V playback
# DStar - Menu handler
# CRTVCore - TV module 
# CRTVSetup - TV module
# mbox_module - MBOX emu
# emu_module - Multicas
# mbox_module - MBOX emu
# mgcamd - MgCamd emu
# telnetd - telnet server
# vsftpd - ftp server
# JIPC_Server - Java Interprocess Communication Server
# cifsdnotifyd - SAMBA server
# cifsoplockd - SAMBA server
# xfslogd - XFS log
# xfsdatad - XFS
# xfsbufd - XFS
# ir_control - Remote control
# youtube_player - Youtube
# Polaris - Browser
# browser_control - Browser
# rssfeed - RSS
# EStar - Photo viewer

start() {
  echo $"`date '+%H:%M:%S %m/%d/%y'`": INITIALIZING > /tmp/S99PriorityManager_IsRunning
  echo INITIALIZING > /tmp/S99PriorityManager_Last_Menu
  snice -v ir_control -20
  sleep 10
  until [ 1 -gt 10 ]; do       
     LAST_MENU=`cat /tmp/S99PriorityManager_Last_Menu`
     ps x > /tmp/S99PriorityManager_Process_List
     TV=`grep CRTVCore /tmp/S99PriorityManager_Process_List|wc -l`
     MEDIA=`grep SDecoderServer /tmp/S99PriorityManager_Process_List|wc -l`
     YOUTUBE=`grep youtube_player /tmp/S99PriorityManager_Process_List|wc -l`
     PHOTO=`grep EStar /tmp/S99PriorityManager_Process_List|wc  -l`
     BROWSER=`grep browser_control /tmp/S99PriorityManager_Process_List|wc -l`
     BROWSER2=`grep Polaris /tmp/S99PriorityManager_Process_List|wc -l`
     RSSFEED=`grep rssfeed /tmp/S99PriorityManager_Process_List|wc -l`

     if [ $TV -gt 12 ]; then
        CURRENT_MENU=TV
     elif [ $TV = 10 ] && [ $MEDIA = 6 ]; then
        CURRENT_MENU=MEDIA
     elif [  $YOUTUBE -gt 0 ]; then
        CURRENT_MENU=YOUTUBE
     elif [  $PHOTO -gt 0 ]; then
        CURRENT_MENU=PHOTO
     elif [  $BROWSER -gt 0 ]; then
        CURRENT_MENU=BROWSER
     elif [  $RSSFEED -gt 0 ]; then
        CURRENT_MENU=RSSFEED
     else
       CURRENT_MENU=UNKNOWN
     fi

     if [ "$CURRENT_MENU" == "TV" ] && [ "$LAST_MENU" != "TV" ]; then
     	  snice -v DStar -5
        snice -v SDecoderServer -4
        snice -v CRTVCore -20
        snice -v CRTVSetup -1 
        snice -v emu_module -6
        snice -v mgcamd -6
        snice -v mbox_module -6
        snice -v JIPC_Server 15
        snice STOP telnetd
        snice STOP vsftpd
        snice STOP cifsdnotifyd
        snice STOP cifsoplockd
        if [  $BROWSER2 -gt 0 ]; then
           grep Polaris /tmp/S99PriorityManager_Process_List  | awk '{print $1}' | xargs kill -9
        fi 
        if [  $RSSFEED -gt 0 ]; then
           grep rssfeed /tmp/S99PriorityManager_Process_List  | awk '{print $1}' | xargs kill -9
        fi 
        echo TV > /tmp/S99PriorityManager_Last_Menu
        echo $"`date '+%H:%M:%S %m/%d/%y'`": "LAST_MENU=$LAST_MENU, CURRENT_MENU=$CURRENT_MENU TV=$TV MEDIA=$MEDIA YOUTUBE=$YOUTUBE PHOTO=$PHOTO BROWSER=$BROWSER RSSFEED=$RSSFEED" >> /tmp/S99PriorityManager_IsRunning
     elif [ "$CURRENT_MENU" == "MEDIA" ] && [ "$LAST_MENU" != "MEDIA" ]; then 
     	  snice STOP DStar 
        snice -v SDecoderServer -20 
        snice STOP CRTVCore
        snice STOP CRTVSetup
        snice STOP emu_module
        snice STOP mgcamd
        snice STOP mbox_module
        snice STOP JIPC_Server
        snice STOP telnetd
        snice STOP vsftpd 
        snice STOP cifsdnotifyd 
        snice STOP cifsoplockd
        if [  $BROWSER2 -gt 0 ]; then
           grep Polaris /tmp/S99PriorityManager_Process_List  | awk '{print $1}' | xargs kill -9
        fi 
        if [  $RSSFEED -gt 0 ]; then
           grep rssfeed /tmp/S99PriorityManager_Process_List  | awk '{print $1}' | xargs kill -9
        fi 
        echo MEDIA > /tmp/S99PriorityManager_Last_Menu
        echo $"`date '+%H:%M:%S %m/%d/%y'`": "LAST_MENU=$LAST_MENU, CURRENT_MENU=$CURRENT_MENU TV=$TV MEDIA=$MEDIA YOUTUBE=$YOUTUBE PHOTO=$PHOTO BROWSER=$BROWSER RSSFEED=$RSSFEED" >> /tmp/S99PriorityManager_IsRunning
     elif [ "$CURRENT_MENU" == "YOUTUBE" ] && [ "$LAST_MENU" != "YOUTUBE" ]; then
        snice STOP DStar 
        snice SDecoderServer -15
        snice STOP CRTVCore
        snice STOP CRTVSetup
        snice STOP emu_module
        snice STOP mgcamd    
        snice STOP mbox_module
        snice -v JIPC_Server 4 
        snice STOP telnetd
        snice STOP vsftpd
        snice STOP cifsdnotifyd
        snice STOP cifsoplockd
        snice -v youtube_player -20
        if [  $BROWSER2 -gt 0 ]; then
           grep Polaris /tmp/S99PriorityManager_Process_List  | awk '{print $1}' | xargs kill -9
        fi 
        if [  $RSSFEED -gt 0 ]; then
           grep rssfeed /tmp/S99PriorityManager_Process_List  | awk '{print $1}' | xargs kill -9
        fi 
        echo YOUTUBE > /tmp/S99PriorityManager_Last_Menu
        echo $"`date '+%H:%M:%S %m/%d/%y'`": "LAST_MENU=$LAST_MENU, CURRENT_MENU=$CURRENT_MENU TV=$TV MEDIA=$MEDIA YOUTUBE=$YOUTUBE PHOTO=$PHOTO BROWSER=$BROWSER RSSFEED=$RSSFEED" >> /tmp/S99PriorityManager_IsRunning
     elif [ "$CURRENT_MENU" == "PHOTO" ] && [ "$LAST_MENU" != "PHOTO" ]; then
        snice STOP DStar 
        snice STOP SDecoderServer
        snice STOP CRTVCore
        snice STOP CRTVSetup
        snice STOP emu_module
        snice STOP mgcamd  
        snice STOP mbox_module
        snice STOP JIPC_Server 
        snice STOP telnetd
        snice STOP vsftpd
        snice STOP cifsdnotifyd
        snice STOP cifsoplockd
        snice -v EStar -20
        if [  $BROWSER2 -gt 0 ]; then
           grep Polaris /tmp/S99PriorityManager_Process_List  | awk '{print $1}' | xargs kill -9
        fi 
        if [  $RSSFEED -gt 0 ]; then
           grep rssfeed /tmp/S99PriorityManager_Process_List  | awk '{print $1}' | xargs kill -9
        fi 
        echo PHOTO > /tmp/S99PriorityManager_Last_Menu
        echo $"`date '+%H:%M:%S %m/%d/%y'`": "LAST_MENU=$LAST_MENU, CURRENT_MENU=$CURRENT_MENU TV=$TV MEDIA=$MEDIA YOUTUBE=$YOUTUBE PHOTO=$PHOTO BROWSER=$BROWSER RSSFEED=$RSSFEED" >> /tmp/S99PriorityManager_IsRunning
     elif [ "$CURRENT_MENU" == "BROWSER" ] && [ "$LAST_MENU" != "BROWSER" ]; then
        snice STOP DStar 
        snice STOP SDecoderServer
        snice STOP CRTVCore
        snice STOP CRTVSetup
        snice STOP emu_module
        snice STOP mgcamd 
        snice STOP mbox_module
        snice -v JIPC_Server 4 
        snice STOP telnetd
        snice STOP vsftpd
        snice STOP cifsdnotifyd
        snice STOP cifsoplockd
        snice -v Polaris browser_control -20
        if [  $RSSFEED -gt 0 ]; then
           grep rssfeed /tmp/S99PriorityManager_Process_List  | awk '{print $1}' | xargs kill -9
        fi 
        echo BROWSER > /tmp/S99PriorityManager_Last_Menu
        echo $"`date '+%H:%M:%S %m/%d/%y'`": "LAST_MENU=$LAST_MENU, CURRENT_MENU=$CURRENT_MENU TV=$TV MEDIA=$MEDIA YOUTUBE=$YOUTUBE PHOTO=$PHOTO BROWSER=$BROWSER RSSFEED=$RSSFEED" >> /tmp/S99PriorityManager_IsRunning
     elif [ "$CURRENT_MENU" == "RSSFEED" ] && [ "$LAST_MENU" != "RSSFEED" ]; then
        snice STOP DStar 
        snice STOP SDecoderServer
        snice STOP CRTVCore
        snice STOP CRTVSetup
        snice STOP emu_module
        snice STOP mgcamd
        snice STOP mbox_module
        snice -v JIPC_Server 4 
        snice STOP telnetd
        snice STOP vsftpd
        snice STOP cifsdnotifyd
        snice STOP cifsoplockd
        snice -v rssfeed -20
        if [  $BROWSER2 -gt 0 ]; then
           grep Polaris /tmp/S99PriorityManager_Process_List  | awk '{print $1}' | xargs kill -9
        fi 
        echo RSSFEED > /tmp/S99PriorityManager_Last_Menu
        echo $"`date '+%H:%M:%S %m/%d/%y'`": "LAST_MENU=$LAST_MENU, CURRENT_MENU=$CURRENT_MENU TV=$TV MEDIA=$MEDIA YOUTUBE=$YOUTUBE PHOTO=$PHOTO BROWSER=$BROWSER RSSFEED=$RSSFEED" >> /tmp/S99PriorityManager_IsRunning
     elif [ "$CURRENT_MENU" != "$LAST_MENU" ] && [ "$CURRENT_MENU" == "UNKNOWN" ]; then
        snice -v DStar  -20
        snice STOP SDecoderServer
        snice STOP CRTVCore
        snice STOP CRTVSetup
        snice STOP emu_module
        snice STOP mgcamd
        snice STOP mbox_module
        snice STOP JIPC_Server 
        snice -v telnetd -20
        snice -v vsftpd -20
        snice -v cifsdnotifyd  -20
        snice -v cifsoplockd -20
        snice -v smbd -20
        snice -v nmbd -20
        if [  $BROWSER2 -gt 0 ]; then
           grep Polaris /tmp/S99PriorityManager_Process_List  | awk '{print $1}' | xargs kill -9
        fi 
        if [  $RSSFEED -gt 0 ]; then
           grep rssfeed /tmp/S99PriorityManager_Process_List  | awk '{print $1}' | xargs kill -9
        fi 
        echo "UNKNOWN" > /tmp/S99PriorityManager_Last_Menu
        echo $"`date '+%H:%M:%S %m/%d/%y'`": "LAST_MENU=$LAST_MENU, CURRENT_MENU=$CURRENT_MENU TV=$TV MEDIA=$MEDIA YOUTUBE=$YOUTUBE PHOTO=$PHOTO BROWSER=$BROWSER RSSFEED=$RSSFEED" >> /tmp/S99PriorityManager_IsRunning
     fi
     
     sleep 60;
     
     if [ ! -f /tmp/S99PriorityManager_IsRunning ]; then
        exit 0
     fi
  done;
}	

stop() {
   echo "===> Stopping user defined script S4PriorityManager"
   rm -f /tmp/S99PriorityManager_IsRunning
}

restart() {
   stop
   start
}	

case "$1" in
  start)
  	start
	;;
  stop)
  	stop
	;;
  restart|reload)
  	restart
	;;
  *)
	echo $"Usage: $0 {start|stop|restart}"
	exit 1
esac

exit $?


Uživatelský avatar
hitman222
Mírně pokročilý
Mírně pokročilý
Příspěvky: 447
Registrován: 26 čer 2009, 09:23

Re: New_Priority_Script_V.1.1

Příspěvek od hitman222 »

Zatím dobré,vypádá to moc pěkně udělané. :87:
Uvidíme za chvilku co to bude dělat.


Dream800 HDse_OpenPli
Vu+Solo2_OpenPli
Cloud-ibox3_OpenPli
Dreambox 7020,Dreambox 500
Samsung UE46ES8000
A-DATA NH92 Slim HDD 2.5" 320GB - modrý (blue), 12mm, USB2.0, 5400ot, ANH92-320GU-RBL,
motor SG2100(SKY Link)
Uživatelský avatar
frcko73 Slovakia
Mazák
Mazák
Příspěvky: 724
Registrován: 11 pro 2008, 14:45

Re: New_Priority_Script_V.1.1

Příspěvek od frcko73 »

tiez to mam v AZ,ale zatial som nepostrehol ucinok.......... :12:


Parabola Du 105cm,motor neviem,ale strasne stary,Samsung UE65MU6172,VU+ Uno 4K SE
Uživatelský avatar
Mate Czech Republic
Nováček
Nováček
Příspěvky: 73
Registrován: 17 dub 2009, 11:49

Re: New_Priority_Script_V.1.1

Příspěvek od Mate »

V. 1.2 by buyukbang

Kód: Vybrat vše

S99PriorityManager v1.2

################################# ###################
# Description:
#
# This Script is written by buyukbang and inspired from the script made By MalMen.
# Special thanks to Smudger for the all information, tests and power measurements!
#
# 1. S99PriorityManager 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) script.
#
# 2. S99PriorityManager provides power saving ! Smudger's power measurements show that S99PriorityManager decrease power consumption of the
# box from 25W to 23W while watching an SD channel and from 28W to 24W while watching an HD channel.
#
#
################################# ###################
# User Defined Parameters :
#
# MODE : IF YOU WANT TO RUN THIS SCRIPT ON A BOX BEING USED AS A CAM SERVER CHANGE BELOW LINE TO MODE=SERVER THEN SAVE THE SCRIPT.
MODE=CLIENT
#
################################# ###################
# History:
#
# v1.2
# -----
# Fixed : Sometimes CRTVCore collects all CPU power and this slows down everything. So I decreased priority of CRTVCore.
# Fixed : Fixed a bug in restart command ( /DISK2/etc/start.d/S99PriorityManager.sh restart )
# Improved : All process priorities fine tuned.
# Improved : Better menu detection.
# Improved : Better sleep mode detection.
# Modified : Loop sleep time decreased from 60 seconds to 30 seconds.
# Added : azepgmgr support to protect TV/Media applications from the glitches caused by its initial process. (Thanks to Smudger!)
# Added : Client/Server mode switch parameter for those who want to this script on a box being used as a CAM server.
# Added : Audio menu prioritization.
# Added : Settings menu prioritization.
# Added : Plugins menu prioritization.
# Added : Cheops EMU prioritization.
# Added : SBox EMU prioritization.
#
# v1.1
# -----
# Added : RSS and Browser components stay in memory after first usage. Added support for automatically killing RSS and Browser
# components when using other menu.
#
# v1.0
# -----
# 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 45 seconds at "Extracting", then 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 fasted method.
# Added : Photo menu prioritization.
# Added : Browser menu prioritization.
# Added : RSS menu 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) : /DISK2/etc/start.d/S99PriorityManager.sh restart
# Added : Logging. Use this command to see log file : tail -f /tmp/S99PriorityManager_IsRunning
#
################################# ###################
# Intallation:
#
# 1. Check "User Defined Parameters" and if needed edit parameters then save the scipt.
# 2. Put this script under "/DISK2/etc/start.d", use following commands in TELNET with below order.
# 3. chmod 755 /DISK2/etc/start.d/S99PriorityManager.sh
# 4. If you edited and saved the script use this command: dos2unix /DISK2/etc/start.d/S99PriorityManager.sh
# 5. After the first run of the script standby.sh and wakeup.sh scripts will be created under /DISK2/etc . These scripts will help to main
# script for the decision of the sleep mode by creating and deleting a file ( /tmp/S99PriorityManager_Sleep ) If you have already
# standby.sh and wakeup.sh in /DISK2/etc you must manually add below commands to scripts before running S99PriorityManager.sh :
# echo 0 > /tmp/S99PriorityManager_Sleep ==> to standby.sh
# rm /tmp/S99PriorityManager_Sleep ==> to wakeup.sh
# 6. /DISK2/etc/start.d/S99PriorityManager.sh start (After this command standby.sh and wakeup.sh will be created under /DISK2/etc)
# 7. Restart the box. 30 seconds after restarting use below command to check if the script is working.
# 8. tail -f /tmp/S99PriorityManager_IsRunning
#
################################# ###################
# Important Notes:
#
# - Scripts works in a loop with 30 seconds sleep times. So wait max 30 seconds for prioritization. You can decrease this to 15-20 seconds
# if you want, but values below 10 may cause a small performance loss.
#
# - A looped script in /DISK2/etc/start.d/ will block the other scripts with a higher heading value. So use only one 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.
#
################################# ###################
Nemáte oprávnění prohlížet přiložené soubory.


19.2 E | 23.5 E | 28.2 E | 1.0 W | AZ Elite (vzdy posledni FW) + Xtreamer eTRAYz 1TB (Samsung F1) | LCD Philips 47PFL7642D/12 | LCD Funai LT7-M32BB
risohr
Nováček
Nováček
Příspěvky: 47
Registrován: 04 úno 2010, 16:34

Re: New_Priority_Script_V.1.1

Příspěvek od risohr »

Pouziva to niekto vobec ? Podla mojich osobnych zisteni som nejake zrychlenie nepozoroval. Prava naopak, oproti skriptu S4ProcLVL mi prepinanie pripada pomalsie. Zatial som testoval ale len TV mod. Pouzita verzia : S99PriorityManager v1.2


AzBox Elite HD + Skylink ICE, Gibertini 85 Al ,LNB Smart TMT43 Monoblock 4,3 Twin
Enigma2 OpenRSI 3.3.1 21.7.2013, NewCS 1.7 + CCcam 2.2.1
lachout
Nováček
Nováček
Příspěvky: 12
Registrován: 11 bře 2010, 14:06

Re: New_Priority_Script_V.1.1

Příspěvek od lachout »

Včera jsem si tenhle script nainstaloval a taky se mi nezdá, že by se objektivně cokoliv zrychlilo. Spíš mám pocit opaku, nehledě na to, že po spuštění scriptu se mi naplnil swap do cca 1/3. Tak uvidím, nechám to tam ještě pár dní, jestli to k něčemu bude. Jinak půjde pryč.


AZBox Elite HD, E2 RC4, Skylink, CSlink, atd.
Uživatelský avatar
monkus Slovakia
V.I.P.
V.I.P.
Příspěvky: 1289
Registrován: 05 kvě 2009, 14:41
Dal poděkování: 4 poděkování
Kontaktovat uživatele:

Re: New_Priority_Script_V.1.1

Příspěvek od monkus »

nepozeral som tento skript, ale vseobecne, princip funguje.

napr. kopirovanie z usb disku na interny trva velmi dlho. ale ked zmenim snice -15 PID, tak sa mi rychlost zniekolkonasobi.

druha vec je, ze niektore veci my necitime, azbox citi :-)


dreambox dm-800 hd se, dm-525 hd
zbyneksk Czech Republic
Mírně pokročilý
Mírně pokročilý
Příspěvky: 294
Registrován: 06 kvě 2009, 22:18
Bydliště: Doma
Dal poděkování: 2 poděkování
Kontaktovat uživatele:

Re: New_Priority_Script_V.1.1

Příspěvek od zbyneksk »

No nebo tak. Vsak uz jsem pred casem psal ve vedlejsim vlakne, ze si ty jednotlive mody zrychleni mohou odzkouset (napsat a spustit) rucne.
Akorat citim, ze velka vetsina je zde naockovana na mysoidni klikani jisteho OS a pri slovu Telnet nevi co si pod tim maji predstavit.

Navrhuji zavest lekce kursu Linuxu pro zacatecniky. Nejhorsi je to, ze vetsina se boji zacit, nebot nema poneti jak nebo odkud zacit.
No a kdyz si nekdo neco precte a zacne, tak ve vetsine pripadnu to zkonci tak, ze si smaze stavajici partisny a je nastvany,
co ze to je za hrozny OS, ktery mu smazal data na PC.
Samozrejme svetle vyjimky se najdou.


lachout
Nováček
Nováček
Příspěvky: 12
Registrován: 11 bře 2010, 14:06

Re: New_Priority_Script_V.1.1

Příspěvek od lachout »

zbyneksk píše:No nebo tak. Vsak uz jsem pred casem psal ve vedlejsim vlakne, ze si ty jednotlive mody zrychleni mohou odzkouset (napsat a spustit) rucne.
Akorat citim, ze velka vetsina je zde naockovana na mysoidni klikani jisteho OS a pri slovu Telnet nevi co si pod tim maji predstavit.

Navrhuji zavest lekce kursu Linuxu pro zacatecniky. Nejhorsi je to, ze vetsina se boji zacit, nebot nema poneti jak nebo odkud zacit.
No a kdyz si nekdo neco precte a zacne, tak ve vetsine pripadnu to zkonci tak, ze si smaze stavajici partisny a je nastvany,
co ze to je za hrozny OS, ktery mu smazal data na PC.
Samozrejme svetle vyjimky se najdou.
Psal jsem tady něco o pocitovém zpomalení boxu, nic o tom, že ten script nefunguje nebo funguje špatně. Ano, úpravou jediného parametru jsem se dostal někam jinam a script zatím nechám v boxu a uvidím, jak se bude chovat nadále. To je k těm prvním dvěma větám.

Ten zbytek je akorát základ pro flame, který tady není potřeba rozdmýchávat. :107:


AZBox Elite HD, E2 RC4, Skylink, CSlink, atd.
zbyneksk Czech Republic
Mírně pokročilý
Mírně pokročilý
Příspěvky: 294
Registrován: 06 kvě 2009, 22:18
Bydliště: Doma
Dal poděkování: 2 poděkování
Kontaktovat uživatele:

Re: New_Priority_Script_V.1.1

Příspěvek od zbyneksk »

Ano, jsem rad ze se najdou i ti kterym obcas nekdy neco ulehci zivot.
O.T. Vsak pisu, ze se najdou i svetle vyjimky ...


Uživatelský avatar
monkus Slovakia
V.I.P.
V.I.P.
Příspěvky: 1289
Registrován: 05 kvě 2009, 14:41
Dal poděkování: 4 poděkování
Kontaktovat uživatele:

Re: New_Priority_Script_V.1.1

Příspěvek od monkus »

ja som s unixami tiez zacinal systemom, ze som si par krat odmazal vsetko :-) este stastie, ze som v tom case nebol vlastnikom dat, ktore by mali nejaku hodnotu :-)

inak, na skusanie je vhodny virtualizacny software typu virtualbox resp. vmware ...


dreambox dm-800 hd se, dm-525 hd
zbyneksk Czech Republic
Mírně pokročilý
Mírně pokročilý
Příspěvky: 294
Registrován: 06 kvě 2009, 22:18
Bydliště: Doma
Dal poděkování: 2 poděkování
Kontaktovat uživatele:

Re: New_Priority_Script_V.1.1

Příspěvek od zbyneksk »

monkus píše:ja som s unixami tiez zacinal systemom, ze som si par krat odmazal vsetko :-) este stastie, ze som v tom case nebol vlastnikom dat, ktore by mali nejaku hodnotu :-)
...
Tak vidim, ze to nebylo jen u mne :D


Uživatelský avatar
Mate Czech Republic
Nováček
Nováček
Příspěvky: 73
Registrován: 17 dub 2009, 11:49

Re: New_Priority_Script_V.1.1

Příspěvek od Mate »

v 1.3

Kód: Vybrat vše

PRIORITY MANAGER V1.3 BY BUYUKBANG

I'm very tired of all coding, testing and bug fixing process, I can have a rest now.




PLEASE READ "INSTALLATION" AND "IMPORTANT NOTES" SECTIONS BEFORE ASKING OR COMPLAINING ABOUT SOMETHING!, THANKS....


DESCRIPTION:
------------------------------------------------------------------------------------------
This plugin is written by BUYUKBANG to improve total performance of Azbox HD !
Here is the short list of jobs Priority Manager does:

1. Priority Manager 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 prepared a bug-free (hopefully) and complex
logic to cover all possible usage cases.

2. Priority Manager provides power saving! Smudger's power measurements show that
Priority Manager decrease power consumption of the box from 25W to 23W while watching an
SD channel and from 28W to 24W while watching an HD channel.

3. Priority Manager optionally automatically mounts CIF and NFS shares when remote server
is online and automatically unmounts CIF AND NFS shares when remote server is offline, so
protects file manager from freezes when remote goes offline after the shares mounted.

4. Priority Manager optionally creates swap file on your HDD/Flash disk which will help
RAM by caching some part of the memory. Priority Manager not only supports creating swap
file on internal HDD or usb HDD/Flash disk connected before Azbox boots, it also supports
creating swap file on usb HDD/Flash disk connected after Azbox boots by continuously
checking for new USB devices.

5. Priority Manager can execute user selected programs after going into SLEEP mode and
the kill them after return from SLEEP mode. By using this feature running resource
intensive programs like transmission, aMule, azepgmgr in only SLEEP mode will be
automatically managed without user intervention.

6. Priority Manager increases internal storage (DOM) speed speed up to 20% by changing
its working parameters.

7. Priority Manager provides "Deep Sleep Mode" which automatically kills all unnecessary
applications and improve downloading speed when box goes to sleep mode.


SPECIAL THANKS TO:
------------------------------------------------------------------------------------------
Smudger for the all information, tests and power measurements, his tests killed the bugs!

Kanber Kav for his permission for the usage and modification of his Multicas Info plugin
and for the idea of increasing internal storage (DOM) speed!


HISTORY:
------------------------------------------------------------------------------------------
v1.3
-----
NEW : Packed the script as a plugin. You can look at the script logs, activate,
deactivate, restart the script simply from Plugins Menu without having to use TELNET.
Special thanks to Kanber Kav for his permission for the usage and modification of his
Multicas Info plugin!

NEW : Increasing internal storage (DOM) speed up to 20% by changing its working
parameters! (Thanks to Kanber Kav for the idea!)

NEW : Full automated cleanup mechanism: After deleting this plugin from Plugins Menu,
Priority Manager will be deactivated and process will be stopped, all installed files and
log file will be deleted, all process priorities will be set to their default values. No
reboot or user intervention needed!

NEW : Reserved programs are now supported. When a scheduled recording starts, TV
prioritization will be applied until it ends.

NEW : CIF mount support for those who want want to mount CIF shares of your network to
Azbox. (auto-mounts shares when the file server is online, auto-unmounts share when the
file server is offline)

NEW : NFS mount support for those who want want to mount NFS shares of your network to
Azbox. (auto-mounts shares when the file server is online, auto-unmounts share when the
file server is offline)

NEW : Swap file support for Azbox. You can activate this option so that to Priority
Manager creates swap file on your HDD or Flash disk which will help RAM by caching some
part of the memory. Swap usage file helps large file operations like recording.

NEW : "Deep Sleep" option. You can activate this option if you want to kill all
unnecessary applications when box goes to sleep mode to improve downloading speed. There
are some side effects of deep sleep. For more information please read DEEP_SLEEP section
of settings.txt .

NEW : Automatic management of execution and killing of sleep mode programs. Priority
Manager can execute user selected programs after going into SLEEP mode and the kill them
after return from SLEEP mode with the new feature. For more information please read
PROGRAM section of settings.txt .

NEW : CCcam EMU prioritization. (Thanks to Smudger for the information!)

NEW : NewCS EMU prioritization. (Thanks to Smudger for the information!)

NEW : Transmission (torrent client) sleep mode prioritization.

NEW : aMule (eD2K client) sleep mode prioritization.

NEW : Verbose log generation for debugging added. Please read "IMPORTANT NOTES - 4" for more information.

NEW : Better TV recording and channel switch speed.

NEW : Better performance for some process priorities.

NEW : All settings are moved from script file to a separate file : settings.txt

FIX : "CANCEL" option in sleep menu is now detected as it should be.

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

INSTALLATION:
------------------------------------------------------------------------------------------
1. Extract PriorityManager.plugin and plugins.lst files from the archive file.

2. Copy PriorityManager.plugin and plugins.lst to USB or simply transfer them by FTP to
/tmp folder of your Azbox.

3. Enter Plugins menu, press Red Button on remote controller to add plugin. If you're
using USB select to install it from USB, or if you transferred files to /tmp folder
install it from tmp folder.

4. Check user defined parameters in /PLUGINS/PriorityManager/settings.txt and edit
parameters if you want, save the file.

5. Activate plugin from the plugins menu: PLUGINS-->PriorityManager-->Activate/Reactivate

6. After the first run of the script standby.sh and wakeup.sh scripts will be created
under /DISK2/etc . These scripts will help to main script for the decision of the sleep
mode by creating and deleting a file ( /tmp/PriorityManager_Sleep ) If you have already
standby.sh and wakeup.sh in /DISK2/etc, they will be backed up by installation process
in the same directory. Then you may want to manually add below commands to scripts
before running Priority Manager:
echo 0 > /tmp/PriorityManager_Sleep = to standby.sh
rm /tmp/PriorityManager_Sleep = to wakeup.sh


IMPORTANT NOTES:
------------------------------------------------------------------------------------------
1. Priority Manager script works in a loop with 30 seconds sleep times. So wait max 30
seconds for prioritization. You can decrease this to 15-20 secs if you want, but values
below 10 may cause a small performance loss.

2. A looped script in /DISK2/etc/start.d/ will block the other scripts with a higher
heading value. So do not use any looped script. This is the reason why I used "99" in the
script name. This will not block any script with two digits but will block scripts with
higher values as heading value.

3. Please do not use any folder in HDD to mount shares. This will cause HDD not to sleep
because of continuous folder checks by Priority Manager. Even without Priority Manager,
it's not recommended, since share access always triggers HDD. Instead I would recommend
you to use folders in internal storage (DOM). If you need to access this mounts directly
from Menus (under main directories of Video, Music, Picture), you can use symlinks
created under HDD pointing mount folders in DOM.

4. If you have any problems with Priority Manager, change VERBOSE_MODE=1 in settings.txt
and reactivate Priority Manager from PLUGINS-->PriorityManager-->Activate/Reactivate.
This will create a verbose log file /PLUGINS/PriorityManager/PriorityManager_Verbose_Log
Collect data with this option set to 1, without stopping, restarting, reactivating and
deactivating Priority Manager, because all this operations will delete all old log files.
Then send an e-mail to author (you can find my e-mail adress in readme.txt) containing
PriorityManager_Verbose_Log with the approximate time that problem occured. Don't forget
to reset VERBOSE_MODE=0 and restart priority manager or logfile size will continuously
increase which may cause internal storage (DOM) to run out of disk space.


Nemáte oprávnění prohlížet přiložené soubory.


19.2 E | 23.5 E | 28.2 E | 1.0 W | AZ Elite (vzdy posledni FW) + Xtreamer eTRAYz 1TB (Samsung F1) | LCD Philips 47PFL7642D/12 | LCD Funai LT7-M32BB
Uživatelský avatar
hitman222
Mírně pokročilý
Mírně pokročilý
Příspěvky: 447
Registrován: 26 čer 2009, 09:23

Re: New_Priority_Script_V.1.1

Příspěvek od hitman222 »

Testoval to uz nekdo?


Dream800 HDse_OpenPli
Vu+Solo2_OpenPli
Cloud-ibox3_OpenPli
Dreambox 7020,Dreambox 500
Samsung UE46ES8000
A-DATA NH92 Slim HDD 2.5" 320GB - modrý (blue), 12mm, USB2.0, 5400ot, ANH92-320GU-RBL,
motor SG2100(SKY Link)
Odpovědět

Zpět na „AzBox HD diskuze“