tunsave Command

Purpose

Saves current tunable parameter values to a file.

Syntax

tunsave [ -a | -A ] -f | -F Filename [ -d Description ]

Description

The tunsave command saves the current state of tunable parameters in a file.

If Filename does not already exist, a new file is created. If it already exists, an error message prints unless the -F flag is specified, in which case, the existing file is overwritten.

Note that the saved restricted tunables that have been modified to a value different from the default value, are flagged with a comment # RESTRICTED not at default value, appended to the line.

Flags

Item Description
-a Saves all tunable parameters, including those who are currently set to their default value. These parameters are saved with the special value DEFAULT.
-A Saves all tunable parameters, including those who are currently set to their default value. These parameters are saved numerically, and a comment, # DEFAULT VALUE, is appended to the line to flag them.
-d Description Specifies the text to use for the Description field. Special characters must be escaped or quoted inside the Description field.
-f Filename Specifies the name of the tunable file where the tunable parameters are saved. If Filename already exists, an error message prints. If it does not contain the '/' (forward slash) character, the Filename is relative to /etc/tunables.
-F Filename Specifies the name of the tunable file where the tunable parameters are saved. If Filename already exists, the existing file is overwritten. If it does not contain the '/' (forward slash) character, the Filename is relative to /etc/tunables.

Examples

  1. To save all tunables different from their default value into /etc/tunables/mytunable, enter:
    tunsave -f mytunable
  2. To save all tunables, including those who are currently set to their default value, but replace the default values with the special value DEFAULT, enter:
      tunsave -a -f /home/admin/mytunable 
  3. To save all tunables, including those who are currently set to their default value using all numerical values, but flag the default values with the comment DEFAULT VALUE, enter:
     tunsave -A -f mytunable  

Files

Item Description
/usr/bin/tunsave Contains the tunsave command.
/etc/tunables Contains all the saved files.