From 1508a71c3ec41347e6e34c57671028f2e4640680 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Tue, 19 Nov 2013 12:41:02 +0100 Subject: [snmp] Cleanup and changed atl conversion block default Changed the default value for the Audit Trail Log conversion to true. Also some cleanup. OTP-11396 --- lib/snmp/doc/src/snmp.xml | 80 ++++++++++++++++++++++++---------------------- lib/snmp/doc/src/snmpa.xml | 8 ++--- lib/snmp/doc/src/snmpm.xml | 12 ++++--- 3 files changed, 54 insertions(+), 46 deletions(-) (limited to 'lib/snmp/doc/src') diff --git a/lib/snmp/doc/src/snmp.xml b/lib/snmp/doc/src/snmp.xml index 3e6610891f..97b479385c 100644 --- a/lib/snmp/doc/src/snmp.xml +++ b/lib/snmp/doc/src/snmp.xml @@ -341,8 +341,9 @@ log_to_txt(LogDir, Mibs, OutFile, LogName, LogFile) -> ok | {error, Reason} - log_to_txt(LogDir, Mibs, OutFile, LogName, LogFile, Start) -> ok | {error, Reason} - log_to_txt(LogDir, Mibs, OutFile, LogName, LogFile, Start, Stop) -> ok | {error, Reason} + log_to_txt(LogDir, Mibs, OutFile, LogName, LogFile, Block | Start) -> ok | {error, Reason} + log_to_txt(LogDir, Mibs, OutFile, LogName, LogFile, Start, Block | Stop) -> ok | {error, Reason} + log_to_txt(LogDir, Mibs, OutFile, LogName, LogFile, Start, Stop, Block) -> ok | {error, Reason} Convert an Audit Trail Log to text format LogDir = string() @@ -352,53 +353,56 @@ LogName = string() LogFile = string() Start = Stop = null | datetime() | {local_time,datetime()} | {universal_time,datetime()} + Block = boolean() Reason = term() -

Converts an Audit Trail Log to a readable text file, where - each item has a trailing TAB character, and any TAB - character in the body of an item has been replaced by ESC - TAB. -

+

Converts an Audit Trail Log to a readable text file, where + each item has a trailing TAB character, and any TAB + character in the body of an item has been replaced by ESC + TAB.

The function can be used on a running system, or by copying - the entire log directory and calling this function. SNMP - must be running in order to provide MIB information. -

+ the entire log directory and calling this function. SNMP + must be running in order to provide MIB information.

LogDir is the name of the directory where the audit - trail log is stored. - Mibs is a list of Mibs to be used. The function uses - the information in the Mibs to convert for example object - identifiers to their symbolic name. - OutFile is the name of the generated text-file. - LogName is the name of the log, - LogFile is the name of the log file. - Start is the start (first) date and time from which - log events will be converted and - Stop is the stop (last) date and time to which log - events will be converted. -

-

The format of an audit trail log text item is as follows: -

-

Tag Addr - Community [TimeStamp] Vsn

- PDU

-

where Tag is request, response, - report, trap or inform; Addr is - IP:Port (or comma space separated list of such); - Community is the community parameter (SNMP version - v1 and v2), or SecLevel:"AuthEngineID":"UserName" - (SNMP v3); TimeStamp is a date and time stamp, - and Vsn is the SNMP version. PDU is a textual - version of the protocol data unit. There is a new line - between Vsn and PDU.

- + trail log is stored. + Mibs is a list of Mibs to be used. The function uses + the information in the Mibs to convert for example object + identifiers to their symbolic name. + OutFile is the name of the generated text-file. + LogName is the name of the log, + LogFile is the name of the log file. + Start is the start (first) date and time from which + log events will be converted and + Stop is the stop (last) date and time to which log + events will be converted. + The Block argument indicates if the log should be blocked + during conversion. This could be usefull when converting large + logs (when otherwise the log could wrap during conversion). + Defaults to true. +

+

The format of an audit trail log text item is as follows:

+

Tag Addr - Community [TimeStamp] Vsn

+ PDU

+

where Tag is request, response, + report, trap or inform; Addr is + IP:Port (or comma space separated list of such); + Community is the community parameter (SNMP version + v1 and v2), or SecLevel:"AuthEngineID":"UserName" + (SNMP v3); TimeStamp is a date and time stamp, + and Vsn is the SNMP version. PDU is a textual + version of the protocol data unit. There is a new line + between Vsn and PDU.

+
log_to_io(LogDir, Mibs, LogName, LogFile) -> ok | {error, Reason} - log_to_io(LogDir, Mibs, LogName, LogFile, Start) -> ok | {error, Reason} - log_to_io(LogDir, Mibs, LogName, LogFile, Start, Stop) -> ok | {error, Reason} + log_to_io(LogDir, Mibs, LogName, LogFile, Block | Start) -> ok | {error, Reason} + log_to_io(LogDir, Mibs, LogName, LogFile, Start, Block | Stop) -> ok | {error, Reason} + log_to_io(LogDir, Mibs, LogName, LogFile, Start, Stop, Block) -> ok | {error, Reason} Convert an Audit Trail Log to text format LogDir = string() diff --git a/lib/snmp/doc/src/snmpa.xml b/lib/snmp/doc/src/snmpa.xml index 29e8869401..cc8681e5c8 100644 --- a/lib/snmp/doc/src/snmpa.xml +++ b/lib/snmp/doc/src/snmpa.xml @@ -570,7 +570,7 @@ notification_delivery_info() = #snmpa_notification_delivery_info{} LogDir = string() Mibs = [MibName] MibName = string() - Block = block() + Block = boolean() OutFile = string() LogName = string() LogFile = string() @@ -587,7 +587,7 @@ notification_delivery_info() = #snmpa_notification_delivery_info{}

The Block option indicates if the log should be blocked during conversion. This could be usefull when converting large logs (when otherwise the log could wrap during conversion). - Defaults to false.

+ Defaults to true.

See snmp:log_to_txt for more info.

@@ -609,7 +609,7 @@ notification_delivery_info() = #snmpa_notification_delivery_info{} LogDir = string() Mibs = [MibName] MibName = string() - Block = block() + Block = boolean() LogName = string() LogFile = string() Start = Stop = null | calendar:datetime() | {local_time, calendar:datetime()} | {universal_time, calendar:datetime()} @@ -625,7 +625,7 @@ notification_delivery_info() = #snmpa_notification_delivery_info{}

The Block option indicates if the log should be blocked during conversion. This could be usefull when converting large logs (when otherwise the log could wrap during conversion). - Defaults to false.

+ Defaults to true.

See snmp:log_to_io for more info.

diff --git a/lib/snmp/doc/src/snmpm.xml b/lib/snmp/doc/src/snmpm.xml index f7b7e6220e..a0a1b5716d 100644 --- a/lib/snmp/doc/src/snmpm.xml +++ b/lib/snmp/doc/src/snmpm.xml @@ -1223,7 +1223,7 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1 LogDir = string() Mibs = [MibName] MibName = string() - Block = block() + Block = boolean() OutFile = string() LogName = string() LogFile = string() @@ -1237,10 +1237,10 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1 OutFile defaults to "./snmpm_log.txt". LogName defaults to "snmpm_log". LogFile defaults to "snmpm.log". -

The Block option indicates if the log should be blocked +

The Block argument indicates if the log should be blocked during conversion. This could be usefull when converting large logs (when otherwise the log could wrap during conversion). - Defaults to false.

+ Defaults to true.

See snmp:log_to_txt for more info.

@@ -1263,7 +1263,7 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1 LogDir = string() Mibs = [MibName] MibName = string() - Block = block() + Block = boolean() LogName = string() LogFile = string() Start = Stop = null | calendar:datetime() | {local_time, calendar:datetime()} | {universal_time, calendar:datetime()} @@ -1276,6 +1276,10 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1 prints it on stdio. LogName defaults to "snmpm_log". LogFile defaults to "snmpm.log". +

The Block argument indicates if the log should be blocked + during conversion. This could be usefull when converting large + logs (when otherwise the log could wrap during conversion). + Defaults to true.

See snmp:log_to_io for more info.

-- cgit v1.2.3