NDSm::Audit

Fixed data
Volume audit record Seconds since Jan. 1. 1970 Event connectionID Username Status
Container audit record Seconds since Jan. 1. 1970 Event userID Username Status

Method Index:


Methods


new

Creates a new NDSm::Audit object which can be used to get the Audit data.
The new method takes two parameters:
$Object :
a NDSm::NWServer object if you are doing volume auditing or
a NDSm or NDSm::NDSContext object if you want container auditing.
$Name:
The name of the volume or container which auditing is enable for.
Returns a NDSm::Audit object on success, undef on failure.

Examples:
$AudObj = new NDSm::Audit($Object, $Name);
$AudObj = new NDSm::Audit($SrvObject, "SYS");
$AudObj = new NDSm::Audit($NDSmObject, "stud.ahs.hist");


Close

Close the audit session with the Netware server.
You do not need to close the session because this is done automaticly when the NDSm::Audit object is destroyed.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $AudObj->Close();

CloseRecordFile

Close a open recordfile.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $AudObj->CloseRecordFile();


GetFileList

Returns the list of old audit files for the audit object. These files are returned as an array. There can be up to
16 files in this array or none.
When calling OpenRecordFile() you should use the same index as in this array to bind to one file.
The array is constructed of "filecreateDateTime"<SPACE>"filSize" records.
In addition to the indexes used in this array you have a active file which is refered to with index -1 when calling OpenRecordFile().
Returns undef on failure or if there only are an active file, in which case you can use LastErr() to get the netware error-code.
Example:
@FileList = $AudObj->GetFileList();

IsInit

Check if the NDSm::Audit abject is initialized as it should.
Returns 1 if initalized, 0 for failure.
Example:
$IsOK = $AudObj->IsInit();

Open

Opens a handle for the NDSm::Audit object to use with the auditing system.
Returns 0 on success, Netware error code on failure.
Examples:
$ErrCode = $AudObj->Open();

OpenRecordFile

Open a audit file for reading. The $index parameter is the same as the index in array retrieved with GetFileList().
It's also possible to use -1 as index in which case the active audit file is opened for reading.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $AudObj->OpenRecordFile($index); # Some old audit file.
$ErrCode = $AudObj->OpenRecordFile(-1);  # The active auditfile.

ReadRecords

ReadRecords() return all records from the opened auditfile. Each event is returned as a single line. Each value on this line is separated with '\t'.
See the fixed data for values always present and your Netware docs for additional data.
Returns undef on failure, in which case you can use LastErr() to get the netware error-code.
Example:
@Records = $AudObj->ReadRecords();


SEE ALSO

the NDSContext class

the Misc help file

the Buf_T class

the NDSm help file

the NWServer class

http://www.ahs.hist.no/distr/NDSm/


COPYRIGHT

  Copyright (c) Steinar Kleven 1997.
  All rights reserved.