The following are examples of working with the get, clear, and get_and_clear commands.
To get the log from a Screen you are logged into (primary or secondary) and store the filtered result in a local file:
admin% ssadm -r Screen log get [filterargs] >local_log_file |
See "Log Filters and the logdump Command" for information about filtering.
admin% ssadm -r Screen log clear |
To get the log, store the filtered result in a local file, and clear the log:
admin% ssadm -r Screen log get_and_clear [filterargs] >local_log_file |
The get_and_clear and clear verbs take an optional argument, -U: a designation of the user who cleared the log. This text string is displayed when log statistics are retrieved.
Here are examples of the get_and_clear and clear commands. To get and clear the log, setting the user designator as "ben":
admin% ssadm -r Screen log -U "ben" get_and_clear [filterargs]>local_file |
To clear the log, setting the user designator as "Ben" and commenting that Ben should reset a counter or something after moving a file:
admin% ssadm -r Screen log -U "Ben: reset after move" clear |