Ignore:
Timestamp:
03/18/09 18:37:16 (15 years ago)
Author:
sdipsl
Message:

libIGCM is ready for ulam except concerning the monitoring

  • fix issue due to mfls (chaotic behaviour) do not use mfls anymore
  • change due to the fact that ulam do not see gaya : imply some libsys homogeneisation
  • atlas/monitoring01 needs an adaptation to ulam (because of "ls $homegaya" like command)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh

    r61 r67  
    175175 
    176176#D-#================================================== 
    177 #D-function IGCM_sys_Nb_files_archive 
    178 #D-* Purpose: Count files on Archive filesystem 
    179 #D-* Examples: 
    180 #D- 
    181 function IGCM_sys_Nb_files_archive { 
    182    ls ${@} 2>/dev/null | wc -l 
    183    if [ $? -gt 0 ] ; then 
    184        echo "IGCM_sys_RshArchive : erreur." 
    185    fi 
    186 } 
    187  
    188 #D-#================================================== 
    189177#D-function IGCM_sys_RshPost 
    190178#D-* Purpose: Master rsh command 
     
    354342        echo "IGCM_sys_TestDir :" $@ 
    355343    fi 
    356     if [ ! -d ${1} ]; then 
    357         echo "IGCM_sys_TestDir : Directory $1 does not exist." 
    358         IGCM_debug_Exit "IGCM_sys_TestDir" 
    359     fi 
     344    typeset ExistFlag 
     345    ExistFlag=$( [ -d $1 ] && echo 0 || echo 1 ) 
    360346    IGCM_debug_PopStack "IGCM_sys_TestDir" 
     347 
     348    return ${ExistFlag} 
    361349} 
    362350 
     
    371359        echo "IGCM_sys_TestDirArchive :" $@ 
    372360    fi 
    373     if [ ! -d ${1} ]; then 
    374         echo "IGCM_sys_TestDirArchive : Directory $1 does not exist on ${ARCHIVE}." 
    375         IGCM_debug_Exit "IGCM_sys_TestDirArchive" 
    376     fi 
     361    typeset ExistFlag 
     362    ExistFlag=$( [ -d $1 ] && echo 0 || echo 1 ) 
    377363    IGCM_debug_PopStack "IGCM_sys_TestDirArchive" 
     364 
     365    return ${ExistFlag} 
    378366} 
    379367 
     
    388376        echo "IGCM_sys_TestFileArchive :" $@ 
    389377    fi 
    390     if [ ! -f ${1} ]; then 
    391         IGCM_debug_PopStack "IGCM_sys_TestFileArchive" 
    392         return 1 
    393     else 
    394         IGCM_debug_PopStack "IGCM_sys_TestFileArchive" 
    395         return 0 
    396     fi 
     378    typeset ExistFlag 
     379    ExistFlag=$( [ -f $1 ] && echo 0 || echo 1 ) 
     380    IGCM_debug_PopStack "IGCM_sys_TestFileArchive" 
     381 
     382    return ${ExistFlag} 
     383} 
     384 
     385#D-#================================================== 
     386#D-function IGCM_sys_CountFileArchive 
     387#D-* Purpose: Count files on Archive filesystem 
     388#D-* Examples: 
     389#D- 
     390function IGCM_sys_CountFileArchive { 
     391    IGCM_debug_PushStack "IGCM_sys_CountFileArchive" $@ 
     392    ls ${@} 2>/dev/null | wc -l 
     393    if [ $? -gt 0 ] ; then 
     394        echo "IGCM_sys_CountFileArchive : erreur." 
     395    fi 
     396    IGCM_debug_PopStack "IGCM_sys_CountFileArchive" 
    397397} 
    398398 
Note: See TracChangeset for help on using the changeset viewer.