Changeset 652


Ignore:
Timestamp:
04/15/12 14:56:56 (12 years ago)
Author:
aclsce
Message:

Modified to make check_quota work on mercurex9 :

  • use of RshMaster? (waiting for ccc_quota available on SX9 nodes)
  • use of more classical command to run on SUPER-UX
File:
1 edited

Legend:

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

    r651 r652  
    15961596  fi 
    15971597  # Limit of quota (in %) 
    1598   limit_quota=90 
    1599  
    1600   # Check of the volume 
    1601   volume_quota=$(ccc_quota | grep ' scratch' | awk '{print $2}') 
    1602   volume_avail=$(ccc_quota | grep ' scratch' | awk '{print $3}') 
     1598  limit_quota=30 
     1599 
     1600  # Check of the volume (use of RshMaster waiting for ccc_quota command available on SX9 nodes) 
     1601  volume_quota=$( IGCM_sys_RshMaster "/applications/ccc-tools/ccc_quota | grep ' scratch' | awk '{print \$2}'" ) 
     1602  volume_avail=$( IGCM_sys_RshMaster "/applications/ccc-tools/ccc_quota | grep ' scratch' | awk '{print \$3}'" ) 
     1603 
     1604  #  volume_quota=$(ccc_quota | grep ' scratch' | awk '{print $2}') 
     1605  #  volume_avail=$(ccc_quota | grep ' scratch' | awk '{print $3}') 
    16031606 
    16041607  if ( [ ! X${volume_quota} = X ] && [ ! ${volume_quota} = "-" ] ) ; then 
    16051608 
    1606     unit_avail=${volume_avail: -1} 
    1607     unit_quota=${volume_quota: -1} 
    1608  
    1609     temp_avail=${volume_avail%%${volume_avail: -1}*} 
    1610     temp_quota=${volume_quota%%${volume_quota: -1}*} 
     1609    unit_quota=$( echo $volume_quota | awk '{print(substr($0, length($0), length($0)))}' ) 
     1610    unit_avail=$( echo $volume_avail | awk '{print(substr($0, length($0), length($0)))}' ) 
     1611 
     1612    temp_avail=${volume_avail%%${unit_avail}*} 
     1613    temp_quota=${volume_quota%%${unit_quota}*} 
    16111614 
    16121615    if [ ! ${unit_avail} = ${unit_quota} ] ; then 
    16131616 
    16141617    # Convertion 
    1615       if [ ${volume_avail: -1} = "T" ] ; then 
     1618      if [ ${unit_avail} = "T" ] ; then 
    16161619          (( temp_avail = temp_avail * 1000000000000 )) 
    1617       elif [ ${volume_avail: -1} = "G" ] ; then 
     1620      elif [ ${unit_avail} = "G" ] ; then 
    16181621          (( temp_avail = temp_avail * 1000000000 )) 
    1619       elif [ ${volume_avail: -1} = "M" ] ; then 
     1622      elif [ ${unit_avail} = "M" ] ; then 
    16201623          (( temp_avail = temp_avail * 1000000 )) 
    1621       elif [ ${volume_avail: -1} = "k" ] ; then 
     1624      elif [ ${unit_avail} = "k" ] ; then 
    16221625          (( temp_avail = temp_avail * 1000 )) 
    16231626      else 
    16241627          (( temp_avail = volume_avail )) 
    16251628      fi 
    1626       if [ ${volume_quota: -1} = "T" ] ; then 
     1629      if [ ${unit_quota} = "T" ] ; then 
    16271630          (( temp_quota = temp_quota * 1000000000000 )) 
    1628       elif [ ${volume_quota: -1} = "G" ] ; then 
     1631      elif [ ${unit_quota} = "G" ] ; then 
    16291632          (( temp_quota = temp_quota * 1000000000 )) 
    1630       elif [ ${volume_quota: -1} = "M" ] ; then 
     1633      elif [ ${unit_quota} = "M" ] ; then 
    16311634          (( temp_quota = temp_quota * 1000000 )) 
    1632       elif [ ${volume_quota: -1} = "k" ] ; then 
     1635      elif [ ${unit_quota} = "k" ] ; then 
    16331636          (( temp_quota = temp_quota * 1000 )) 
    16341637      else 
     
    16411644 
    16421645    if [ ${quota_volume} -ge ${limit_quota} ] ; then 
    1643       IGCM_debug_Print 1 "Please, check your quota of inode on scratch" 
     1646      IGCM_debug_Print 1 "Please, check your quota of volume on scratch" 
    16441647      IGCM_debug_Print 1 "Use the ccc_quota command" 
    16451648      IGCM_debug_Print 1 "You must have more than 10% available to run" 
Note: See TracChangeset for help on using the changeset viewer.