Skip to content

Commit

Permalink
Get tuned setting from a command.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvalinrh committed Jun 10, 2024
1 parent eb09dbd commit f4bfd0e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
21 changes: 10 additions & 11 deletions general_setup
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,8 @@ to_sysname=`hostname`
to_pstats="default"
to_no_pkg_install=0

if [ -f /usr/sbin/tuned-adm ]; then
tval=`/usr/sbin/tuned-adm active|awk '{print $4}'`
if [[ $tval == "profile." ]]; then
tval=tuned_none
fi
else
tval="tuned_none"
fi

to_tuned_setting=$tval
top_dir=`echo $0 | sed "s/workloads/:/g" | cut -d':' -f 1`
to_tuned_setting=`${top_dir}/test_tools/get_tuned_setting`

i=1
j=$#
Expand Down Expand Up @@ -174,7 +166,14 @@ do
;;
--tuned_setting)
i=$((i + 2))
to_tuned_setting="${value}"
if [[ $value != "none" ]]; then
to_tuned_setting="${value}"
if [ -f /usr/sbin/tuned-adm ]; then
tuned-adm active ${value}
else
echo Warning: asking for tuned setting $value, but tuned-adm is not installed.
fi
fi
shift 2
;;
--usage)
Expand Down
10 changes: 10 additions & 0 deletions get_tuned_setting
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
if [ -f /usr/sbin/tuned-adm ]; then
tval=`/usr/sbin/tuned-adm active|awk '{print $4}'`
if [[ $tval == "profile." ]]; then
tval=tuned_none
fi
else
tval="tuned_none"
fi
echo $tval

0 comments on commit f4bfd0e

Please sign in to comment.