28.06.2014 Views

Discussion

Discussion

Discussion

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The advantage of deactivating rather than deleting is that you can still see the configuration<br />

statements. If the problem you were investigating recurs later, you can<br />

remove the inactive: tag to start collecting those system log messages again:<br />

[edit system syslog]<br />

aviva@router1# activate system syslog file messages<br />

aviva@router1# commit<br />

5.10 Turning On Basic Tracing<br />

Problem<br />

The system logging messages give you high-level information about the processes<br />

and events that are occurring on the router, but you need specific information about<br />

the operation of a routing protocol.<br />

Solution<br />

Use tracing to get more details about the operations of your routing protocols. You<br />

can start by collecting global information about all the routing operations occurring<br />

on your router:<br />

[edit routing-options]<br />

aviva@router1# set traceoptions file traceoptions-routing-all world-readable<br />

aviva@router1# set traceoptions flag all<br />

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

Basic tracing lets you collect information about all the routing protocols that are<br />

actively running on your router. Configuring tracing is almost the same as configuring<br />

system logging. You specify the file to which you want to direct information, and<br />

you decide whether only the root user or all users can read the file. Here, the filename<br />

is traceoptions-routing-all and it is readable by everyone.<br />

This recipe uses the default trace file size of 1 MBand the default of 10 trace files.<br />

The JUNOS software handles the tracing files the same way as logging files. When<br />

the file reaches its maximum size, it is renamed with a .0 extension. When the file<br />

again fills up, the .0 file is renamed with a .1 extension, the newly filled file is<br />

renamed with a .0 extension, and so on. Where there are 10 files, the files start getting<br />

overwritten.<br />

Use the following commands to change the default file size and number of files:<br />

[edit routing-options]<br />

aviva@router1# set traceoptions file size 10M<br />

aviva@router1# set traceoptions file files 5<br />

178 | Chapter 5: Logging<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!