(새 문서: 서비스와 시스템의 로그는 일반 CLI에서 <code>show log</code>, <code>show rtlog</code> 명령어로 확인합니다.= <pre> LYSH@MyHostName# show log -h usage: show log...) |
m |
||
| Line 1: | Line 1: | ||
| − | 서비스와 시스템의 로그는 일반 CLI에서 <code>show log</code>, <code>show rtlog</code> 명령어로 확인합니다. | + | 서비스와 시스템의 로그는 일반 CLI에서 <code>show log</code>, <code>show rtlog</code> 명령어로 확인합니다. |
<pre> | <pre> | ||
Revision as of 11:39, 13 November 2020
서비스와 시스템의 로그는 일반 CLI에서 show log, show rtlog 명령어로 확인합니다.
LYSH@MyHostName# show log -h
usage: show log [-h] {apache2,lsyslog,mysqlerror,mysqlslow,radius,syslog,update} ...
positional arguments:
apache2 Show apache2 log
lsyslog Show product syslog log
mysqlerror Show mysql error log
mysqlslow Show mysql slow query log
radius Show radius log
syslog Show syslog log
update Show update log
optional arguments:
-h, --help show this help message and exit
LYSH@MyHostName# show rtlog -h
usage: show rtlog [-h] {dhcpv4,dhcpv6,failover,logexp,smgr,startup} ...
positional arguments:
dhcpv4 Show rtlog dhcpv4
dhcpv6 Show rtlog dhcpv6
failover Show rtlog failover
logexp Show rtlog logexp
smgr Show rtlog smgr
startup Show rtlog startup
optional arguments:
-h, --help show this help message and exit
Basic Commands
LYSH@MyHostName# show log {name1}해당 로그가 출력 됩니다. 또한 화면 스크롤이 많은 경우 more 처리 됩니다.
{name1}는 apache2, lsyslog, mysqlerror, mysqlslow, radius, syslog, update를 사용할 수 있습니다.
LYSH@MyHostName# show rtlog {name2}해당 로그가 출력 됩니다. 또한 화면 스크롤이 많은 경우 more 처리 됩니다.
{name2}는 dhcpv4, dhcpv6, failover, logexp, smgr, startup을 사용할 수 있습니다.
After Commands
추가 옵션을 통해 실시간으로 확인할 수 있는 --watch옵션, 로그 출력 갯수--number, 특정 단어[keyword]를 지정할 수 있습니다. 특정 키워드로 검색할 경우 |, &를 통해서 여러가지 키워드를 and, or로 검색할 수 있습니다.
usage: show log / rtlog {service name} [-h] [-n NUMBER] [-w] [keyword]
positional arguments:
[keyword] keyword to display
optional arguments:
-h, --help show this help message and exit
-n [NUMBER], --number [NUMBER] all(0) or ther count (0 < n) of most recent syslog
-w, --watch realtime watch
LYSH@MyHostName# show log apache2 -wapache2의 log가 tail -f 모드로 log를 출력합니다.LYSH@MyHostName# show log lsyslog [something]lsyslog의 log에서 [something]을 포함한 라인을 출력합니다.LYSH@MyHostName# show log mysqlerror "some|thing"mysqlerror의 log에서 some 또는 thing을 포함한 라인을 log를 출력합니다.LYSH@MyHostName# show rtlog dhcpv4 "some&thing"mysqlslow의 log에서 some과 thing을 포함한 라인을 출력합니다.LYSH@MyHostName# show rtlog failover "some&thing|someting" -n 2radius의 log에서 some과 thing을 포함하거나 something을 포함한 라인을 2개만 출력합니다.
2개 이상의 키워드를 검색할 경우 반드시 쌍따움표"keyword"를 포함하여 입력해야합니다.