Skip to content

Commit 4c5decb

Browse files
committed
Add new sadc_options variable to configure script
Add a new variable (sadc_options) used by the configure script. This option enables the user to enter parameters that will be passed to sadc in the sa1 script. This can typically be used to select optional activities that should be collected by sadc. Signed-off-by: Sebastien GODARD <[email protected]>
1 parent 33b0ce6 commit 4c5decb

File tree

5 files changed

+58
-6
lines changed

5 files changed

+58
-6
lines changed

build/sadc_options

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
Options to be passed to sadc. This is typically used to tell sadc
3+
which optional activities should be collected.
4+
A possible answer here could be for example "-S DISK,POWER" (without
5+
the quotation marks) to tell sadc to collect data for block devices
6+
and power management statistics. Read sadc(8) manual page to know
7+
all the possible options accepted by sadc.
8+
You can also skip this question by pressing only the return key. In
9+
this case, sadc will collect only standard activities.
10+

configure

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,8 @@ CRON_INTERVAL
634634
SU_C_OWNER
635635
CRON_OWNER
636636
COPY_ONLY
637+
SADC_OPT
638+
sadc_options
637639
cron_interval
638640
cron_owner
639641
INSTALL_CRON
@@ -765,7 +767,8 @@ compressafter
765767
prealloc
766768
man_group
767769
cron_owner
768-
cron_interval'
770+
cron_interval
771+
sadc_options'
769772

770773

771774
# Initialize some variables set by options.
@@ -1419,6 +1422,8 @@ Some influential environment variables:
14191422
cron_owner crontab owner
14201423
cron_interval
14211424
crontab interval
1425+
sadc_options
1426+
options to be passed to sadc
14221427
14231428
Use these variables to override the choices made by `configure' or to help
14241429
it to find libraries and programs with nonstandard names/locations.
@@ -4871,6 +4876,7 @@ echo .
48714876
# man_group group for man pages
48724877
# cron_owner crontab owner
48734878
# cron_interval crontab sampling interval
4879+
# sadc_options options to be passed to sadc
48744880
#
48754881
# Fine tuning the installation directories:
48764882
# --mandir=DIR man documentation directory [PREFIX/man]
@@ -5276,6 +5282,18 @@ fi
52765282
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $AUX_COLL" >&5
52775283
$as_echo "$AUX_COLL" >&6; }
52785284
5285+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking options to be passed to sadc" >&5
5286+
$as_echo_n "checking options to be passed to sadc... " >&6; }
5287+
5288+
if test x"$sadc_options" != x""; then
5289+
SADC_OPT="$sadc_options"
5290+
else
5291+
SADC_OPT=
5292+
fi
5293+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SADC_OPT" >&5
5294+
$as_echo "$SADC_OPT" >&6; }
5295+
5296+
52795297
# Check whether files should only be copied
52805298
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether files should only be copied" >&5
52815299
$as_echo_n "checking whether files should only be copied... " >&6; }

configure.in

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ echo .
151151
# man_group group for man pages
152152
# cron_owner crontab owner
153153
# cron_interval crontab sampling interval
154+
# sadc_options options to be passed to sadc
154155
#
155156
# Fine tuning the installation directories:
156157
# --mandir=DIR man documentation directory [PREFIX/man]
@@ -491,6 +492,16 @@ if test $INSTALL_CRON = "y"; then
491492
fi
492493
AC_MSG_RESULT($AUX_COLL)
493494

495+
AC_MSG_CHECKING(options to be passed to sadc)
496+
AC_ARG_VAR([sadc_options],[options to be passed to sadc])
497+
if test x"$sadc_options" != x""; then
498+
SADC_OPT="$sadc_options"
499+
else
500+
SADC_OPT=
501+
fi
502+
AC_MSG_RESULT($SADC_OPT)
503+
AC_SUBST(SADC_OPT)
504+
494505
# Check whether files should only be copied
495506
AC_MSG_CHECKING(whether files should only be copied)
496507
AC_ARG_ENABLE(copy-only,

iconfig

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,14 @@ then
144144
fi
145145
fi
146146

147+
if [ "${CRON}" != "" -a "${COLL_ALL}" != "y" ];
148+
then
149+
# Optional args for sadc
150+
SADC_OPT=`${ASK} 'Options to be passed to sadc:' "sadc_options" "sadc_options"`
151+
else
152+
SADC_OPT=
153+
fi
154+
147155
if [ "${CRON}" != "" ];
148156
then
149157
# rc directory
@@ -211,12 +219,17 @@ else
211219
fi
212220

213221
echo
214-
echo "./configure ${PREFIX}${SA_LIB_DIR}${SA_DIR}${SYSCONFIG_DIR}${CLEAN_SA_DIR}${NLS} \
215-
${YESTERDAY}${HISTORY}${COMPRESSAFTER}${PREALLOC_ANSWER}${MAN}${IGNORE_FILE_ATTR}${CRON}${RCDIR} \
216-
${COMPRESSMANPG}${INSTALL_DOC}${DEBUGINFO}${INSTALL_ISAG}${SENSORS}${STRIP}${COPY_ONLY}"
222+
echo -n "./configure ${PREFIX}${SA_LIB_DIR}${SA_DIR}${SYSCONFIG_DIR}${CLEAN_SA_DIR}${NLS} \
223+
${YESTERDAY}${HISTORY}${COMPRESSAFTER}${PREALLOC_ANSWER}${MAN}${IGNORE_FILE_ATTR}${CRON}${RCDIR}"
224+
if [ "${SADC_OPT}" != "" ];
225+
then
226+
echo -n "sadc_options=\"${SADC_OPT}\""
227+
fi
228+
echo "${COMPRESSMANPG}${INSTALL_DOC}${DEBUGINFO}${INSTALL_ISAG}${SENSORS}${STRIP}${COPY_ONLY}"
217229
echo
218230

219231
./configure ${PREFIX}${SA_LIB_DIR}${SA_DIR}${SYSCONFIG_DIR}${CLEAN_SA_DIR}${NLS} \
220232
${YESTERDAY}${HISTORY}${COMPRESSAFTER}${PREALLOC_ANSWER}${MAN}${IGNORE_FILE_ATTR}${CRON}${RCDIR} \
221-
${COMPRESSMANPG}${INSTALL_DOC}${DEBUGINFO}${INSTALL_ISAG}${SENSORS}${STRIP}${COPY_ONLY}
233+
sadc_options="${SADC_OPT}" ${COMPRESSMANPG}${INSTALL_DOC}${DEBUGINFO}${INSTALL_ISAG}${SENSORS} \
234+
${STRIP}${COPY_ONLY}
222235

sysstat.sysconfig.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ COMPRESSAFTER=@COMPRESSAFTER@
1010

1111
# Parameters for the system activity data collector (see sadc manual page)
1212
# which are used for the generation of log files.
13-
SADC_OPTIONS="@COLLECT_ALL@"
13+
SADC_OPTIONS="@COLLECT_ALL@ @SADC_OPT@"
1414

1515
# Directory where sa and sar files are saved.
1616
SA_DIR=@SA_DIR@

0 commit comments

Comments
 (0)