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.

can use to store system logfiles. Here we can see that there’s almost nothing on RE1’s<br />

hard disk (/dev/ad1s1f, mounted on /var):<br />

aviva@router1a> show system storage | except /dev/vn<br />

Filesystem Size Used Avail Capacity Mounted on<br />

/dev/ad0s1a 77M 37M 35M 51% /<br />

devfs 16K 16K 0B 100% /dev/<br />

mfs:172 1.5G 4.0K 1.3G 0% /tmp<br />

/dev/ad0s1e 12M 9.0K 11M 0% /config<br />

procfs 4.0K 4.0K 0B 100% /proc<br />

/dev/ad1s1f 17G 622M 15G 4% /var<br />

The messages you save to RE1 are placed in the file /var/log/messages and include the<br />

string re0 after the timestamp and router name to distinguish those messages that<br />

originated from RE0 from the messages from RE1:<br />

Apr 29 21:39:09 router1a rshd[3811]: root@re0 as root: cmd='mv /var/db/dcd.snmp_ix+<br />

/var/db/dcd.snmp_ix'<br />

Apr 29 22:30:14 router1a login: LOGIN_INFORMATION: User aviva logged in from host<br />

re0 on device ttyp0<br />

Apr 29 22:38:08 router1a login: LOGIN_INFORMATION: User aviva logged in from host<br />

re0 on device ttyp0<br />

Apr 29 22:51:51 router1a re0 init: ntp (PID 4752) exit on SIGHUP, will be restarted<br />

to get the new config<br />

Apr 29 22:51:51 router1a re0 init: ntp (PID 4977) started<br />

Apr 29 22:51:51 router1a re0 xntpd[4977]: ntpd 4.1.0-a Wed Apr 27 07:11:10 GMT 2005<br />

(1)<br />

Apr 29 22:51:51 router1a re0 xntpd[4977]: kernel time discipline status 2040<br />

Apr 29 22:52:13 router1a rshd[3829]: root@re0 as root: cmd='rcp -T -t /var/db/dcd.<br />

snmp_ix+'<br />

Apr 29 22:51:51 router1a re0 mgd[4791]: UI_DBASE_LOGOUT_EVENT: User 'aviva' exiting<br />

configuration mode<br />

Apr 29 22:52:14 router1 rshd[3832]: root@re0 as root: cmd='mv /var/db/dcd.snmp_ix+ /<br />

var/db/dcd.snmp_ix'<br />

Apr 29 22:52:22 router1a login: LOGIN_INFORMATION: User aviva logged in from host re0<br />

on device ttyp0<br />

To have RE1 send its log messages to files on RE0, you configure this in the configuration<br />

file on RE1:<br />

aviva@router1> request routing-engine login re1<br />

aviva@router1a> configure<br />

[edit]<br />

aviva@router1a# set system syslog host other-routing-engine authorization notice<br />

aviva@router1a# commit and-quit<br />

Because this is the same configuration as on RE0, you can also configure both<br />

Routing Engines from RE0:<br />

[edit system syslog]<br />

aviva@router1# set host other-routing-engine authorization notice<br />

aviva@router1# commit synchronize<br />

Then check for the messages on RE0:<br />

aviva@router1a> exit<br />

aviva@router1> show log messages | last<br />

176 | 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!