Searching Through The Syslog - Acopia Adaptive Resource Switch Cli Maintenance Manual

Table of Contents

Advertisement

Troubleshooting Tools
Accessing the Syslog

Searching Through the Syslog

bstnA6k(cfg)# grep LOGMGRD logs syslog
sm-3-2:2004-05-06T06:24:53.362-0400:3-apm-277:LOGMGRD-0-6(I)-MSG6:Version
0.12.0.4649 (May 05 2004 02:19:30) [nbuilds] (build 4649) shutting down
sm-3-1:2004-05-06T06:24:53.460-0400:3-apm-277:LOGMGRD-0-6(I)-MSG6:Version
0.12.0.4649 (May 05 2004 02:19:30) [nbuilds] (build 4649) shutting down
2004-05-06T06:28:57.177-0400:SWITCH:1-1-SCM-437:LOGMGRD-0-6-MSG6:: Version
0.12.0.4650 (May 05 2004 18:04:50) [lwisniewski] (build 4650) starting up
6-20
Use the
command to apply a regular expression to the syslog as you page
grep
through it, viewing only the lines that contain a desired string:
grep pattern logs [filename]
where
pattern (1-255 characters) is the regular-expression pattern to search for in
the syslog. The grep displays all lines containing this pattern.
The regular expression syntax follows grep's "basic" regular-expression
syntax:
. matches any single character.
.* matches any string, including the null string.
[...] matches any one of the enclosed characters.
[a-z] matches any character in the sorted range, a through z.
\ matches the next character, even if it has special meaning (for example,
\. matches a period instead of any character).
[^...] matches any character that is not enclosed. For example, [^0-9]
matches any single character that is not a number from 0 to 9.
logs is a required keyword; this specifies the "logs" directory, where the
syslogs are stored.
filename (optional, 1-255 characters) identifies one file to search. If you
omit the filename, the CLI searches through all files in the logs directory.
Use the
show logs
For example, the following command searches the active syslog for the string,
"LOGMGRD:"
command to see a list of accessible log files.
CLI Maintenance Guide

Advertisement

Table of Contents
loading

Related Products for Acopia Adaptive Resource Switch

Table of Contents