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

    r61 r67  
    182182 
    183183#D-#================================================== 
    184 #D-function IGCM_sys_Nb_files_archive 
    185 #D-* Purpose: Count files on Archive filesystem 
    186 #D-* Examples: 
    187 #D- 
    188 function IGCM_sys_Nb_files_archive { 
    189    ls ${@} 2>/dev/null | wc -l 
    190    if [ $? -gt 0 ] ; then 
    191        echo "IGCM_sys_RshArchive : erreur." 
    192    fi 
    193 } 
    194  
    195 #D-#================================================== 
    196184#D-function IGCM_sys_RshPost 
    197185#D-* Purpose: Master rsh command 
     
    358346        echo "IGCM_sys_TestDir :" $@ 
    359347    fi 
    360     if [ ! -d ${1} ]; then 
    361         echo "IGCM_sys_TestDir : Directory $1 does not exist." 
    362         IGCM_debug_Exit "IGCM_sys_TestDir" 
    363     fi 
     348    typeset ExistFlag 
     349    ExistFlag=$( [ -d $1 ] && echo 0 || echo 1 ) 
    364350    IGCM_debug_PopStack "IGCM_sys_TestDir" 
     351 
     352    return ${ExistFlag} 
    365353} 
    366354 
     
    375363        echo "IGCM_sys_TestDirArchive :" $@ 
    376364    fi 
    377     if [ ! -d ${1} ]; then 
    378         echo "IGCM_sys_TestDirArchive : Directory $1 does not exist on ${ARCHIVE}." 
    379         IGCM_debug_Exit "IGCM_sys_TestDirArchive" 
    380     fi 
     365    typeset ExistFlag 
     366    ExistFlag=$( [ -d $1 ] && echo 0 || echo 1 ) 
    381367    IGCM_debug_PopStack "IGCM_sys_TestDirArchive" 
     368 
     369    return ${ExistFlag} 
    382370} 
    383371 
     
    392380        echo "IGCM_sys_TestFileArchive :" $@ 
    393381    fi 
    394     if [ ! -f ${1} ]; then 
    395         IGCM_debug_PopStack "IGCM_sys_TestFileArchive" 
    396         return 1 
    397     else 
    398         IGCM_debug_PopStack "IGCM_sys_TestFileArchive" 
    399         return 0 
    400     fi 
     382    typeset ExistFlag 
     383    ExistFlag=$( [ -f $1 ] && echo 0 || echo 1 ) 
     384    IGCM_debug_PopStack "IGCM_sys_TestFileArchive" 
     385 
     386    return ${ExistFlag} 
     387} 
     388 
     389#D-#================================================== 
     390#D-function IGCM_sys_CountFileArchive 
     391#D-* Purpose: Count files on Archive filesystem 
     392#D-* Examples: 
     393#D- 
     394function IGCM_sys_CountFileArchive { 
     395    IGCM_debug_PushStack "IGCM_sys_CountFileArchive" $@ 
     396    ls ${@} 2>/dev/null | wc -l 
     397    if [ $? -gt 0 ] ; then 
     398        echo "IGCM_sys_CountFileArchive : erreur." 
     399    fi 
     400    IGCM_debug_PopStack "IGCM_sys_CountFileArchive" 
    401401} 
    402402 
Note: See TracChangeset for help on using the changeset viewer.