actions

package
v0.0.0-...-12ea192 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 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 = "/var/lib/saptune/working/notes/"

NoteTuningSheets is the working directory of available sap notes

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

OverrideTuningSheets is the directory for the override files

View Source
var PackageArea = "/usr/share/saptune/"

PackageArea is the package area with all notes and solutions shipped by the current installed saptune rpm

View Source
var RPMDate = "undef"

RPMDate is the date of package build only used in individual build test packages, but NOT in our official built and released packages (not possible because of 'reproducible' builds)

View Source
var RPMVersion = "undef"

RPMVersion is the package version from package build process

View Source
var SolutionSheets = "/var/lib/saptune/working/sols/"

SolutionSheets is the working directory of available sap solutions

View Source
var StagingArea = "/var/lib/saptune/staging/"

StagingArea is the staging area

View Source
var StagingSheets = "/var/lib/saptune/staging/latest/"

StagingSheets is the staging directory of the latest notes

View Source
var WorkingArea = "/var/lib/saptune/working/"

WorkingArea is the working directory

Functions

func DaemonAction

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

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

func NoteAction

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

NoteAction Note actions like apply, revert, verify asm.

func NoteActionApplied

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

NoteActionApplied lists all applied Note definitions as list separated by blanks

func NoteActionApply

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

NoteActionApply applies Note parameter settings to the system

func NoteActionCreate

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

NoteActionCreate helps the customer to create an own Note definition

func NoteActionCustomise

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

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

func NoteActionDelete

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

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

func NoteActionEdit

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

NoteActionEdit allows to editing the custom/vendor specific Note definition file and NOT the 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)

NoteActionList lists all available Note definitions

func NoteActionRename

func NoteActionRename(reader io.Reader, writer io.Writer, noteID, newNoteID 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 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, result *system.JPNotes)

PrintNoteFields Print mismatching fields in the note comparison result.

func PrintStageFields

func PrintStageFields(writer io.Writer, stageName string, comparison map[string]stageComparison)

PrintStageFields prints mismatching parameters between Notes in staging and working area

func RevertAction

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

RevertAction Revert all notes and solutions

func SelectAction

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

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

func ServiceAction

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

ServiceAction handles service actions like start, stop, status, enable, disable it controls the systemd saptune.service

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 ServiceActionRestart

func ServiceActionRestart(tuneApp *app.App)

ServiceActionRestart is only used by saptune service, hence it is not advertised to the end user. It is used to restart 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 ServiceActionTakeover

func ServiceActionTakeover(tuneApp *app.App)

ServiceActionTakeover starts and enables the saptune service even if competing services (sapconf, tuned) are active. These services will be disabled and stopped disable and stop sapconf.service and tuned.service

func SolutionAction

func SolutionAction(writer io.Writer, actionName, solName, newSolName string, tuneApp *app.App)

SolutionAction Solution actions like apply, revert, verify asm.

func SolutionActionApplied

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

SolutionActionApplied prints out the applied solution

func SolutionActionApply

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

SolutionActionApply applies parameter settings defined by the solution to the system

func SolutionActionChange

func SolutionActionChange(reader io.Reader, writer io.Writer, solName string, tuneApp *app.App)

SolutionActionChange switches to a new solution even that another solution was already applied It's basically a 'revert OLDSOLUTION' && 'apply NEWSOLUTION'. This will change the Note order in case of additional applied Notes, but this is intended and accepted. The confirmation can be suppressed by '--force'

func SolutionActionCreate

func SolutionActionCreate(writer io.Writer, customSol string)

SolutionActionCreate helps the customer to create an own solution definition

func SolutionActionCustomise

func SolutionActionCustomise(writer io.Writer, customSol string, tuneApp *app.App)

SolutionActionCustomise creates an override file and allows to editing the solution definition override file

func SolutionActionDelete

func SolutionActionDelete(reader io.Reader, writer io.Writer, solName string, tuneApp *app.App)

SolutionActionDelete deletes a custom solution definition file and the corresponding override file

func SolutionActionEdit

func SolutionActionEdit(writer io.Writer, customSol string, tuneApp *app.App)

SolutionActionEdit allows to editing the custom/vendor specific solution definition file and NOT the override file

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 SolutionActionRename

func SolutionActionRename(reader io.Reader, writer io.Writer, solName, newSolName string, tuneApp *app.App)

SolutionActionRename renames a custom Solution definition file and the corresponding override file

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 SolutionActionShow

func SolutionActionShow(writer io.Writer, solName string)

SolutionActionShow shows the content of the Solution definition file

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 StagingAction

func StagingAction(actionName string, stageName []string, tuneApp *app.App)

StagingAction Staging actions like apply, revert, verify asm.

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