366
To do…
Command…
Remarks
1.
Enter system view.
system-view
—
2.
Enter interface view.
interface
interface-type interface-number
—
3.
Enable session logging.
session
log
enable
[
acl
acl-number
] {
inbound
|
outbound
}
Required
Disabled by default
Setting session logging thresholds
set thresholds to trigger recording and outputting of session logs. The thresholds include the following:
•
Holdtime threshold
—When the holdtime of a session reaches the preset threshold, the system
outputs a session log.
•
Traffic threshold
—When the number of packets or byte count of a session reaches the preset
threshold, the system outputs a session log.
To set session logging thresholds:
To do…
Command…
Remarks
1.
Enter system view.
system-view
—
2.
Set the holdtime threshold
for session logging.
session log time-active
time-value
Optional.
0 by default, which means that
the system does not output
session logs based on session
holdtime threshold.
3.
Configure
the traffic
threshold
for
session
logging.
Set the packet
count
threshold.
session log packets-active
packets-value
Optional.
0 by default, which means that
the system does not output
session logs based on packet
count threshold.
Set the byte
count
threshold.
session log bytes-active
bytes-value
Optional.
0 by default, which means that
the system does not output
session logs based on byte
count threshold.
NOTE:
•
If you specify both the holdtime threshold and traffic threshold, the system performs session logging
according to the threshold that is first reached, and then it clears all statistics.
•
If you specify both the packet count threshold and byte count threshold, only the one specified last
takes effect.
Configuring session log export
Session logs are exported in the form of flow logs.
To configure session log exporting: