Difference: APPXAuditLog (14 vs. 15)

Revision 152008-10-29 - SteveFrizzell

Line: 1 to 1
 
META TOPICPARENT name="APPX500Features"

APPX Audit Log Feature 

Line: 67 to 67
  When creating an instance of an APPX Audit Log Service, the -ServiceType option must be specified.  The value of this option must be "logmonitor".

TCP/IP Port Number

Changed:
<
<
When creating an instance of an APPX Audit Log Service, the -SockPort option must be used to specify the TCP/IP port number on which the service is to listen for audit logging requests. Any available TCP/IP port number may be specified when installing an instance of the APPX Audit Log Service. However, as a matter of convention, most APPX administrators configure the APPX Audit Log Service to listen for connections on port 8070. If additional instances of the APPX Audit Log Service are configured, each instance is typically assigned the next available port number after 8070.
>
>
When creating an instance of an APPX Audit Log Service, the -SockPort option must be used to specify the TCP/IP port number on which the service is to listen for audit logging requests. Any available TCP/IP port number may be specified when installing an instance of the APPX Audit Log Service. However, as a matter of convention, most APPX administrators configure the APPX Audit Log Service to listen for audit log requests on port 8070. If additional instances of the APPX Audit Log Service are configured, each instance is typically assigned the next available port number after 8070.
 

Changing the Configuration of an Audit Log Service

Two methods are available for modifying an existing instance of an APPX Audit Log Service.

Line: 102 to 102
  appxAuditMgr -install -ServiceType=logmonitor -SockPort=[TCP-Port] [options]... [VARIABLE=VALUE]...
Changed:
<
<
appxLoginMgr -modify -serviceName=SERVICENAME [options]... [VARIABLE=VALUE]...
>
>
appxAuditMgr -modify -serviceName=SERVICENAME [options]... [VARIABLE=VALUE]...
 
Changed:
<
<
appxLoginMgr -replace -serviceName=SERVICENAME -ServiceType=logmonitor [options]... [VARIABLE=VALUE]...
>
>
appxAuditMgr -replace -serviceName=SERVICENAME -ServiceType=logmonitor [options]... [VARIABLE=VALUE]...
 
Changed:
<
<
appxLoginMgr -remove -serviceName=SERVICENAME
>
>
appxAuditMgr -remove -serviceName=SERVICENAME
 

Configuration - Commands

Line: 218 to 218
  Example 5 - Modify the Display Name and the maximum size of the log of an existing service:
Changed:
<
<
appxLoginMgr -modify -name=appxLog8070 -displayName="Big Audit Log" -LogRotationSize=10G
>
>
appxAuditMgr -modify -name=appxLog8070 -displayName="Big Audit Log" -LogRotationSize=10G
 

The Configuration File (ini)

Changed:
<
<
Each instance of an APPX Audit Log Service has a configuration file that is used to store the various parameters relating to that specific instance of the connection service.
>
>
Each instance of an APPX Audit Log Service has a configuration file that is used to store the various parameters relating to that specific instance of the Audit Log Service.
 
Changed:
<
<
The -install option of the appxLoginMgr command creates the configuration file when the service is created.
>
>
The -install option of the appxAuditMgr command creates the configuration file when the service is created.
  The name of the configuration file is the concatenation of the service name and ".ini". For example, if the service name is "appxLog8070", the name of the configuration file will be "appxLog8070.ini".
Changed:
<
<
The configuration file is created in whichever directory is your current directory at the time that the appxLoginMgr command is run to create the service. Therefore, before you run the appxLoginMgr command to create a service, you must first change to the directory where you want the configuration file to reside. For example, if you want the configuration file to be created in the APPX services directory, you should change to the services directory before you run the appxLoginMgr command.
>
>
The configuration file is created in whichever directory is your current directory at the time that the appxAuditMgr command is run to create the service. Therefore, before you run the appxAuditMgr command to create a service, you must first change to the directory where you want the configuration file to reside. For example, if you want the configuration file to be created in the APPX services directory, you should change to the services directory before you run the appxAuditMgr command.
  Once created, the name of the configuration file and the location of the configuration file should not be changed. The service that is created will not work correctly if the name or the location of the configuration file is changed.
Changed:
<
<
Note: The Configuration file for an APPX Audit Log service (as shown below) looks very much like the configuration file for an APPX Login Manager service.  You should ignore the configuration options that do not apply to an APPX Audit Log service.  These irrelevant options are of no consequence and will be removed in a future release. 
>
>
Note: The Configuration file for an APPX Audit Log service (as shown below) looks very much like the configuration file for an APPX Login Manager service.  You should ignore the configuration options that do not apply to an APPX Audit Log service.  Note that the extraneous options are all preceded by a "#" which causes them to be treated as comments.  Although these extraneous options are of no consequence, they will be removed in a future release. 
 

# Appx connection manager configuration file

Line: 253 to 253
 # AppxProcessName            =                     #startup process name for spawned engines # AppxProcessType            =                     #startup process type for spawned engines # AuthenticationMethod       = OS-User             #authentication method (OS-User, Appx-User, HT-User(filename))
Changed:
<
<
DisplayName                  = AppxLog8070         #descriptive name
>
>
DisplayName                  = appxLog8070         #descriptive name
 # ImpersonateGID             = true                #change effective grouo ID for spawned engines? # ImpersonateGroup           = User                #[LogonUser, NamedGroup(groupname), ServiceOwner] # ImpersonateUID             = true                #change effective user ID for spawned engines?
Line: 273 to 273
 # ServiceDisableFMS          = false               #disable AppxNET connections? # ServiceDisableLogins       = false               #disable interactive logins? # ServiceEnableCmds          = true                #allow client-side startup options?
Changed:
<
<
ServiceName                  = AppxLog8070         #name of service
>
>
ServiceName                  = appxLog8070         #name of service
 ServiceType                  = logmonitor          #service type (login or logmonitor) SockPort                     = 8070                #port number to service # SSLMode                    = Optional            #SSL connection type (optional, required, disabled)
Line: 288 to 288
 

The Environment File (env)

Changed:
<
<
Each instance of an APPX Audit Log Service has an environment file that is used to store the environment variables relating to that specific instance of the connection service. However, there is currently no requirement to set any environment variables when configuring an APPX Audit Log service.
>
>
Each instance of an APPX Audit Log Service has an environment file that is used to store the environment variables relating to that specific instance of the Audit Log Service. However, there is currently no requirement to set any environment variables when configuring an APPX Audit Log service.
  The -install option of the appxAuditMgr command creates the environment file when the service is created.
Line: 322 to 322
 The status file can be viewed to see the actual context within which the service is running.

Changed:
<
<
appxd-8430 running as process 28192
>
>
appxLog8070 running as process 8665
 Effective User ID 0
Changed:
<
<
Real User ID 0
>
>
Real User ID      0
 Configuration values follow *Daemonize = true *DontForkEngine = false
Line: 332 to 332
 *SleepAfterFork = AppxApplication = AppxDatabase =
Changed:
<
<
AppxExecutable = ../appx
>
>
AppxExecutable = /usr/local/appx500/appx
 AppxProcessName = AppxProcessType = AuthenticationMethod = OS-User
Changed:
<
<
DisplayName = appxd-8430
>
>
DisplayName = AppxLog8070
 ImpersonateGID = true ImpersonateGroup = User ImpersonateUID = true ImpersonateUser = LogonUser
Changed:
<
<
IncludeSystemEnv = true
>
>
LoadSystemEnvironment = true
 LogDirectory = /tmp LogNamePattern = /tmp/appxlog%N.xml LogRotationInterval = 86400
Line: 357 to 357
 ServiceDisableLogins = false ServiceDisableODBC = ServiceEnableCmds = true
Changed:
<
<
ServiceName = appxd-8430 ServiceType = login SockPort = 8430
>
>
ServiceName = AppxLog8070 ServiceType = logmonitor SockPort = 8070
 SSLMode = Optional TCPEnableKeepAlive = true TCPKeepCount = 8
Line: 369 to 369
 TrustedCAFile = Umask = Environment variables follow
Changed:
<
<
APPX_KEYMAP = WINDOWS
>
>
Logging to /tmp/appxlog3.xml
 

The Log File (log)

Line: 387 to 387
 *SleepAfterFork = AppxApplication = AppxDatabase =
Changed:
<
<
AppxExecutable = ../appx
>
>
AppxExecutable = /usr/local/appx500/appx
 AppxProcessName = AppxProcessType = AuthenticationMethod = OS-User
Changed:
<
<
DisplayName = appxd-8430
>
>
DisplayName = appxLog8070
 ImpersonateGID = true ImpersonateGroup = User ImpersonateUID = true ImpersonateUser = LogonUser
Changed:
<
<
IncludeSystemEnv = true
>
>
LoadSystemEnvironment = true
 LogDirectory = /tmp LogNamePattern = /tmp/appxlog%N.xml LogRotationInterval = 86400
Line: 412 to 412
 ServiceDisableLogins = false ServiceDisableODBC = ServiceEnableCmds = true
Changed:
<
<
ServiceName = appxd-8430 ServiceType = login SockPort = 8430
>
>
ServiceName = appxLog8070 ServiceType = logmonitor SockPort = 8070
 SSLMode = Optional TCPEnableKeepAlive = true TCPKeepCount = 8
Line: 423 to 423
 TCPNoDelay = true TrustedCAFile = Umask =
Changed:
<
<
createListener complete - listening on port 8430
>
>
createListener complete - listening on port 8070
 CAppxD::Run starting
Changed:
<
<
handleClients - starting handleClients - waiting
>
>
monitorLog - starting
 
Line: 438 to 437
 

Synopsis - service Command

service [serviceName] [start|stop|restart|status]

Added:
>
>

Examples:

Warnings:

Issues:

Enhancement Suggestions

 

Notes

Added:
>
>

More About Log Profiles

 
Changed:
<
<
For example, here is a command to create a log monitor:

./appxAuditMgr -install -serviceType=logmonitor -name=myLogMonitor -port=8064

Port number has to be different from the port number you are using for your users to login.

This port is not a listener, so you can not login directly to that port.

Once you have created this new Service Type, it will create .ini and .env files for you. In our example, appxAuditMgr will create myLogMonitor.ini and myLogMonitor.env files in the ./services directory. You can change the name of the log file (which defaults to /tmp/appxlog%N.xml) by setting the LogNamePattern in the myLogMonitor.ini file. You can also change the LogRotationInterval and LogRotationSize.

Since we rotate audit logs, you specify a LogNamePattern instead of just a filename. The pattern can include %N (which is translated to a monotonically increasing counter: 0, 1, 2, ..) or any of the date/time format specs. supported by the strftime() function (see 'man strftime' for a list of the patterns). For example, a LogNamePattern of '/tmp/appx_%F.xml' would generate names like:

/tmp/appx_2007-01-31.xml

/tmp/appx_2007-02-28.xml

The default pattern (as reflected in the serviceName. ini file) is:

LogNamePattern = /tmp/appxlog%N.xml

Each time the log monitor rotates to a new log file, it replaces %N with the next number in sequence (it was always starting at 0). You can use other specifiers in the LogNamePattern too, for example, "/tmp/appx-%D-%B-%Y" would result in file names like:

/tmp/appx-11-Jun-08

/tmp/appx-12-Jun-08

...

>
>
Before data can be written to the log file in XML format, you need to define a Log Profile for the monitor.
 
Changed:
<
<
If you restart the log monitor on 11-Jun-08 (and your LogNamePattern specifies %D-%B-%Y), any existing log file with that name would be replaced. Of course, you can include time components in the LogNamePattern to avoid that problem (or add %N to the pattern to include a sequence number). Here's the complete list of valid specifiers (from the strftime man page):
>
>
To define FMS group, go to System Administration, Configuration, Log Profile press F9 to add a new profile. You can name it anything you want. For server name you must give it your server name:port number that you created earlier with appxAuditMgr:
 
Changed:
<
<
%a The abbreviated weekday name according to the current locale.
>
>
<?XML:NAMESPACE PREFIX = V />@0 1 0">@1">@2 1 2">@3 21600 pixelWidth">@3 21600 pixelHeight">@0 0 1">servername:8064

Then click on Log File Parameters and make sure you check parameters that you wish to log:

Now you are ready to define a new FMS group for the monitor.

To add a new FMS group you need to go to System Administration, Configuration, File System Groups and press F9 to add a new one for the monitor.

Give it an FMS group of 1 and click on 'FMS group attributes' button. On that screen enter the name of your Log Profile in the 'Log Profile' field. Note that if you already have an FMS group that is used by the file(s) you wish to monitor, you can simply add the Log Profile name to the existing FMS group. If the FMS group refers to a RDBMS (such as Oracle, SQL Server, etc), then only changes made by Appx will be logged.

You can now assign this FMS group to the file(s) that you wish to monitor.

More About the xml Audit Log file

Using a Pattern in a Log File Name

Once you have created this new Service Type, it will create .ini and .env files for you. In our example, appxAuditMgr will create myLogMonitor.ini and myLogMonitor.env files in the ./services directory. You can change the name of the log file (which defaults to /tmp/appxlog%N.xml) by setting the LogNamePattern in the myLogMonitor.ini file. You can also change the LogRotationInterval and LogRotationSize.

Since we rotate audit logs, you specify a LogNamePattern instead of just a filename. The pattern can include %N (which is translated to a monotonically increasing counter: 0, 1, 2, ..) or any of the date/time format specs. supported by the strftime() function (see 'man strftime' for a list of the patterns). For example, a LogNamePattern of '/tmp/appx_%F.xml' would generate names like:

/tmp/appx_2007-01-31.xml

/tmp/appx_2007-02-28.xml

The default pattern (as reflected in the serviceName. ini file) is:

LogNamePattern = /tmp/appxlog%N.xml

Each time the log monitor rotates to a new log file, it replaces %N with the next number in sequence (it was always starting at 0). You can use other specifiers in the LogNamePattern too, for example, "/tmp/appx-%D-%B-%Y" would result in file names like:

/tmp/appx-11-Jun-08

/tmp/appx-12-Jun-08

...

If you restart the log monitor on 11-Jun-08 (and your LogNamePattern specifies %D-%B-%Y), any existing log file with that name would be replaced. Of course, you can include time components in the LogNamePattern to avoid that problem (or add %N to the pattern to include a sequence number). Here's the complete list of valid specifiers (from the strftime man page):

%a The abbreviated weekday name according to the current locale.

 %A The full weekday name according to the current locale. %b The abbreviated month name according to the current locale. %B The full month name according to the current locale.
Line: 515 to 512
 %Z The time zone or name or abbreviation. %+ The date and time in date(1) format. (TZ) (Not supported in glibc2.) %% A literal '%' character.
Changed:
<
<

After you have modified .ini file, you need to stop and re-start that service. To stop service, assuming you are in ./services directory of your Appx installation simply type:

./appxAuditMgr -stop -name=myLogMonitor

./appxAuditMgr -start -name=myLogMonitor

If you stop/start service as a root, make sure you give it a fully qualified path.

./appxAuditMgr -stop -name=/usr/local/appx/services/myLogMonitor

./appxAuditMgr -start -name=/usr/local/appx/services/myLogMonitor

Please note that -name parameter is required.

Before data can be written to the log file in XML format, you need to define a Log Profile for the monitor.

To define FMS group, go to System Administration, Configuration, Log Profile press F9 to add a new profile. You can name it anything you want. For server name you must give it your server name:port number that you created earlier with appxAuditMgr:

@0 1 0" _moz-userdefined="">@1" _moz-userdefined="">@2 1 2" _moz-userdefined="">@3 21600 pixelWidth" _moz-userdefined="">@3 21600 pixelHeight" _moz-userdefined="">@0 0 1" _moz-userdefined="">servername:8064

Then click on Log File Parameters and make sure you check parameters that you wish to log:

Now you are ready to define a new FMS group for the monitor.

To add a new FMS group you need to go to System Administration, Configuration, File System Groups and press F9 to add a new one for the monitor.

Give it an FMS group of 1 and click on 'FMS group attributes' button. On that screen enter the name of your Log Profile in the 'Log Profile' field. Note that if you already have an FMS group that is used by the file(s) you wish to monitor, you can simply add the Log Profile name to the existing FMS group. If the FMS group refers to a RDBMS (such as Oracle, SQL Server, etc), then only changes made by Appx will be logged.

You can now assign this FMS group to the file(s) that you wish to monitor.

To close existent log file and rotate the log, you need issue the following command:

kill -s SIGUSR1 <PID>

where PID is a process ID of the audit log listener. Existent log will be closed and rotated to the next one.

The log file is generated in XML format. Why XML, and not Appx/IO? The biggest reason is the size of the log files. On large, active systems the number of events can exceed the maximum file size. XML files can easily be imported into a RDBMS, which does not have the same file size limitation.

You can view the log file with a browser, with XML Notepad, or you can download SQL Express (free) and write queries against your XML file. You can also use the various xlst processing programs to create queries (such as xsltproc or xalan from Apache).

Each Audit Log document contains one primary enclosing <events> node which contains one or more <event> nodes. Each <event> node contains an eventID node which has a <type> element that identifies the type of event that is being logged. A variety of additional nodes (shown in the table below) are included in each <event> node depending on the value of the <type> element. The following values may occur for the <type> element:

type eventID sessionID fileID appxProcessID eventRecordID eventData Structure
Read
Yes
Yes
Yes
Yes
Indexed Files Yes No
Update
Yes
Yes
Yes
Yes
Indexed Files Yes No
Insert
Yes
Yes
Yes
Yes
Indexed Files Yes No
Delete
Yes
Yes
Yes
Yes
Indexed Files Yes No
Scratch
Yes
Yes
Yes
Yes
No
FileCreate
Yes
Yes
Yes
Yes
No Yes
Restructure
Yes
Yes
Yes
Yes
No

node node/element value
<eventID>
<type/> see above table
<timeStamp/> ccyymmddhhmmsstt
</eventID>
<sessionID>
<processID/> 9(6)
<userID/> X(3)
</sessionID>
<fileID>
<application/>
<database/>
<structureDate/>
<filename/>
</fileID>
<appxProcessID>
<type/>
<name/>
<application/>
<version/>
<database/>
<lastChange/>
</appxProcessID>
<eventRecordID>
<keySegment> 0-16 instances
</eventRecordID>
<keySegment>
<fieldName>
<fieldValue>
</keySegment>
<eventData>
<field> 0-n instances
</eventData>
<field> read, insert, delete
<fieldName>
<occurrence>
<fieldValue>
</fieldData>
<fieldData> update
<fieldName>
<oldValue>
<newValue>
</fieldData
<Structure>
<Field> 1-n instances
</Structure>
<Field>
<fieldName>
<fieldType>
<occurrences>
<rawLength>
<offset>
</Field>
<eventData>
<RecordSizeChange>
<DeletedElement>
</eventData>
<RecordSizeChange>
<old>
<new>
</RecordSizeChange>
<DeletedElement/>
<fieldName/>
</DeletedElement>

Sample scripts

Here are some sample xslt processing commands that you can use to do inquiries against the raw XML data.

The attached file 'structure.xslt' will extract any file create events from a log and produces an HTML table that shows the structure of each file that you create.

The attached file 'subrs.xslt' extracts all events where the process type is SUBR and produces an HTML summary table that shows the user id, date, time, event ID, application ID, version, and process name.

To use a stylesheet with xsltproc (the XSLT processor from libxml/xmlsoft):

$ xslt stylesheetFileName logFileName >output.html

for example:

$ xslt /stylesheets/structure.xslt /tmp/appxlog0.xml > /tmp/fileCreates.html

To use a stylesheet with xalan (the XSLT processor from Apache):

$ xalan -xsl stylesheetFileName <logFileName >output.html

for example:

$ xalan -xsl /stylesheets/structure.xslt < /tmp/appxlog0.xml > /tmp/fileCreates.html

Need examples of loading XML Data into an RDBMS

NOTES:

If log file is not closed/rotated properly, Internet Explorer will display your .xml file, but it will show an error at the end of the file saying "File not closed". Firefox, however, will throw an error and won't display file at all

In Linux, the way to close log and rotate it is to issue kill -s SIGUSR1 PID command.

How to close and rotate the log in Windows?

Comments:

Read what other users have said about this page or add your own comments.


<--/commentPlugin-->
>
>

How to Rotate the Audit Log File

To close existent log file and rotate the log, you need issue the following command:

kill -s SIGUSR1 <PID>

where PID is a process ID of the audit log listener. Existent log will be closed and rotated to the next one.

How to View Audit Log Events

The log file is generated in XML format. Why XML, and not Appx/IO? The biggest reason is the size of the log files. On large, active systems the number of events can exceed the maximum file size.

You can view the log file with a browser, with XML Notepad, or you can download SQL Express (free) and write queries against your XML file. You can also use the various xlst processing programs to create queries (such as xsltproc or xalan from Apache).

Microsoft XML Notepad

Web Browser

xslt

Databases

XML files can easily be imported into a RDBMS, which does not have the same file size limitation.

Audit Log Events

Each Audit Log document contains one primary enclosing <events> node which contains one or more <event> nodes. Each <event> node contains an eventID node which has a <type> element that identifies the type of event that is being logged. A variety of additional nodes (shown in the table below) are included in each <event> node depending on the value of the <type> element. The following values may occur for the <type> element:

type eventID sessionID fileID appxProcessID eventRecordID eventData Structure
Read
Yes
Yes
Yes
Yes
Indexed Files Yes No
Update
Yes
Yes
Yes
Yes
Indexed Files Yes No
Insert
Yes
Yes
Yes
Yes
Indexed Files Yes No
Delete
Yes
Yes
Yes
Yes
Indexed Files Yes No
Scratch
Yes
Yes
Yes
Yes
No %SPAN% %SPAN%
File Create
Yes
Yes
Yes
Yes
No %SPAN% Yes
Restructure
Yes
Yes
Yes
Yes
No %SPAN% %SPAN%

node node/element value
<eventID> %SPAN% %SPAN%
%SPAN% <type/> see above table
%SPAN% <timeStamp/> ccyymmddhhmmsstt
</eventID> %SPAN% %SPAN%
<sessionID> %SPAN% %SPAN%
%SPAN% <processID/> 9(6)
%SPAN% <userID/> X(3)
</sessionID> %SPAN% %SPAN%
<fileID> %SPAN% %SPAN%
%SPAN% <application/> %SPAN%
%SPAN% <database/> %SPAN%
%SPAN% <structureDate/> %SPAN%
%SPAN% <filename/> %SPAN%
</fileID> %SPAN% %SPAN%
<appxProcessID> %SPAN% %SPAN%
%SPAN% <type/> %SPAN%
%SPAN% <name/> %SPAN%
%SPAN% <application/> %SPAN%
%SPAN% <version/> %SPAN%
%SPAN% <database/> %SPAN%
%SPAN% <lastChange/> %SPAN%
</appxProcessID> %SPAN% %SPAN%
<eventRecordID> %SPAN% %SPAN%
%SPAN% <keySegment> 0-16 instances
</eventRecordID> %SPAN% %SPAN%
<keySegment> %SPAN% %SPAN%
%SPAN% <fieldName> %SPAN%
%SPAN% <fieldValue> %SPAN%
</keySegment> %SPAN% %SPAN%
<eventData> %SPAN% %SPAN%
%SPAN% <field> 0-n instances
</eventData> %SPAN% %SPAN%
<field> %SPAN% read, insert, delete
%SPAN% <fieldName> %SPAN%
%SPAN% <occurrence> %SPAN%
%SPAN% <fieldValue> %SPAN%
</fieldData> %SPAN% %SPAN%
<fieldData> %SPAN% update
%SPAN% <fieldName> %SPAN%
%SPAN% <oldValue> %SPAN%
%SPAN% <newValue> %SPAN%
</fieldData %SPAN% %SPAN%
<Structure> %SPAN% %SPAN%
%SPAN% <Field> 1-n instances
</Structure> %SPAN% %SPAN%
<Field> %SPAN% %SPAN%
%SPAN% <fieldName> %SPAN%
%SPAN% <fieldType> %SPAN%
%SPAN% <occurrences> %SPAN%
%SPAN% <rawLength> %SPAN%
%SPAN% <offset> %SPAN%
</Field> %SPAN% %SPAN%
<eventData> %SPAN% %SPAN%
%SPAN% <RecordSizeChange> %SPAN%
%SPAN% <DeletedElement> %SPAN%
</eventData> %SPAN% %SPAN%
<RecordSizeChange> %SPAN% %SPAN%
%SPAN% <old> %SPAN%
%SPAN% <new> %SPAN%
</RecordSizeChange> %SPAN% %SPAN%
<DeletedElement/> %SPAN% %SPAN%
%SPAN% <fieldName/> %SPAN%
</DeletedElement> %SPAN% %SPAN%

Sample scripts

Here are some sample xslt processing commands that you can use to do inquiries against the raw XML data.

The attached file 'structure.xslt' will extract any file create events from a log and produces an HTML table that shows the structure of each file that you create.

The attached file 'subrs.xslt' extracts all events where the process type is SUBR and produces an HTML summary table that shows the user id, date, time, event ID, application ID, version, and process name.

To use a stylesheet with xsltproc (the XSLT processor from libxml/xmlsoft):

$ xslt stylesheetFileName logFileName >output.html

for example:

$ xslt /stylesheets/structure.xslt /tmp/appxlog0.xml > /tmp/fileCreates.html

To use a stylesheet with xalan (the XSLT processor from Apache):

$ xalan -xsl stylesheetFileName <logFileName >output.html

for example:

$ xalan -xsl /stylesheets/structure.xslt < /tmp/appxlog0.xml > /tmp/fileCreates.html

Need examples of loading XML Data into an RDBMS

NOTES:

If log file is not closed/rotated properly, Internet Explorer will display your .xml file, but it will show an error at the end of the file saying "File not closed". Firefox, however, will throw an error and won't display file at all

In Linux, the way to close log and rotate it is to issue kill -s SIGUSR1 PID command.

How to close and rotate the log in Windows?

Comments:

Read what other users have said about this page or add your own comments.


<--/commentPlugin-->

-- SteveFrizzell - 20 Jun 2008

%META:FILEATTACHMENT{name="subrs.xslt" attachment="subrs.xslt" attr="" comment="xslt program to extract subroutine calls" date="1219770177" path="subrs.xslt" size="1866" stream="subrs.xslt" user="Main.JeanNeron" version="1"}%
 
Deleted:
<
<
-- SteveFrizzell - 20 Jun 2008
 
META FILEATTACHMENT attachment="structure.xslt" attr="" comment="xslt program to extract file create events" date="1219770121" name="structure.xslt" path="structure.xslt" size="1629" stream="structure.xslt" user="Main.JeanNeron" version="1"
Deleted:
<
<
META FILEATTACHMENT attachment="subrs.xslt" attr="" comment="xslt program to extract subroutine calls" date="1219770177" name="subrs.xslt" path="subrs.xslt" size="1866" stream="subrs.xslt" user="Main.JeanNeron" version="1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback