The LOGGING commands allow you to configure such parameters as log storage location (local file, remote file), number and size of these files, message filtering rules.
The command allows you to set the level of syslog messages that will be displayed in the console in one of two modes: either display all messages with the level not lower than the specified one, or only with this level.
The use of a negative form (no) of the command sets the default value.
[no] logging console <SEVERITY>
<SEVERITY > – syslog message level for output: 'emerg', 'alert', 'crit', 'error', 'warning', 'notice', 'info', 'debug'.
info
CONFIG
ma4000(config)# logging console debug |
This command specifies the name of the local file where the log is stored, as well as the level of messages that are stored in this file.
The use of a negative form (no) of the command sets the default value.
[no] logging file <FILE> <SEVERITY>
<FILE> – file name, up to 255 characters long;
<SEVERITY> – level of messages, that saved in file.
CONFIG
ma4000(config)# logging file test alert |
This command allows to set the maximum log file size in kilobytes. When one file is exhausted, the system will create the next one according to the max-files setting (see loggingmax-files).
The use of a negative form (no) of the command restores the default value.
logging file-size <SIZE>
no logging file-size
<SIZE> – allowed size of log file. Values between 100 and 10000 Kbytes are allowed.
500 KB
CONFIG
ma4000(config)# logging file-size 1000 |
The command allows to switch to the configuration mode of a separate filter rule by its name, a detailed description of the LOGFILTER mode is given in Syslog filters configuration. LOGFILTER command mode section.
The use of the negative form (no) of the command remove filter by its name.
[no] logging filter <FILE>
<FILE> – file name, up to 255 characters.
CONFIG
ma4000(config)# logging filter test ma4000(pp4x-config-log-filter-test)# |
The command allows to switch to the configuration mode of the filter rule of a predefined slot.
logging builtin-filter <NAME>
<NAME> – slot name or PP4X card, may take values: 'pp', 'pp-other', 'slot0', 'slot1', 'slot2', 'slot3', 'slot4', 'slot5', 'slot6', 'slot7', 'slot8', 'slot9', 'slot10', 'slot11', 'slot12', 'slot13', 'slot14', 'slot15'.
CONFIG
ma4000(config)# logging builtin-filter pp ma4000(pp4x-config-log-filter-pp)# |
This command allows to set the mode of log saving to a remote address.
The use of a negative form (no) of the command cancels the remote logging.
logging host <HOST> port <PORT> transport <TRANSPORT> <SEVERITY>
no logging host
<HOST> – IP address of the remote host to save the log file;
<PORT> – port number for communication with the remote host from 1 to 65535;
<TRANSPORT> – transmission packets type: tcp or udp;
<SEVERITY> – level of messages, that saved in file.
CONFIG
ma4000(config)# logging host 192.168.1.2 port 1024 transport tcp debug |
This command specifies the maximum number of log-files to be stored in the system. When the last available one is filled in, the system will go back to the first one.
The use of a negative form (no) of the command returns the default value.
logging max-files <FILE_NUM>
no logging max-files
<FILE_NUM> – maximum log file number, may take values [1 .. 1000].
3
CONFIG
ma4000(config)# logging max-files 20 |
The command allows to specify the mode of saving log-files in memory. Log files will either be created from scratch every time you start the MA4000, or saved between restarts.
The use of a negative form (no) of the command returns the storage mode to temporary.
[no] logging storage persistent
The command contains no arguments.
CONFIG
ma4000(config)# logging storage persistent |
The command allows to set the level of SYSLOG messages that will be displayed at remote SSH and TELNET sessions in one of two modes: either display all messages with the level not lower than the specified one, or only with this level.
The use of a negative form (no) of the command removes a set mode.
logging monitor <SEVERITY>
no logging monitor
<SEVERITY > – syslog message level for output: 'emerg', 'alert', 'crit', 'error', 'warning', 'notice', 'info', 'debug'.
info
CONFIG
ma4000(config)# logging monitor debug |
This command allows to delete log-files stored in local memory of MA4000-PX.
clear log [file <FILE>]
<FILE> – log file name to delete, optional . If file name is not specified, all log files stored in local device memory will be deleted.
ROOT
ma4000# clear log file slot0 |
This command allows to view the list of log files stored in local memory of MA4000-PX. If file name is specified, the content of the log file will be displayed.
show log [<FILE>]
<FILE> – log file name, optional.
ROOT
ma4000# showlog Log files ~~~~~~~~~ ## Name Size in bytes Date of last modification ---- -------------------- ---------------- ------------------------- 1 daemon 447 Tue Feb 4 12:01:39 2014 2 pp 188073 Tue Feb 4 12:01:39 2014 3 slot0 6132 Tue Feb 4 12:03:41 2014 4 slot0.1 511983 Tue Feb 4 09:23:56 2014 5 slot0.2 511867 Tue Feb 4 09:23:56 2014 6 slot0.3 511915 Tue Feb 4 09:23:56 2014 ---- -------------------- ---------------- ------------------------- Total files: 6 |
This command allows to view log settings for saving MA4000 log files.
show logging config
The command contains no arguments.
ROOT
ma4000# show logging config Logging max files – 3 Logging file size – 500 Criteria filter table: ~~~~~~~~~~~~~~~~~~~~~~ Name Emerg Alert Crit Error Warn Notce Info Debug --------------- ----- ----- ----- ----- ----- ----- ----- ----- console + + + + + + – – monitor + + + + + + + + + + + + + + – – slot0 + + + + + + + – slot1 + + + + + + + – slot2 + + + + + + + – slot3 + + + + + + + – slot4 + + + + + + + – slot5 + + + + + + + – slot6 + + + + + + + – slot7 + + + + + + + – slot8 + + + + + + + – slot9 + + + + + + + – slot10 + + + + + + + – slot11 + + + + + + + – slot12 + + + + + + + – slot13 + + + + + + + – slot14 + + + + + + + – slot15 + + + + + + + – pp + + + + + + + – pp-other + + + + + + + – File target table: ~~~~~~~~~~~~~~~~~~ Filter name File name -------------------- ------------------------------------------------------------ slot0 slot0 slot1 slot1 slot2 slot2 slot3 slot3 slot4 slot4 slot5 slot5 slot6 slot6 slot7 slot7 slot8 slot8 slot9 slot9 slot10 slot10 slot11 slot11 slot12 slot12 slot13 slot13 slot14 slot14 slot15 slot15 pp pp pp-other pp-other load-1-3-2_51# |