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_calculo.ksh

    r61 r67  
    174174 
    175175#D-#================================================== 
    176 #D-function IGCM_sys_Nb_files_archive 
    177 #D-* Purpose: Count files on Archive filesystem 
    178 #D-* Examples: 
    179 #D- 
    180 function IGCM_sys_Nb_files_archive { 
    181    ls ${@} 2>/dev/null | wc -l 
    182    if [ $? -gt 0 ] ; then 
    183        echo "IGCM_sys_RshArchive : erreur." 
    184    fi 
    185 } 
    186  
    187 #D-#================================================== 
    188176#D-function IGCM_sys_RshPost 
    189177#D-* Purpose: Master rsh command 
     
    353341        echo "IGCM_sys_TestDir :" $@ 
    354342    fi 
    355     if [ ! -d ${1} ]; then 
    356         echo "IGCM_sys_TestDir : Directory $1 does not exist." 
    357         IGCM_debug_Exit "IGCM_sys_TestDir" 
    358     fi 
     343    typeset ExistFlag 
     344    ExistFlag=$( [ -d $1 ] && echo 0 || echo 1 ) 
    359345    IGCM_debug_PopStack "IGCM_sys_TestDir" 
     346 
     347    return ${ExistFlag} 
    360348} 
    361349 
     
    370358        echo "IGCM_sys_TestDirArchive :" $@ 
    371359    fi 
    372     if [ ! -d ${1} ]; then 
    373         echo "IGCM_sys_TestDirArchive : Directory $1 does not exist on ${ARCHIVE}." 
    374         IGCM_debug_Exit "IGCM_sys_TestDirArchive" 
    375     fi 
     360    typeset ExistFlag 
     361    ExistFlag=$( [ -d $1 ] && echo 0 || echo 1 ) 
    376362    IGCM_debug_PopStack "IGCM_sys_TestDirArchive" 
     363 
     364    return ${ExistFlag} 
    377365} 
    378366 
     
    387375        echo "IGCM_sys_TestFileArchive :" $@ 
    388376    fi 
    389     if [ ! -f ${1} ]; then 
    390         IGCM_debug_PopStack "IGCM_sys_TestFileArchive" 
    391         return 1 
    392     else 
    393         IGCM_debug_PopStack "IGCM_sys_TestFileArchive" 
    394         return 0 
    395     fi 
     377    typeset ExistFlag 
     378    ExistFlag=$( [ -f $1 ] && echo 0 || echo 1 ) 
     379    IGCM_debug_PopStack "IGCM_sys_TestFileArchive" 
     380 
     381    return ${ExistFlag} 
     382} 
     383 
     384#D-#================================================== 
     385#D-function IGCM_sys_CountFileArchive 
     386#D-* Purpose: Count files on Archive filesystem 
     387#D-* Examples: 
     388#D- 
     389function IGCM_sys_CountFileArchive { 
     390    IGCM_debug_PushStack "IGCM_sys_CountFileArchive" $@ 
     391    ls ${@} 2>/dev/null | wc -l 
     392    if [ $? -gt 0 ] ; then 
     393        echo "IGCM_sys_CountFileArchive : erreur." 
     394    fi 
     395    IGCM_debug_PopStack "IGCM_sys_CountFileArchive" 
    396396} 
    397397 
Note: See TracChangeset for help on using the changeset viewer.