Changeset 780 for trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh
- Timestamp:
- 01/30/13 16:48:49 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh
r779 r780 2792 2792 IGCM_debug_PopStack "IGCM_sys_cdo" 2793 2793 } 2794 2795 #D-#==================================================2796 #D-function IGCM_sys_CountJobInQueue2797 #D-* Purpose: Check if job_name is currently2798 #D- running or in queue2799 #D-* Examples: IGCM_sys_CountJobInQueue ${JobName} NbRun2800 #D-2801 2802 function IGCM_sys_CountJobInQueue {2803 IGCM_debug_PushStack "IGCM_sys_CountJobInQueue"2804 if ( $DEBUG_sys ) ; then2805 echo "IGCM_sys_CountJobInQueue"2806 fi2807 2808 #NbRun=$( ccc_mstat -f | grep -c ${JobName} )2809 2810 # With -f option, the full job name is given in the last column2811 NbRun=$( ccc_mstat -f | gawk -v JobName=$1 'BEGIN { x=0 } ($NF~String) { x=x+1 } END { print x }' )2812 2813 eval ${2}=${NbRun}2814 2815 IGCM_debug_PopStack "IGCM_sys_CountJobInQueue"2816 }
Note: See TracChangeset
for help on using the changeset viewer.