[p4] How to list stale client spec's

Jeff Grills jgrills at junctionpoint.com
Wed Oct 18 09:23:40 PDT 2006


I have a script in the public perforce depot that does this.

http://public.perforce.com/guest/jeff_grills/misc/p4ClientAccess.pl 

It uses "p4 -ztag clients" to get the access date for each client, sorts
them from oldest to newest, and then prints one line per client with the
time and date last used as well as the client's name.  Here's a small bit of
the output from our server:

	2006/10/15 23:04:27 jgrills-home
	2006/10/18 11:13:49 jgrills-wrkjgrills


If you want to purge orphaned clients, my experiences indicate that it's
best to set it up as an automated process.  When you detect a client is past
a certain age (like 30 or 60 days), start sending warnings that if the
client doesn't get used, it will be automatically deleted.  Send a several
warnings over several weeks in case people are on vacation.  It's also nice
if you explain in the warnings how to "touch" their client so that it's
access time gets updated to prevent it from being deleted.

j

> -----Original Message-----
> From: perforce-user-bounces at perforce.com 
> [mailto:perforce-user-bounces at perforce.com] On Behalf Of 
> Helck, Christopher
> Sent: Tuesday, October 17, 2006 3:36 PM
> To: perforce-user at perforce.com
> Subject: [p4] How to list stale client spec's
> 
> Hi,
> 
> Is there a way to list when a client spec was last used? I 
> see that 'p4 clients' lists the modification date that the 
> spec was last changed on.
> What I want is to know is the last time someone did a sync or submit.
> 
> My intent is to get a list of old or unused client specs and 
> ask my users to clean them up.
> 
> Thanks,
> C. Helck
> 
> 
>  
> Thank you for being part of it.


More information about the perforce-user mailing list