...
It should be run from a release as described above. The available options are:
-p : ssh to all host in parallel
-w : wait for all hosts do be done. Only useful with -p option.
-e : Setup the release environment on the remote host. With out this option the
command to be run has to be found in the default PATH of the glastdat
-s srv1,srv2,..,srvn : list of servers to run the command
-f <flist> : read server list from a file. The file is looked for in /afs/slac.stanford.edu/g/glast/applications/xrootd/config/
Anchor | ||||
---|---|---|---|---|
|
...
The SrvMpsPurge.sh script is use to remove old recon files from a xrootd server. The script has hard coded into it the location of the list with the old recon files. It employs another script (mps_purge.py) that does the workscript reads from a file the list of recon files that can be purged from a xrootd server. Purging a file includes the following steps:
#) Check if file is on disk
#) compare Check if file is marked as migrated. On Solaris this means comparing a files mtime with the one of the corresponding .lock file to find out if the file has been migrated to HPSSfiles. On linux xattrs are used instead.
#) If the file is marked as migrated check in HPSS if the file exists and compare file sizes.
#) remove file (and .lock file) if the check in HPSS succeeded.
The purge script works only on Solaris servers as they use .lock files to indicate the migration status. The Linux servers are using extended file attributes.
SrvMpsPurge.SrvPurgeFiles.sh accepts a few options (all optional)
Code Block |
---|
-l write output to log file -n number of files to purge -T test, print only command and exit |
A typical example to run the purge on all xrootd Solaris (wain, sulky) servers is:
Code Block |
---|
% cd /u/gl/glastdat/releases/admin/ % . bin/wk_env % ScaRunOnHosts -f glastsolglast -pr -w -e -r -- SrvMpsPurgeSrvPurgeFiles.sh -l |
The above command will ssh to all Solaris xrootd servers and run do the SrvMpsPurgepurge. sh script. Log files are written to the directory /var/adm/mps/logs (Solaris) or /var/adm/frm/logs (Linux) and the logfile name is rmpurge_file.YYYYMMDDTHHMMSS. As all output from SrvMpsPurgeSrvPurgeFiles.sh_ is written to a log file one will not see any output from the command above.
Running only on a single server run and purge no more then 20 files:
...
.
...
...