2
Management
49
Real-time display in the CLI
Log
event
messages
can
be
displayed
in
real
time
on
a
CLI
console
by
entering
the
command:
Device:/>
log
‐
on
All
messages
are
then
displayed
as
they
are
generated
as
well
as
being
sent
to
any
configured
log
servers.
To
switch
off
logging,
use
the
command:
Device:/>
log
‐
off
The
key
combination
Ctrl
‐
C
can
also
be
used
to
terminate
message
display
at
the
console.
A
typical
sequence
of
turning
on
and
then
turning
off
logging
is
shown
below
with
one
intervening
log
message:
Device:/>
log
‐
on
Logging
on
LOG:
Jun
17
00:22:20
RULE:
prio=Warning
id=00000
event=no_route_to_source
iface=wan
srcip=172.22.0.5
pkt_flowdir=n/a
pkt_srchw=00:1b:11:5a:0e:c9
pkt_ipver=4
pkt_proto=IGMP
pkt_recvif=wan
pkt_srcip=172.22.0.5
pkt_destip=239.255.255.100
pkt_srcport=0
pkt_destport=65178
action=drop
logtrace=02404889
Device:/>
log
‐
off
Logging
off
Device:/>
Each
new
log
message
is
preceded
by
the
text
“
LOG:
”.
Limiting message display
With
large
numbers
of
log
messages
being
generated,
it
can
be
useful
to
limit
the
number
of
messages
displayed.
The
‐
rate
option
of
the
log
command
restricts
the
number
of
messages
per
second
that
are
displayed
with
the
excess
being
discarded.
For
example,
to
limit
the
displayed
rate
to
one
message
per
second,
enter
the
command:
Device:/>
log
‐
on
‐
rate=1
Another
way
to
limit
the
total
number
of
log
messages
displayed
is
by
using
the
‐
num
option.
For
example,
if
only
one
log
message
is
to
be
displayed
before
logging
is
disabled,
the
following
CLI
command
would
be
used:
Device:/>
log
‐
on
‐
num=1
Logging
on
LOG:
Jun
17
00:22:20
RULE:
prio=Warning
id=00000
event=no_route_to_source
iface=wan
srcip=172.22.0.5
pkt_flowdir=n/a
pkt_srchw=00:1b:11:5a:0e:c9
pkt_ipver=4
pkt_proto=IGMP
pkt_recvif=wan
pkt_srcip=172.22.0.5
pkt_destip=239.255.255.100
pkt_srcport=0
pkt_destport=65178
action=drop
logtrace=02404889
Received
1
logs.
Closing
due
to
limit.
Device:/>
See
the
SEG
‐
100
Command
Line
Reference
for
a
description
of
log
command
options.