28.06.2014 Views

Discussion

Discussion

Discussion

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

no longer need. Here, we logged RIP protocols operations a while ago to debug a<br />

problem and now want to delete those logfiles:<br />

aviva@router1> file list detail /var/log/rip*<br />

-rw-r----- 1 root<br />

1689 Feb 28 10:05 /var/log/rip-update-log<br />

-rw-r----- 1 root<br />

7610 Feb 28 10:05 /var/log/rip-update-log.0.gz<br />

-rw-r----- 1 root<br />

7286 Feb 28 09:39 /var/log/rip-update-log.1.gz<br />

-rw-r----- 1 root<br />

7427 Feb 28 09:15 /var/log/rip-update-log.2.gz<br />

-rw-r----- 1 root<br />

7334 Feb 28 08:49 /var/log/rip-update-log.3.gz<br />

-rw-r----- 1 root<br />

7316 Feb 28 08:25 /var/log/rip-update-log.4.gz<br />

-rw-r----- 1 root<br />

7382 Feb 28 08:01 /var/log/rip-update-log.5.gz<br />

-rw-r----- 1 root<br />

7380 Feb 28 07:37 /var/log/rip-update-log.6.gz<br />

-rw-r----- 1 root<br />

7243 Feb 28 07:12 /var/log/rip-update-log.7.gz<br />

-rw-r----- 1 root<br />

7346 Feb 28 06:48 /var/log/rip-update-log.8.gz<br />

total 10<br />

aviva@router1> file delete /var/log/rip*<br />

aviva@router1> file list /var/log/rip*<br />

/var/log/rip*: No such file or directory<br />

5.6 Sending Log Messages to Your Screen<br />

Problem<br />

You log in to the router to try to track a serious problem that is currently happening,<br />

and you want to see logging messages as they are being generated.<br />

Solution<br />

You can use the monitor command to temporarily see logging messages as they are<br />

occurring:<br />

aviva@router1> monitor start messages<br />

aviva@router1><br />

*** messages ***<br />

Apr 4 22:00:00 router1 syslogd: %SYSLOG-6: restart<br />

*** 'messages' has been deleted ***<br />

*** 'messages' has been created ***<br />

*** messages ***<br />

Apr 4 22:00:00 router1 newsyslog[4939]: logfile turned over<br />

To see the messages for a longer period of time, you can configure the router to display<br />

them on your screen:<br />

[edit]<br />

aviva@router1# edit system syslog user aviva<br />

[edit system syslog user aviva]<br />

aviva@router1# set any critical<br />

<strong>Discussion</strong><br />

An easy way to see logging messages as they are occurring without modifying the<br />

router’s configuration is to use the monitor start command. Include the name of one<br />

Sending Log Messages to Your Screen | 171<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!