HPSS Mass StorageRelated InformationHPSS Software DownloadsHPSS Collaboration |
Accessing HPSS - SleepersSleepers are only available using the HSI or PFTP clients from NERSC production machines. When scheduled maintenance or unexpected events necessitate taking HPSS down, "sleepers" are enabled. This causes all jobs attempting to use HPSS to wait. Usually this causes no problems for these jobs, which resume safely when sleepers are removed. However, users may wish to test for HPSS system availability, and take alternate actions based on this, so a way to detect sleepers is available. Testing for sleepers can be accomplished by using the "hpss_avail" utility, which is available on all NERSC supercomputers. This utility takes a single argument, which may be "archive", "hpss", or "help"; case is not significant. Any other argument, or none, will result in usage text being returned. The "help" argument will result in more detailed help text. The utility returns its result in the predefined shell variable "status ($? in some shells)". It may be tested, used in a subsequent shell command, or output. Its value will persist only until the next shell command is executed, and then it will be overwritten by the results of that next command. Here are two examples of querying a system and printing a message based on the returned status value. The first uses the C Shell and the second the Korn shell. #!/bin/csh hpss_avail archive; set READY=$status if ($READY == 0) then echo "ARCHIVE up and available" else echo "ARCHIVE is unavailable" endif #!/usr/bin/ksh hpss_avail archive READY=$? if [ $READY -eq 0 ]; then echo "ARCHIVE up and available" else echo "ARCHIVE is unavailable" fi Possible alternative actions to take when sleepers are enabled might include (1) moving files to alternate file systems, such as $HOME; or (2) changing file names to prevent overwriting or name collisions by subsequent file creations. |
Page last modified: Thu, 27 May 2004 22:50:16 GMT Page URL: http://www.nersc.gov/nusers/systems/hpss/usage_sleepers.php Web contact: webmaster@nersc.gov Computing questions: consult@nersc.gov Privacy and Security Notice |