Saves current tunable parameter values to a file.
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.
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. |
tunsave -f mytunable
tunsave -a -f /home/admin/mytunable
tunsave -A -f mytunable
Item | Description |
---|---|
/usr/bin/tunsave | Contains the tunsave command. |
/etc/tunables | Contains all the saved files. |