Ticket #933: boinc-client.patch
File boinc-client.patch, 1.8 KB (added by , 15 years ago) |
---|
-
boinc-client
old new 27 27 BOINC_USER=boinc 28 28 BOINC_DIR=/var/lib/boinc-client 29 29 BOINC_CLIENT=/usr/bin/boinc 30 BOINC_OOM_ADJ=15 30 31 31 32 # Source defaults file. Edit that file to configure this script. 32 33 if [ -e /etc/default/boinc-client ]; then … … 121 122 fi 122 123 fi 123 124 125 children=`ps --ppid $pid -o pid= | tr '\n' ' '` 126 124 127 if [ ! -x "`which schedtool 2>/dev/null`" ]; then 125 128 log_progress_msg "schedtool not found" 126 129 else 127 children=`ps --ppid $pid -o pid= | tr '\n' ' '`128 130 (schedtool -n 19 -D $pid $children >/dev/null \ 129 131 && log_progress_msg "idleprio") || \ 130 132 (schedtool -n 19 -B $pid $children >/dev/null \ … … 132 134 (schedtool -n 19 -N $pid $children >/dev/null \ 133 135 && log_progress_msg "normal") 134 136 fi 137 138 for BPID in ${pid} ${children}; do echo ${BOINC_OOM_ADJ} > /proc/${BPID}/oom_adj; echo; done 135 139 fi 136 140 log_end_msg 0 137 141 } … … 141 145 STATUS="Status of $DESC:" 142 146 if is_running; then 143 147 log_success_msg "$STATUS running." 148 149 children=`ps --ppid $pid -o pid= | tr '\n' ' '` 144 150 if [ -x "`which schedtool 2>/dev/null`" ]; then 145 151 log_success_msg "Scheduling of $DESC:" 146 152 schedtool $pid 147 153 148 children=`ps --ppid $pid -o pid= | tr '\n' ' '`149 154 if [ -n "$children" ]; then 150 155 log_success_msg "Scheduling of $DESC's children:" 151 156 schedtool $children 152 157 fi 153 158 fi 154 159 160 log_success_msg "OOM killer status for $DESC:" 161 for BPID in ${pid} ${children}; do echo PID ${BPID}: adj `cat /proc/${BPID}/oom_adj`, score `cat /proc/${BPID}/oom_score`; done 162 155 163 # Display $BOINC_USER's cpu_share: 156 164 uid=`id -u $BOINC_USER` 157 165 cpu_share_file="/sys/kernel/uids/$uid/cpu_share"