| Line 1: | Line 1: | ||
| + | === Log === | ||
You can see various logs using the <code>show log</code> command. | You can see various logs using the <code>show log</code> command. | ||
| − | |||
| − | |||
| − | |||
<pre> | <pre> | ||
LYSH@MyHostName# show log {name} [-h] [-n NUMBER] [-w] [keyword] | LYSH@MyHostName# show log {name} [-h] [-n NUMBER] [-w] [keyword] | ||
| Line 10: | Line 8: | ||
-w, --watch show the log or setup status in real time | -w, --watch show the log or setup status in real time | ||
</pre> | </pre> | ||
| − | + | The below table shows you all kinds of logs. Some logs are generated in real-time during the runtime of a specific service, which is called "Runtime log". | |
| − | + | ||
| + | If the [[CLI - Services(daemons) | Runtime log]] of a specific service is disabled, logs are not generated. | ||
| + | Therefore, you should verify the status of the Runtime log by the <code>show service</code> command. If disabled, you need to [[CLI - Services(daemons) | enable]] it. | ||
| + | |||
{| class="wikitable" | {| class="wikitable" | ||
! style='width:150px' | log name !! log description | ! style='width:150px' | log name !! log description | ||
| Line 17: | Line 18: | ||
| apache2 || It is the apache2 access log. | | apache2 || It is the apache2 access log. | ||
|- | |- | ||
| − | | dhcpv4 || It is the logs that were generated in real-time during the runtime of the dhcpv4 service. | + | | dhcpv4 || It is the logs that were generated in real-time during the runtime of the [[ImRAD services(daemons) | dhcpv4]] service. |
|- | |- | ||
| − | | dhcpv6 || It is the logs that were generated in real-time during the runtime of the dhcpv6 service. | + | | dhcpv6 || It is the logs that were generated in real-time during the runtime of the [[ImRAD services(daemons) | dhcpv6]] service. |
|- | |- | ||
| − | | failover || It is the logs that were generated in real-time during the runtime of the failover service. | + | | failover || It is the logs that were generated in real-time during the runtime of the [[ImRAD services(daemons) | failover]] service. |
|- | |- | ||
| − | | logexp || It is the logs that were generated in real-time during the runtime of the logexp service. | + | | logexp || It is the logs that were generated in real-time during the runtime of the [[ImRAD services(daemons) | logexp]] service. |
|- | |- | ||
| lsyslog || It is the Syslog generated from the imRAD services. | | lsyslog || It is the Syslog generated from the imRAD services. | ||
| Line 29: | Line 30: | ||
| mysqlerror || It is the Syslog generated from the imRAD services. | | mysqlerror || It is the Syslog generated from the imRAD services. | ||
|- | |- | ||
| − | | radius || It is the logs that were generated in real-time during the runtime of the | + | | radius || It is the logs that were generated in real-time during the runtime of the [[ImRAD services(daemons) | radiusd]] service. |
|- | |- | ||
| − | | smgr|| It is the logs that were generated in real-time during the runtime of the smgr service. | + | | smgr|| It is the logs that were generated in real-time during the runtime of the [[ImRAD services(daemons) | smgr]] service. |
|- | |- | ||
| − | | startup|| It is the logs that were generated in real-time during the runtime of the startup service. | + | | startup|| It is the logs that were generated in real-time during the runtime of the [[ImRAD services(daemons) | startup]] service. |
|- | |- | ||
| syslog|| It is the Syslog. | | syslog|| It is the Syslog. | ||
|- | |- | ||
| − | | ufw || It is | + | | ufw || It is logs of all blocked packets not matching the defined [[CLI - ufw | ufw]] policy. |
|- | |- | ||
| − | | update|| It is the | + | | update|| It is the System update log. |
|- | |- | ||
|} | |} | ||
Revision as of 14:27, 29 April 2021
Log
You can see various logs using the show log command.
LYSH@MyHostName# show log {name} [-h] [-n NUMBER] [-w] [keyword]
optional arguments:
-h, --help show this help message and exit
-n [NUMBER], --number [NUMBER] enter 0 to show all logs, and enter a value greater than 0 to show as much as the value entered
-w, --watch show the log or setup status in real time
The below table shows you all kinds of logs. Some logs are generated in real-time during the runtime of a specific service, which is called "Runtime log".
If the Runtime log of a specific service is disabled, logs are not generated.
Therefore, you should verify the status of the Runtime log by the show service command. If disabled, you need to enable it.
| log name | log description |
|---|---|
| apache2 | It is the apache2 access log. |
| dhcpv4 | It is the logs that were generated in real-time during the runtime of the dhcpv4 service. |
| dhcpv6 | It is the logs that were generated in real-time during the runtime of the dhcpv6 service. |
| failover | It is the logs that were generated in real-time during the runtime of the failover service. |
| logexp | It is the logs that were generated in real-time during the runtime of the logexp service. |
| lsyslog | It is the Syslog generated from the imRAD services. |
| mysqlerror | It is the Syslog generated from the imRAD services. |
| radius | It is the logs that were generated in real-time during the runtime of the radiusd service. |
| smgr | It is the logs that were generated in real-time during the runtime of the smgr service. |
| startup | It is the logs that were generated in real-time during the runtime of the startup service. |
| syslog | It is the Syslog. |
| ufw | It is logs of all blocked packets not matching the defined ufw policy. |
| update | It is the System update log. |
Display logs
LYSH@MyHostName# show log apache2 // Display all apache2 logs LYSH@MyHostName# show log radius // Display all radius logs
Display last n logs
LYSH@MyHostName# show log apache2 -n 10 // Display only the last 10 apache2 logs LYSH@MyHostName# show log radius -n 10 // Display only the last 10 radius logs
Display last n logs with keyword
LYSH@MyHostName# show log apache2 -n 10 request // Display only the last 10 apache2 logs filtered by "request" LYSH@MyHostName# show log radius -n 10 accept // Display only the last 10 radius logs filtered by "request"
Display logs in real-time
LYSH@MyHostName# show log apache2 -w // Display the apache2 logs in real-time LYSH@MyHostName# show log radius -w // Display the radius logs in real-time
Display logs in real-time with keyword
LYSH@MyHostName# show log apache2 -w request // Display the apache2 logs filtered by "request" in real-time LYSH@MyHostName# show log radius -w accept // Display the radius logs filtered by "accept" in real-time
keyword
The & is the Logical AND operator and the | is the Logical OR operator.
LYSH@MyHostName# show log request&reply // Display the apache2 logs having both "request" and "reply" LYSH@MyHostName# show log request|reply // Display the apache2 logs having either "request" or "reply"