actions

package
v0.0.0-...-883cb22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2020 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SaptuneService = "saptune.service"
	SapconfService = "sapconf.service"
	TunedService   = "tuned.service"
)

define constants and variables for the whole package

Variables

View Source
var ExtraTuningSheets = "/etc/saptune/extra/"

ExtraTuningSheets is a directory located on file system for external parties to place their tuning option files.

View Source
var NoteTuningSheets = "/usr/share/saptune/notes/"

NoteTuningSheets is the directory for the sap notes shipped with the satune package

View Source
var OverrideTuningSheets = "/etc/saptune/override/"

OverrideTuningSheets is the directory for the override files

View Source
var RPMDate = "undef"

RPMDate is the date of package build

View Source
var RPMVersion = "undef"

RPMVersion is the package version from package build process

Functions

func DaemonAction

func DaemonAction(actionName, saptuneVersion string, tuneApp *app.App)

DaemonAction handles daemon actions like start, stop, status asm. still available for compatibility reasons

func NoteAction

func NoteAction(actionName, noteID, newNoteID string, tuneApp *app.App)

NoteAction Note actions like apply, revert, verify asm.

func NoteActionApply

func NoteActionApply(writer io.Writer, noteID string, tuneApp *app.App)

NoteActionApply applies Note parameter settings to the system

func NoteActionCreate

func NoteActionCreate(noteID string, tuneApp *app.App)

NoteActionCreate helps the customer to create an own Note definition

func NoteActionCustomise

func NoteActionCustomise(noteID string, tuneApp *app.App)

NoteActionCustomise creates an override file and allows to editing the Note definition file

func NoteActionDelete

func NoteActionDelete(reader io.Reader, writer io.Writer, noteID, noteTuningSheets, extraTuningSheets, ovTuningSheets string, tuneApp *app.App)

NoteActionDelete deletes a custom Note definition file and the corresponding override file

func NoteActionEnabled

func NoteActionEnabled(writer io.Writer, tuneApp *app.App)

NoteActionEnabled lists all enabled Note definitions as list separated by blanks

func NoteActionList

func NoteActionList(writer io.Writer, tuneApp *app.App, tOptions note.TuningOptions)

NoteActionList lists all available Note definitions

func NoteActionRename

func NoteActionRename(reader io.Reader, writer io.Writer, noteID, newNoteID, noteTuningSheets, extraTuningSheets, ovTuningSheets string, tuneApp *app.App)

NoteActionRename renames a custom Note definition file and the corresponding override file

func NoteActionRevert

func NoteActionRevert(writer io.Writer, noteID string, tuneApp *app.App)

NoteActionRevert reverts all parameter settings of a Note back to the state before 'apply'

func NoteActionShow

func NoteActionShow(writer io.Writer, noteID, noteTuningSheets, extraTuningSheets string, tuneApp *app.App)

NoteActionShow shows the content of the Note definition file

func NoteActionSimulate

func NoteActionSimulate(writer io.Writer, noteID string, tuneApp *app.App)

NoteActionSimulate shows all changes that will be applied to the system if the Note will be applied.

func NoteActionVerify

func NoteActionVerify(writer io.Writer, noteID string, tuneApp *app.App)

NoteActionVerify compares all parameter settings from a Note definition against the system settings

func PrintHelpAndExit

func PrintHelpAndExit(writer io.Writer, exitStatus int)

PrintHelpAndExit prints the usage and exit

func PrintNoteFields

func PrintNoteFields(writer io.Writer, header string, noteComparisons map[string]map[string]note.FieldComparison, printComparison bool)

PrintNoteFields Print mismatching fields in the note comparison result. func PrintNoteFields(header string, noteComparisons map[string]map[string]note.FieldComparison, printComparison bool) {

func RevertAction

func RevertAction(writer io.Writer, actionName string, tuneApp *app.App)

RevertAction Revert all notes and solutions

func SelectAction

func SelectAction(stApp *app.App, saptuneVers string)

SelectAction selects the choosen action depending on the first command line argument

func ServiceAction

func ServiceAction(actionName, saptuneVersion string, tApp *app.App)

ServiceAction handles service actions like start, stop, status, enable, disable it controlles the systemd saptune.service func ServiceAction(actionName string, tuneApp *app.App) {

func ServiceActionApply

func ServiceActionApply(tuneApp *app.App)

ServiceActionApply is only used by saptune service, hence it is not advertised to the end user. It is used to tune the system after reboot

func ServiceActionDisable

func ServiceActionDisable()

ServiceActionDisable disables the saptune service

func ServiceActionEnable

func ServiceActionEnable()

ServiceActionEnable enables the saptune service

func ServiceActionRevert

func ServiceActionRevert(tuneApp *app.App)

ServiceActionRevert is only used by saptune service, hence it is not advertised to the end user. It is used to revert all the tuned parameters right before a system reboot

func ServiceActionStart

func ServiceActionStart(enableService bool, tuneApp *app.App)

ServiceActionStart starts the saptune service enable service before start, if enableService is true

func ServiceActionStatus

func ServiceActionStatus(writer io.Writer, tuneApp *app.App, saptuneVersion string)

ServiceActionStatus checks the status of the saptune service

func ServiceActionStop

func ServiceActionStop(disableService bool)

ServiceActionStop stops the saptune service disable service before stop, if disableService is true

func SolutionAction

func SolutionAction(actionName, solName string, tuneApp *app.App)

SolutionAction Solution actions like apply, revert, verify asm.

func SolutionActionApply

func SolutionActionApply(writer io.Writer, solName string, tuneApp *app.App)

SolutionActionApply applies parameter settings defined by the solution to the system

func SolutionActionEnabled

func SolutionActionEnabled(writer io.Writer, tuneApp *app.App)

SolutionActionEnabled prints out the enabled solution definition

func SolutionActionList

func SolutionActionList(writer io.Writer, tuneApp *app.App)

SolutionActionList lists all available solution definitions

func SolutionActionRevert

func SolutionActionRevert(writer io.Writer, solName string, tuneApp *app.App)

SolutionActionRevert reverts all parameter settings of a solution back to the state before 'apply'

func SolutionActionSimulate

func SolutionActionSimulate(writer io.Writer, solName string, tuneApp *app.App)

SolutionActionSimulate shows all changes that will be applied to the system if the solution will be applied.

func SolutionActionVerify

func SolutionActionVerify(writer io.Writer, solName string, tuneApp *app.App)

SolutionActionVerify compares all parameter settings from a solution definition against the system settings

func VerifyAllParameters

func VerifyAllParameters(writer io.Writer, tuneApp *app.App)

VerifyAllParameters Verify that all system parameters do not deviate from any of the enabled solutions/notes.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL