onfigure a time-out session for idle views

CONFIGURE VIEW SERVER PROCESS TIMEOUT PERIOD

A new feature was introduced in the following patches that allocates a time-out period for view server processes whereby they terminate themselves automatically.

Snapshot Views Only

The new feature was introduced with SNAPSHOT VIEWS ONLY in the following releases:

2003.06.00

clearcase_p2003.06.00-14

Full ClearCase UNIX

Service Release 4

Full ClearCase & CCLT Windows

clearcase_lt_p2003.06.00-10

CCLT UNIX

2002.05.00

clearcase_p2002.05.00-40

Full ClearCase UNIX

clearcase_p2002.05.00.NT-34

Full ClearCase Windows

clearcase_p2002.05.00-19

CCLT UNIX

clearcase_lt_p2002.05.00.NT-13

CCLT Windows



Dynamic Views:
The new feature was expanded to include dynamic views in ClearCase version 7.0.


INSTRUCTIONS:

To extend or shorten the time-out session, set the
CCASE_VIEW_IDLE_THRESH variable to the appropriate number of seconds.

Note: The default (and minimum) time-out for the snapshot view server processes using the variable is 2 hours and 10 minutes (7800 seconds).

Setting the
CCASE_VIEW_IDLE_THRESH to 0 (zero) turns off the time-out session (i.e., snapshot views never go idle.)

The following formula can be used to assist in calculating the number of seconds:

(h * 60 * 60) + (m * 60) = total seconds

Where h = hours and m = minutes.

Example: To calculate a 3 hour and 15 minute time-out value in seconds.

3 * 60 * 60 = 10800
15 * 60 = 900

10800 + 900 = 11700 seconds

The environment variable can be set on Windows as a system EV and on UNIX or Linux can be applied by editing the startup script (
ccase-home-dir/etc/clearcase or ccase-home-dir/bin/atria_start) to control the idle time-out.

Note: After the time out period has elapsed, running cleartool lsview may still show the dynamic view as active (an * will precede the name) or running cleartool lsview -long will show active flag set to YES. This "active" status does not refer to the state of the server process. It refers to having an open "handle" in the MVFS, local to the machine running lsview.

  • On Windows you can run albd_list to verify that the view does not have an active process id (as the view will not appear in the list returned).
  • On UNIX and Linux you run ps -elf | grep to see that there is no process that is running.

MANUALLY

If you don't have the above patches installed to better manage this behavior, you need to end the view server process. From the command line, run the cleartool endview -server command to stop the view server process after you have exited the view or are finished using it.

If running this command manually is not a viable option, consider creating a script to automate the job (see UNIX or Linux reference below for an example). There is no known script to use on Windows currently.


SCRIPT EXAMPLE (UNIX or Linux):

Here is an optional script that can be run on UNIX or Linux:

1. Create a shell script (in this example the script is named "quit") and make it executable.

=============
#! /usr/bin/sh
# this script is called "quit"

cleartool pwv -short |xargs cleartool endview -server
exit
=============


2. When exiting the view shell on UNIX or Linux, run "quit" instead of "exit" and the process will be terminated.

No comments:

Post a Comment