Skip to content

Commit

Permalink
Merge pull request #25 from angelabriel/master
Browse files Browse the repository at this point in the history
Final changes from the tests of our Alliance team
  • Loading branch information
angelabriel authored Jun 28, 2019
2 parents eaff09f + 1cc3fd6 commit 9a24c2b
Show file tree
Hide file tree
Showing 21 changed files with 1,313 additions and 891 deletions.
1,068 changes: 593 additions & 475 deletions main.go

Large diffs are not rendered by default.

330 changes: 204 additions & 126 deletions ospackage/man/saptune-migrate.7

Large diffs are not rendered by default.

30 changes: 25 additions & 5 deletions ospackage/man/saptune-note.5
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
.\" */
.\"

.TH "saptune-note" "5" "May 2019" "" "saptune note file format description"
.TH "saptune-note" "5" "June 2019" "" "saptune note file format description"
.SH NAME
saptune\-note - Note definition files for saptune version \fB2\fP
.SH DESCRIPTION
Expand All @@ -39,12 +39,30 @@ version, block, cpu, grub, limits, login, mem, pagecache, reminder, rpm, service
See detailed description below:
\" section version - Mandatory
.SH "[version]"
This section is a mandatory section and is used to display version, description and last change date of the underlying Note during saptune option 'list'.
This section is a mandatory section and is used to display version, description and last change date of the underlying Note during saptune action 'list'.

Syntax:
.br
.nf
.B # <prefix>NOTE=<noteId> CATEGORY=<category> VERSION=<versionNo> DATE=<release date of used note and related values> NAME="<description of the note>"

Example:
.br
# VIP-NOTE=vip1 CATEGORY=VIP VERSION=5 DATE=16.04.2019 NAME="VIP: this is VIP Note 1, which contains Very Important Parameters"

All fields are separated by spaces. But please do not use spaces around the equal operator (=) of the fields. And please do not change the order of the fields.

The <noteId> must be a text string without spaces, which will be used as the unique identifier of this Note definition. It will be displayed during the action 'saptune note list' and used for all other actions, where the NoteID is needed as parameter.

The CATEGORY is for future use. So we do not have defined CATEGORIES at the moment. It must be a text string without spaces.

VERSION is a number that should indicate how many changes are done for this Note definition in the past. Only digits are allowed.

DATE is the date of the last changes.

NAME is the description of the Note, which will be displayed during the action 'saptune note list'
.br
Attention: The note description from the field NAME must be placed in double quotes even if there are no spaces used inside the description.
\" section block
.SH "[block]"
The section "[block]" can contain the following options:
Expand All @@ -66,7 +84,7 @@ When set, the number of requests for \fBall\fP block devices on the system will
.SH "[cpu]"
The section "[cpu]" manipulates files in \fI/sys/devices/system/cpu/cpu*\fP.
.br
This section can contain the following options:
This section can only contain the following options:
.TP
.BI energy_perf_bias= STRING
Energy Performance Bias EPB (applies to Intel-based systems only)
Expand Down Expand Up @@ -145,7 +163,7 @@ This section has to contain the following option:
.br
where STRING is a list of valid limit definitions separated by '\fB,\fP'
.br
a valid limit definition contains the fields 'domain item type value' separated by space
a valid limit definition contains the fields 'domain item type value' separated by one space
.br
For more information about the syntax of valid limit definitions please refer to limits.conf(5) or the comment section of \fI/etc/security/limits.conf\fP.
.br
Expand All @@ -158,7 +176,7 @@ To leave only \fBsome\fP of the limits definitions of a Note definition file 'un
.SH "[login]"
The section "[login]" manipulates the behaviour of the systemd login manager.
.br
This section can to contain the following option:
This section can \fBonly\fP contain the following option:
.TP
.BI UserTasksMax= STRING
This option configures a parameter of the systemd login manager. It sets the maximum number of OS tasks each user may run concurrently. The behaviour of the systemd login manager was changed starting SLES12SP2 to prevent fork bomb attacks.
Expand Down Expand Up @@ -272,6 +290,8 @@ For the service \fBuuidd.socket\fP only '\fBstart\fP' is a valid value, because
Concerning \fBsysstat.service\fP please be in mind: A running sysstat service can effect the system performance. But if there are real performance trouble with the SAP system, SAP service normally orders the sysstat reports collected in /var/log/sa.
.br
See sar(1), sa2(8), sa1(8) for more information

If a service is enabled or disabled by default or admin choice, saptune will NOT disable or enable this service. It will only start/stop the service. If such a service is started by systemd during a system reboot \fBafter\fP the start of tuned.service it will be possible that a service is stopped/running even if it was started/stopped by saptune.
\" section sysctl
.SH "[sysctl]"
The section "[sysctl]" can be used to modify kernel parameters. The parameters available are those listed under /proc/sys/.
Expand Down
9 changes: 6 additions & 3 deletions ospackage/man/saptune.8
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\"/*
.\" * Copyright (c) 2017-2019 SUSE LLC.
.\" * All rights reserved
.\" * Authors: Howard Guo, Angela Briel
.\" * Authors: Soeren Schmidt, Angela Briel
.\" *
.\" * This program is free software; you can redistribute it and/or
.\" * modify it under the terms of the GNU General Public License
Expand All @@ -14,14 +14,17 @@
.\" * GNU General Public License for more details.
.\" */
.\"
.TH saptune "8" "May 2019" "" "System Optimisation For SAP"
.TH saptune "8" "June 2019" "" "System Optimisation For SAP"
.SH NAME
saptune \- Comprehensive system optimisation management for SAP solutions

.SH DESCRIPTION
saptune has been improved to much more better adapt the needs of an SAP environment. So at the moment we will support 2 versions of saptune.

We now have our good old version 1 of saptune, which is now deprecated and will be removed with the next release. It's available for compatibility reasons and to give the admin the ability to smoothly migrate his SAP system tunings to the new settings demanded by SAP. To get the man page for the version 1 of saptune please use saptune_v1(8).
We now have our good old version 1 of saptune, which is now deprecated and will be removed with SLE15SP2, but will be kept in SLE12. It's available for compatibility reasons and to give the admin the ability to smoothly migrate his SAP system tunings to the new settings demanded by SAP. saptune version 1 will ONLY get bug fixing, but NO new notes, parameters or value changes.
.br
To get the man page for the version 1 of saptune please use saptune_v1(8).
.br
To get more information about the migration path from saptune version 1 to saptune version 2 please see saptune-migrate(7)

Our new improved saptune version 2 and the new configuration possibilities and syntax are described in saptune_v2(8).
Expand Down
36 changes: 21 additions & 15 deletions ospackage/man/saptune_v2.8
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\"/*
.\" * Copyright (c) 2017-2019 SUSE LLC.
.\" * All rights reserved
.\" * Authors: Howard Guo, Angela Briel
.\" * Authors: Soeren Schmidt, Angela Briel
.\" *
.\" * This program is free software; you can redistribute it and/or
.\" * modify it under the terms of the GNU General Public License
Expand All @@ -14,7 +14,7 @@
.\" * GNU General Public License for more details.
.\" */
.\"
.TH saptune "8" "May 2019" "" "System Optimisation For SAP"
.TH saptune "8" "June 2019" "" "System Optimisation For SAP"
.SH NAME
saptune \- Comprehensive system optimisation management for SAP solutions (\fBVersion 2\fP)

Expand Down Expand Up @@ -154,6 +154,18 @@ If a Note definition contains a '\fB[reminder]\fP' section, this section will be
.B customise
This allows to customize the values of the saptune Note definitions. The Note definition file will be copied from \fI/usr/share/saptune/notes\fP or \fI/etc/saptune/extra\fP to the override location at \fI/etc/saptune/override\fP, if the file does not exist already. After that an editor will be launched to allow changing the Note definitions.
The editor is defined by the \fBEDITOR\fP environment variable. If not set editor defaults to /usr/bin/vim.

You can only change the value from already available parameters of the note. But you are not able to add new parameters.

If you want to use new parameters to tune the system, please create your own custom Note definition file in \fI/etc/saptune/extra\fP.

You can prevent a parameter from being changed by leaving the parameter value in the override file empty. The parameter will be marked as 'untouched' in the override column of the verify table.

The values from the override files will take precedence over the values from \fI/usr/share/saptune/notes\fP or \fI/etc/saptune/extra\fP. In such case you will not lose your customized Notes between saptune or vendor updates.
.br
The saptune options 'list', 'verify' and 'simulate' will mark the existence of an override file and the contained values.

When creating an override file for an already applied SAP Note definition, please do a 'revert all' and then apply the Notes again, to get the changes take effect.
.TP
.B create
This allows to create own Note definition files in \fI/etc/saptune/extra\fP. The Note definition file will be created from a template file into the location \fI/etc/saptune/extra\fP, if the file does not exist already. After that an editor will be launched to allow changing the Note definitions.
Expand All @@ -178,7 +190,11 @@ It's not possible to combine solutions, there can only be\fBone\fP solution enab
Apply optimisation settings recommended by the SAP solution. These settings will be automatically activated upon system boot if the daemon is enabled.
.TP
.B list
List all SAP solution names that saptune is capable of implementing. The marked ones are currently implemented.
List all SAP solution names that saptune is capable of implementing.
.br
The currently implemented solution is marked with '\fB*\fP' and is highlighted with green color. A deprecated solution is marked with '\fBD\fP'.
.br
If an \fBoverride\fP file exists for a solution, the solution is marked with '\fBO\fP'.
.TP
.B simulate
Show all notes that are associated with the specified SAP solution, and all changes that will be applied once the solution is activated.
Expand Down Expand Up @@ -207,7 +223,7 @@ Will display the syntax of saptune
.SH VENDOR SUPPORT
To support vendor or customer specific tuning values, saptune supports 'drop-in' files residing in \fI/etc/saptune/extra\fP. All files found in \fI/etc/saptune/extra\fP are listed when running '\fBsaptune note list\fP'. All \fBnote options\fP are available for these files.

We simplify the file name syntax for these vendor files. But the old file names still valid and supported.
We simplified the file name syntax for these vendor files. But the old file names are still valid and supported.
.br
Related to this we add 'header' support (see description of section [version] in saptune-note(5)) for the vendor files as already available for the Note definition files in /usr/share/saptune/notes to get a proper description during saptune option 'list'

Expand Down Expand Up @@ -263,16 +279,6 @@ the saptune Note definition override location.
If you need to customize the Note definitions found in \fI/usr/share/saptune/notes\fP or \fI/etc/saptune/extra\fP, you can copy them to \fI/etc/saptune/override\fP and modify them as you need. Please stay with the original name of the Note definition (the NoteID) and do \fBNOT\fP rename it.

Or use '\fBsaptune note customize NoteID\fP' to do the job for you.

You can only change the value from already available parameters of the note. But you are not able to add new parameters. If you want to use new parameters to tune the system, please create your own custom Note definition file in \fI/etc/saptune/extra\fP.

You can prevent a parameter from being changed by leaving the parameter value in the override file empty. The parameter will be marked as 'untouched' in the override column of the verify table.

The values from the override files will take precedence over the values from \fI/usr/share/saptune/notes\fP or \fI/etc/saptune/extra\fP. In such case you will not lose your customized Notes between saptune or vendor updates.
.br
The saptune options 'list', 'verify' and 'simulate' will mark the existence of an override file and the contained values.

When creating an override file for an already applied SAP Note definition, please do a 'revert all' and then apply the Notes again, to get the changes take effect.
.RE
.PP
\fI/usr/share/saptune/solutions\fP
Expand Down Expand Up @@ -310,4 +316,4 @@ saptune-note(5) saptune-migrate(7) saptune(8) saptune_v1(8) tuned(8) tuned-adm(8

.SH AUTHOR
.NF
Howard Guo <hguo@suse.com>, Angela Briel <[email protected]>
Soeren Schmidt <soeren.schmidt@suse.com>, Angela Briel <[email protected]>
104 changes: 104 additions & 0 deletions ospackage/usr/share/doc/packages/saptune/sapconf2saptune.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@

.TH sapconf2saptune 1 "March 2019" "1.0" "sapconf configuration conversion"

.SH NAME
sapconf2saptune \- converts a sapconf configuration into a saptune v2 configuration
.SH SYNOPSIS
.B sapconf2saptune \fB
[
.IR PROFILE
]

.B sapconf2saptune \fB
.IR SAPCONF_SYCONFIG
.IR TUNED_CONFIG

.B sapconf2saptune\fB
-h|--help
.SH DESCRIPTION
The tool sapconf2saptune converts a sapconf configuration into a drop-in file for saptune v2 to aid a move from sapconf to saptune.

The tool expects either the sapconf sysconfig file as first and the sapconf tuned.conf as second parameter or the sapconf profile.
Without any parameters sapconf2saptune tries to determine the sapoconf profile by reading '/etc/tuned/active_profile'.

The generated saptune configuration is printed on stdout.
To use it, redirect the output to a file which has to be placed into '/etc/saptune/extra/' (See EXAMPLES below).
The new configuration should be visible by 'saptune note list' and is ready to use.

During conversion the tool is writing information, warning and error messages to stderr. This is the case for:

\(bu Problems reading the configuration files.
\(bu Possible wrong configuration files.
\(bu Unknown variables or options. This indicates manual added configurations typically.
\(bu Data type conversion issues. This would indicate a broken sapconf/tuned configuration.
\(bu Parameters not supported by saptune. This is the case for min_perf_pct.

.TP
.B PROFILE \fB
The saponf profile to convert.
.TP
.B SAPCONF_SYCONFIG \fB
Path to the sapconf sysconfig file, usually /etc/sysconfig/sapconf.
.TP
.B TUNED_CONFIG \fB
Path to the tuned.conf file of a sapconf proifle. Usually this is /usr/lib/tuned/<profile>/tuned.conf or /etc/tuned/<profile>/tuned.conf.
.TP
.B -h|--help \fB
Displays some help information.

.SH IMPORTANT
Please notice:
.IP \[bu] 2
A current sapconf has to be used! If this is not the case, update first!
.IP \[bu]
The sapconf configuration has to be correct! Please verify /etc/sysconfig/sapconf and the used tuned.conf. Also check the logs of sapconf (/var/log/sapconf.log) and tuned (/var/log/tuned/). Keep in mind that there can be an override file '/etc/tuned/<profile>/tuned.conf!
.IP \[bu]
Double-check your sapconf configuration and the converted result. sapconf2saptune is a simple conversion tool and does
\(bu no checks for multiple parameters,
\(bu no checks for the sanity of values,
\(bu no checks to detect any misconfguration,
\(bu not convert manual added parameters.
.IP \[bu]
Read the info, warn and error messages printed on stderr during conversion.
.IP \[bu]
min_perf_pct is not supported by saptune and is not moved.
.IP \[bu]
Use the generated configuration as the only note for saptune! Combine them with others
.B *ONLY IF YOU KNOW WHAT YOU ARE DOING*\fB
!
.SH EXIT STATUS
On success, 0 is returned, 1 otherwise. The error messages on stderr should tell the cause.
.SH EXAMPLE
To convert a configuration on SLES 15 (no tuned overwrite configuration):

.RS
.B sapconf2saptune /etc/sysconfig/sapconf /usr/lib/tuned/sapconf/tuned.conf
.RE

To convert a configuration (sap-hana profile) on SLES 12 (no tuned overwrite configuration):

.RS
.B sapconf2saptune /etc/sysconfig/sapconf /usr/lib/tuned/sap-hana/tuned.conf
.RE

Convert and write the configuration to an extra file for saptune.

.RS
.B sapconf2saptune /etc/sysconfig/sapconf /usr/lib/tuned/sap-hana/tuned.conf > /etc/saptune/extra/sapconf.conf
.RE
.SH FILES
.TP
.B /etc/sysconfig/sapconf \fB
Main configuration file for sapconf.
.TP
.B /usr/lib/tuned/<profile>/tuned.conf, /etc/tuned/<profile>/tuned.conf \fB
The tuned configuration. Either the default configuration ('/usr/lib/tuned') or the overwrite file ('/etc/tuned/') is used!
.TP
.B /etc/tuned/active_profile \fB
Current tuned profile. Used by sapconf2saptune to determine the used sapconf profile.
.SH SEE ALSO
sapconf(8), sapconf(5), sapconf(7), saptune(8)
.SH BUGS
No known bugs.
.SH AUTHOR
Sören Schmidt <[email protected]>
6 changes: 3 additions & 3 deletions ospackage/usr/share/saptune/notes/2205917
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# 2205917 - SAP HANA DB: Recommended OS settings for SLES 12 / SLES for SAP Applications 12
# Description: HANA DB settings
# Version 50 from 10.09.2018 in English
# Version 57 from 23.04.2019 in English

[version]
# SAP-NOTE=2205917 CATEGORY=HANA VERSION=42 DATE=02.03.2018 NAME="SAP HANA DB: Recommended OS settings for SLES 12 / SLES for SAP Applications 12"
# SAP-NOTE=2205917 CATEGORY=HANA VERSION=57 DATE=23.04.2019 NAME="SAP HANA DB: Recommended OS settings for SLES 12 / SLES for SAP Applications 12"

[login]
# /etc/systemd/logind.conf.d/saptune-UserTasksMax.conf UserTasksMax setting
Expand Down Expand Up @@ -116,7 +116,7 @@ glibc 12-SP2 2.22-51.6
systemd 12-SP2 228-142.1
sapinit-systemd-compat 12 1.0-2.1
sapinit-systemd-compat 12-SP1 1.0-2.1
libopenssl1_0_0 12-SP4 1.0.2n-3.3.1
libssh2-1 12-SP4 1.4.3-20.3.1

[grub]
# /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT
Expand Down
Loading

0 comments on commit 9a24c2b

Please sign in to comment.