SunScreen 3.1 Reference Manual

Log Retrieval and Clearing

A Screen's log is retrieved and can be cleared using the log subcommand of ssadm. Filtering can be applied by the Screen during retrieval, reducing the content of the log retrieved (see "Log Inspection and Browsing").

You can retrieve and postprocess logs on an automated basis (details regarding automated log management can be found in the man page for sslogmgmt(1M).) The maintenance command sslogmgmt(1M) automates management of SunScreen logs for a group of centrally managed Screens. It can be run manually, as it is designed to run as a cron(1M) job. It is available through SUNWicgSA.

TABLE 11-2 show the thee subcommands for log.

Table 11-2 log Subcommands

Subcommand 

Description 

get

Retrieves the current content of the log, but leaves it intact. 

get_and_clear

Combines these two functions, clearing the log through the point to which it was retrieved. 

clear

Makes the current content of the log inaccessible for further retrieval operations. 

Retrieval of the log produces the (binary) log records on the standard output of ssadm. This is either redirected to a file or perhaps piped into other processes, such as ssadm logdump for viewing, further filtering, and so forth. Manipulation of the output stream should be performed by the shell you are using on your administration platform.


Note -

The get_and_clear operation clears the log when the Screen producing the log finishes writing to the connection used to retrieve it. If the administration platform crashes, the disk to which the log is being written fills, or other exceptional conditions occur near the end of the retrieval, the clear phase can complete and some log records can be lost.


The following is an example of what you would type to get the log from a given (primary or secondary) Screen to store in a local file:


admin% ssadm -r Screen log get [filterargs] >local_log_file

The following is an example of what you would type to get and clear the log atomically:


admin% ssadm -r Screen log get_and_clear [filterargs] >local_log_file

The following is an example of what you would type to simply clear the log:


admin% ssadm -r Screen log clear

The get_and_clear and clear verbs take an optional argument: a designation of who cleared the log. This is a text string that is displayed when log statistics are retrieved.

The following is an example of what you would type to get and clear the log, setting this designator:


admin% ssadm -r Screen log -U "ben" get_and_clear [filterargs]>local_file

The following is an example of what you would type to simply clear the log, setting this designator:


admin% ssadm -r Screen log -U "Ben: reset after move" clear