carta
rt-clean-sessions-3.8(8)

rt-clean-sessions-3.88

Clean old and duplicate rt sessions

Usage

rt-clean-sessions [--debug] [--older <NUM> [{H | D | M | Y}]]

rt-clean-sessions

rt-clean-sessions --debug

rt-clean-sessions --older 10D

rt-clean-sessions --debug --older 1M

rt-clean-sessions --older 10D --skip-user

Overview

Script cleans RT sessions from DB or dir with sessions data. Leaves in DB only one session per RT user and sessions that aren't older than specified(see options).

Script is safe because data in the sessions is temporary and can be deleted.

Options

older

Date interval in the "<NUM>[<unit>]" format. Default unit is D(ays), H(our), M(onth) and Y(ear) are also supported.

For example: "rt-clean-sessions --older 1M" would delete all sessions that are older than 1 month.

skip-user

By default only one session per user left in the DB, so users that have sessions on multiple computers or in different browsers will be logged out. Use this option to avoid this.

debug

Turn on debug output.

Notes

Functionality similar to this is implemented in html/Elements/SetupSessionCookie ; however, that does not guarantee that a session will be removed from disk and database soon after the timeout expires. This script, if run from a cron job, will ensure that the timed out sessions are actually removed from disk; the Mason component just ensures that the old sessions are not reusable before the cron job gets to them.

From request-tracker3.8 3.8.8-7+squeeze8 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.