File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change 187187 if [[ $value != *"none"* ]]; then
188188 to_tuned_setting="${value}"
189189 if [ -f /usr/sbin/tuned-adm ]; then
190- tuned-adm active ${value}
190+ tuned-adm profile ${value}
191+ if [[ $? -ne 0 ]]; then
192+ echo Warning: Unable to set tuned profile $value.
193+ fi
191194 else
192195 echo Warning: asking for tuned setting $value, but tuned-adm is not installed.
193196 fi
222225if [[ $to_tuned_setting == "" ]]; then
223226 to_tuned_setting=`${TOOLS_BIN}/get_tuned_setting`
224227fi
228+
229+ #
230+ # Get the actual setting of the tuned for future comparison,
231+ # Do not depend on $to_tuned_setting. It might not have set
232+ # properly to start with.
233+ #
234+ which tuned-adm >> /dev/null 2>&1
235+ if [[ $? -ne 0 ]]; then
236+ echo tuned-adm not available > ~/tuned_before
237+ else
238+ tuned-adm active | cut -d: -f 2 | sed "s/ //g" > ~/tuned_before
239+ fi
240+
225241if [[ $to_test_verify_file != "" ]]; then
226242 $TOOLS_BIN/verification --test_cmd $test_cmd --test_name $test_name --verify_file $to_test_verify_file --run_user $to_user --home_parent $to_home_root
227243 exit $?
Original file line number Diff line number Diff line change @@ -172,6 +172,26 @@ mkdir -p ${RESULTS_PATH}
172172
173173copy_file $results $RESULTS_PATH
174174
175+ which tuned-adm >> /dev/null 2>&1
176+ if [[ $? -ne 0 ]]; then
177+ echo tuned-adm not available > ~ /tuned_after
178+ else
179+ tuned-adm active | cut -d: -f 2 | sed " s/ //g" > ~ /tuned_after
180+ fi
181+ diff ~ /tuned_before ~ /tuned_after > $RESULTS_PATH /tuned_setting
182+
183+ if [[ $? -ne -0 ]]; then
184+ echo ' Tuned settings have changed!!!!'
185+ echo Start of run
186+ cat ~ /tuned_before
187+ echo End of run
188+ cat ~ /tuned_after
189+ echo ' Tuned settings have changed!!!!' >> $RESULTS_PATH /tuned_setting
190+ else
191+ echo " Tuned stayed the same." >> $RESULTS_PATH /tuned_setting
192+ fi
193+
194+
175195if [[ $other_files != " " ]]; then
176196 file_list=` echo $other_files | sed " s/,/ /g" `
177197 for i in $file_list ; do
You can’t perform that action at this time.
0 commit comments