Tunables Overview
Tunables Overview
Tunables refer to parameters that can be modified, reset, or displayed for various components on AIX systems. The module allows users to specify actions such as showing, modifying, or resetting the values of these tunables. Components like 'vmo', 'ioo', 'schedo', 'no', 'raso', 'nfso', and 'asoo' have their own set of tunables that can be managed.
Requirements
The module requires root user access and supports AIX versions 7.1
TL3
Main Functions
There are several main functions in this module. Some of them are create_tunables_dict
get_valid_tunables
show
reset
modify
create_tunables_dict
get_valid_tunables
create_tunables_dict
create_tunables_dict
The create_tunables_dict
def create_tunables_dict(module):
'''
Utility function to create tunables dictionary with values
arguments:
module (dict): The Ansible module
note:
Exits with fail_json in case of error
return:
creates a dictionary with all tunables and their values
'''
component = module.params['component']
global tunables_dict
cmd = component + ' -F -x'
rc, std_out, std_err = module.run_command(cmd, use_unsafe_shell=True)
if rc != 0:
# In case command returns non zero return code, fail case
results['msg'] = "Failed to get tunables existing values for validation."
Actions
The module supports three main actions: show
modify
reset
show
The show
def show(module):
'''
Handles the show action
arguments:
module (dict): The Ansible module
note:
Exits with fail_json in case of error
return:
updated global results dictionary.
'''
tunable_params = module.params['tunable_params']
restricted_tunables = module.params['restricted_tunables']
component = module.params['component']
tunables_to_show = ''
cmd = ''
# according to the component form the initial command
cmd += component + ' '
# Force display of the restricted tunable parameters
modify
The modify
def modify(module):
'''
Handles the modify action
arguments:
module (dict): The Ansible module
note:
Exits with fail_json in case of error
return:
Message for successful command along with display standard output
'''
component = module.params['component']
bosboot_tunables = module.params['bosboot_tunables']
change_type = module.params['change_type']
restricted_tunables = module.params['restricted_tunables']
tunable_params_with_value = module.params['tunable_params_with_value']
parameters = ''
changed_tunables = ''
cmd = ''
reset
The reset
def reset(module):
'''
Handles the reset action
arguments:
module (dict): The Ansible module
note:
Exits with fail_json in case of error
return:
Updated global results dictionary
'''
component = module.params['component']
tunable_params = module.params['tunable_params']
bosboot_tunables = module.params['bosboot_tunables']
change_type = module.params['change_type']
restricted_tunables = module.params['restricted_tunables']
changed_tunables = ''
cmd = ''
# use of -r and -p together is prohibited. Reason explained in the message.
Examples
Here are some examples demonstrating how to use the tunables
Modify Tunables
This example demonstrates how to modify vmo
tunables
- name: "Modify vmo tunable parameters"
ibm.power_aix.tunables:
action: modify
component: vmo
tunable_params_with_value:
lgpg_regions: 10
Show Tunables
This example demonstrates how to display information of all dynamic tunable parameters using the tunables
ibm.power_aix.tunables:
action: show
component: vmo
Reset Tunables
This example demonstrates how to reset bosboot
tunables
- name: "Reset bosboot tunables/ restricted bosboot tunables"
# this will only change the REBOOT VALUE and needs bosboot and reboot.
# example of one restricted and one non restricted bosboot tunable
ibm.power_aix.tunables:
action: reset
component: vmo
restricted_tunables: true # because of restricted tunables otherwise default is false
bosboot_tunables: true # because of bosboot tunables otherwise default is false
tunable_params: ['kernel_heap_psize', 'batch_tlb']
This is an auto-generated document by Swimm 🌊 and has not yet been verified by a human