Changeset 652
- Timestamp:
- 04/15/12 14:56:56 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_sys/libIGCM_sys_mercurex9.ksh
r651 r652 1596 1596 fi 1597 1597 # 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}') 1603 1606 1604 1607 if ( [ ! X${volume_quota} = X ] && [ ! ${volume_quota} = "-" ] ) ; then 1605 1608 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}*} 1611 1614 1612 1615 if [ ! ${unit_avail} = ${unit_quota} ] ; then 1613 1616 1614 1617 # Convertion 1615 if [ ${ volume_avail: -1} = "T" ] ; then1618 if [ ${unit_avail} = "T" ] ; then 1616 1619 (( temp_avail = temp_avail * 1000000000000 )) 1617 elif [ ${ volume_avail: -1} = "G" ] ; then1620 elif [ ${unit_avail} = "G" ] ; then 1618 1621 (( temp_avail = temp_avail * 1000000000 )) 1619 elif [ ${ volume_avail: -1} = "M" ] ; then1622 elif [ ${unit_avail} = "M" ] ; then 1620 1623 (( temp_avail = temp_avail * 1000000 )) 1621 elif [ ${ volume_avail: -1} = "k" ] ; then1624 elif [ ${unit_avail} = "k" ] ; then 1622 1625 (( temp_avail = temp_avail * 1000 )) 1623 1626 else 1624 1627 (( temp_avail = volume_avail )) 1625 1628 fi 1626 if [ ${ volume_quota: -1} = "T" ] ; then1629 if [ ${unit_quota} = "T" ] ; then 1627 1630 (( temp_quota = temp_quota * 1000000000000 )) 1628 elif [ ${ volume_quota: -1} = "G" ] ; then1631 elif [ ${unit_quota} = "G" ] ; then 1629 1632 (( temp_quota = temp_quota * 1000000000 )) 1630 elif [ ${ volume_quota: -1} = "M" ] ; then1633 elif [ ${unit_quota} = "M" ] ; then 1631 1634 (( temp_quota = temp_quota * 1000000 )) 1632 elif [ ${ volume_quota: -1} = "k" ] ; then1635 elif [ ${unit_quota} = "k" ] ; then 1633 1636 (( temp_quota = temp_quota * 1000 )) 1634 1637 else … … 1641 1644 1642 1645 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" 1644 1647 IGCM_debug_Print 1 "Use the ccc_quota command" 1645 1648 IGCM_debug_Print 1 "You must have more than 10% available to run"
Note: See TracChangeset
for help on using the changeset viewer.