System Log Command List. D-Link DGS-3000 series
Publicité
Publicité
DGS-3000 Series Layer 2 Managed Gigabit Ethernet Switch CLI Reference Guide
Chapter 84 System Log Command List
clear log
show log {[index <value_list> | severity {module <module_list>} {emergency | alert | critical | error | warning | notice | informational | debug | <level_list 0-7>} | module<module_list>]} show log_software_module enable syslog disable syslog show syslog
create syslog host <index 1-4> ipaddress [<ipaddr> | <ipv6addr>] {severity [emergency | alert | critical | error | warning | notice | informational | debug | <level 0-7>] | facility [local0 | local1 | local2 | local3 | local4 | local5 | local6 | local7] | udp_port <udp_port_number> | state [enable | disable]}
config syslog host [<index> | all] {severity [emergency | alert | critical | error | warning | notice | informational | debug| <level 0-7>] | facility [local0 | local1 | local2 | local3 | local4 | local5 | local6 | local7] | udp_port
<udp_port_number> | ipaddress [<ipaddr> | <ipv6addr>] | state [enable | disable]}(1)
delete syslog host [<index 1-4> | all]
show syslog host {<index 1-4>}
config log_save_timing [time_interval <min 1-65535> | on_demand | log_trigger] show log_save_timing
show attack_log {index <value_list>} clear attack_log
84-1 clear log
Description
This command is used to clear the Switch’s history log.
Format clear log
Parameters
None.
Restrictions
Only Administrators and Operators can issue this command.
Example
To clear the Switch’s history log:
DGS-3000-26TC:admin#clear log
Command: clear log
Success.
DGS-3000-26TC:admin#
718
DGS-3000 Series Layer 2 Managed Gigabit Ethernet Switch CLI Reference Guide
84-2 show log
Description
This command is used to display the Switch’s history log.
Format show log {[index <value_list> | severity {module <module_list>} {emergency | alert | critical | error | warning | notice | informational | debug | <level_list 0-7>} | module<module_list>]}
Parameters
index - (Optional) Specify the index value of log entries that will be displayed. For example, specifying 1-5 will display the history log from 1 to 5.
<value_list> - Enter the index value here.
severity - (Optional) Specify the severity level used.
module - (Optional) Specify the modules which are to be displayed. The module can be obtained by using the show log_software_module command. Use a comma to separate multiple modules.
<module_list> - Enter the module list value here.
emergency - (Optional) Severity level 0.
alert - (Optional) Severity level 1.
critical - (Optional) Severity level 2.
error - (Optional) Severity level 3.
warning - (Optional) Severity level 4.
notice - (Optional) Severity level 5.
informational - (Optional) Severity level 6.
debug - (Optional) Severity level 7.
<level_list 0-7> - Enter a list of severity level which is to be displayed. If there is more than one severity level, please separate them by comma. The level number is from 0 to 7.
module - (Optional) Specify the modules which are to be displayed. The module can be obtained by using the show log_software_module command. Use a comma to separate multiple modules.
<module_list> - Enter the module list value here.
If no parameter is specified, all history log entries will be displayed.
Restrictions
None.
Example
To display the Switch’s history log:
DGS-3000-26TC:admin#show log index 1-3
Command: show log index 1-3
Index Date Time Level Log Text
----- ---------- -------- ------- ----------------------------------------------
3 2000-01-01 00:00:40 CRIT(2) System started up
2 2000-01-01 00:00:40 CRIT(2) System cold start
1 2000-01-01 01:49:30 INFO(6) Anonymous: execute command "reset system".
DGS-3000-26TC:admin#
719
DGS-3000 Series Layer 2 Managed Gigabit Ethernet Switch CLI Reference Guide
84-3 show log_software_module
Description
This command is used to display the protocols or applications that support the enhanced log. The enhanced log adds the module name and module ID. Network administrators can display logs by module name or module ID.
Format show log_software_module
Parameters
None.
Restrictions
None.
Example
To display the protocols or applications that support the enhanced log:
DGS-3000-26TC:admin#show log_software_module
Command: show log_software_module
ERPS ERROR_LOG MSTP
DGS-3000-26TC:admin#
84-4 enable syslog
Description
This command is used to enable the sending of syslog messages.
Format enable syslog
Parameters
None.
Restrictions
Only Administrators and Operators can issue this command.
Example
To enable the sending of syslog messages:
720
DGS-3000 Series Layer 2 Managed Gigabit Ethernet Switch CLI Reference Guide
DGS-3000-26TC:admin#enable syslog
Command: enable syslog
Success.
DGS-3000-26TC:admin#
84-5 disable syslog
Description
This command is used to disable the sending of syslog messages.
Format disable syslog
Parameters
None.
Restrictions
Only Administrators and Operators can issue this command.
Example
To disable the sending of syslog messages:
DGS-3000-26TC:admin#disable syslog
Command: disable syslog
Success.
DGS-3000-26TC:admin#
84-6 show syslog
Description
This command is used to display the syslog protocol global state.
Format show syslog
Parameters
None.
Restrictions
None.
721
DGS-3000 Series Layer 2 Managed Gigabit Ethernet Switch CLI Reference Guide
Example
To display the syslog protocol global state:
DGS-3000-26TC:admin#show syslog
Command: show syslog
Syslog Global State: Enabled
DGS-3000-26TC:admin#
84-7 create syslog host
Description
This command is used to create a new syslog host. The user can choose and report specific levels of messages to a specific host. When the user chooses a specific level for a specific host, messages which are at that severity level or higher will be reported to that host.
Format create syslog host <index 1-4> ipaddress [<ipaddr> | <ipv6addr>] {severity [emergency | alert | critical | error | warning | notice | informational | debug | <level 0-7>] | facility [local0 | local1 | local2 | local3 | local4 | local5 | local6 | local7] | udp_port <udp_port_number> | state [enable | disable]}
Parameters
<index 1-4> - Enter the host index value here.
ipaddress - Specify the IP address for the host.
<ipaddr> - Enter the IP address for the host.
<ipv6addr> - Enter the IPv6 address for the host.
severity - (Optional) Specify the severity level.
emergency - Severity level 0.
alert - Severity level 1.
critical - Severity level 2.
error - Severity level 3.
warning - Severity level 4.
notice - Severity level 5.
informational - Severity level 6.
debug - Severity level 7.
<level 0-7> - Enter the severity level value here. This value must be between 0 and 7.
facility - (Optional) Some of the operating system daemons and processes have been assigned Facility values.
Processes and daemons that have not been explicitly assigned a Facility may use any of the "local use" facilities or they may use the "user-level" Facility. Those Facilities that have been designated are shown below.
This facility setting will be put in the syslog packet when it is sent to a specific syslog server.
local0 - Specify that the user-defined facility will be set to local 0.
local1 - Specify that the user-defined facility will be set to local 1.
local2 - Specify that the user-defined facility will be set to local 2.
local3 - Specify that the user-defined facility will be set to local 3.
local4 - Specify that the user-defined facility will be set to local 4.
local5 - Specify that the user-defined facility will be set to local 5.
local6 - Specify that the user-defined facility will be set to local 6.
local7 - Specify that the user-defined facility will be set to local 7.
udp_port - (Optional) Specify the UDP port number.
<udp_port_number> - Enter the UDP port number used here.
state - (Optional) The syslog protocol is used for the transmission of event notification messages across networks to a host. The option enables or disables the host to receive such messages.
enable - Specify that the host to receive such messages will be enabled.
disable - Specify that the host to receive such messages will be disabled.
722
DGS-3000 Series Layer 2 Managed Gigabit Ethernet Switch CLI Reference Guide
Restrictions
Only Administrators and Operators can issue this command.
Example
Adds a new syslog host:
DGS-3000-26TC:admin#create syslog host 1 ipaddress 10.90.90.1 severity debug facility local0
Command: create syslog host 1 ipaddress 10.90.90.1 severity debug facility local0
Success.
DGS-3000-26TC:admin#
84-8 config syslog host
Description
This command is used to configure the syslog host configurations. The user can choose and report a specific level of messages to a specific host. When the user chooses a specific level for a specific host, messages which are at that severity level or higher will be reported to the specified host.
Format config syslog host [<index> | all] {severity [emergency | alert | critical | error | warning | notice | informational | debug| <level 0-7>] | facility [local0 | local1 | local2 | local3 | local4 | local5 | local6 | local7] | udp_port <udp_port_number> | ipaddress [<ipaddr> | <ipv6addr>] | state [enable | disable]}(1)
Parameters
<index> - Enter the host index value here.
all - Specify that all the host indexes will be used.
severity - Specify the severity level.
emergency - Severity level 0.
alert - Severity level 1.
critical - Severity level 2.
error - Severity level 3.
warning - Severity level 4.
notice - Severity level 5.
informational - Severity level 6.
debug - Severity level 7.
<level 0-7> - Enter the severity level value here. This value must be between 0 and 7.
facility - Some of the operating system daemons and processes have been assigned Facility values. Processes and daemons that have not been explicitly assigned a Facility may use any of the "local use" facilities or they may use the "user-level" Facility. Those Facilities that have been designated are shown below. This facility setting will be put in the syslog packet when it is sent to a specific syslog server.
local0 - Specify that the user-defined facility will be set to local 0.
local1 - Specify that the user-defined facility will be set to local 1.
local2 - Specify that the user-defined facility will be set to local 2.
local3 - Specify that the user-defined facility will be set to local 3.
local4 - Specify that the user-defined facility will be set to local 4.
local5 - Specify that the user-defined facility will be set to local 5.
local6 - Specify that the user-defined facility will be set to local 6.
local7 - Specify that the user-defined facility will be set to local 7.
udp_port - Specify the UDP port number.
<udp_port_number> - Enter the UDP port number used here.
ipaddress - Specify IP address for the host.
<ipaddr> - Enter the IP address used for the configuration here.
<ipv6addr> - Enter the IPv6 address used for the configuration here.
state - The syslog protocol is used for the transmission of event notification messages across networks to a host.
723
DGS-3000 Series Layer 2 Managed Gigabit Ethernet Switch CLI Reference Guide
The option enables or disables the host to receive such messages.
enable - Specify that the host to receive such messages will be enabled.
disable - Specify that the host to receive such messages will be disabled.
Restrictions
Only Administrators and Operators can issue this command.
Example
To configure the syslog host configuration:
DGS-3000-26TC:admin#config syslog host all severity debug facility local0
Command: config syslog host all severity debug facility local0
Success.
DGS-3000-26TC:admin#
84-9 delete syslog host
Description
This command is used to delete the syslog host(s).
Format delete syslog host [<index 1-4> | all]
Parameters
<index> - Enter the host index value here.
all - Specify that all the host indexes will be used.
Restrictions
Only Administrators and Operators can issue this command.
Example
To delete the specific syslog host:
DGS-3000-26TC:admin#delete syslog host 4
Command: delete syslog host 4
Success.
DGS-3000-26TC:admin#
84-10 show syslog host
Description
This command is used to display the syslog host configurations.
724
DGS-3000 Series Layer 2 Managed Gigabit Ethernet Switch CLI Reference Guide
Format show syslog host {<index 1-4>}
Parameters
<index> - (Optional) Enter the host index value here.
If no parameter is specified, all hosts will be displayed.
Restrictions
None.
Example
To show the syslog host information:
DGS-3000-26TC:admin#show syslog host
Command: show syslog host
Syslog Global State: Disabled
Host 1
IP Address : 10.90.90.1
Severity : Debug(7)
Facility : Local0
UDP Port : 514
Status : Disabled
Total Entries : 1
DGS-3000-26TC:admin#
84-11 config log_save_timing
Description
This command is used to set the method for saving the log.
Format config log_save_timing [time_interval <min 1-65535> | on_demand | log_trigger]
Parameters
time_interval - Specify the time interval used for saving the log. If there is no new log event during this time interval, the Switch will not save any log entries.
<min 1-65535> - Enter the time interval value here. This value must be between 1 and 65535 minutes.
on_demand - Specify that the log will only be saved when an on-demand event occurs. For example, issuing the command save all or save log. This is the default option.
log_trigger - Specify that the log will be saved when a new log event is triggered.
Restrictions
Only Administrators and Operators can issue this command.
725
DGS-3000 Series Layer 2 Managed Gigabit Ethernet Switch CLI Reference Guide
Example
To configure the method for saving a log as on demand:
DGS-3000-26TC:admin#config log_save_timing on_demand
Command: config log_save_timing on_demand
Success.
DGS-3000-26TC:admin#
84-12 show log_save_timing
Description
This command is used to show the method for saving the log.
Format show log_save_timing
Parameters
None.
Restrictions
None.
Example
To show the timing method used for saving the log:
DGS-3000-26TC:admin#show log_save_timing
Command: show log_save_timing
Saving Log Method: On_demand
DGS-3000-26TC:admin#
84-13 show attack_log
Description
This command is used to display the attack log messages. The attack log message refers to log messages driven by modules such as DOS. This type of log message may generate a large amount of messages and quickly cause the system to run out of system log storage. Therefore, for this type of log messages only the first log that is generated each minute can be stored in the system log, with the rest of them being stored in a separate table named attack log.
Format show attack_log {index <value_list>}
Parameters
index - (Optional) Specify the list of index numbers of the entries that need to be displayed. For example, the
726
DGS-3000 Series Layer 2 Managed Gigabit Ethernet Switch CLI Reference Guide index 1-5 will display the attack log messages from 1 to 5.
<value_list> - Enter the index numbers of the entries that needs to be displayed here.
If no parameter is specified, all entries in the attack log will be displayed.
Restrictions
None.
Example
To show dangerous messages on the master:
DGS-3000-26TC:admin#show attack_log index 1
Command: show attack_log index 1
Index Date Time Level Log Text
----- ---------- -------- -------- ---------------------------------------------
1 2016-05-10 15:00:14 CRIT(2) Possible spoofing attack from IP: , MAC:
0A-00-00-5A-00-01, port: 3
DGS-3000-26TC:admin#
84-14 clear attack_log
Description
This command is used to clear the attack log.
Format clear attack_log
Parameters
None.
Restrictions
Only Administrators and Operators can issue this command.
Example
To clear the master’s attack log:
DGS-3000-26TC:admin#clear attack_log
Command: clear attack_log
Success.
DGS-3000-26TC:admin#
727
Télécharger
Publicité