Changeset 161 for trunk


Ignore:
Timestamp:
08/19/09 12:21:32 (15 years ago)
Author:
sdipsl
Message:
  • Move the "ksh time" detection on SX hosts because it generates a false positive with vargas detection
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_sys/IGCM_add_out.awk

    r137 r161  
    1 #!/usr/bin/awk -f 
     1#!/usr/bin/gawk -f 
    22# IGCM_add_out - filter of output of the job : 
    33# command : 
     
    210210 
    211211  } 
     212 
     213# csh time 
     214  else if (match($0, "[0-9.]+u [0-9.]+s .+")) 
     215  { 
     216    myprint( "csh" ) 
     217    counter=counter+1 
     218 
     219    UserTime=(substr($1,1,match($1, "u")-1)) 
     220    SysTime=(substr($2,1,match($2, "s")-1)) 
     221    RealTime=(substr($3,1,match($3, ":")-1)*60. + substr($3,match($3, ":")+1)) 
     222 
     223  } 
     224# linux system time 
     225  else if (match($0, ".*user .*system .*elapsed .*CPU .*")) 
     226  { 
     227    myprint( "linux" ) 
     228    counter=counter+1 
     229 
     230    UserTime=(substr($1,1,match($1, "user")-1)) 
     231    SysTime=(substr($2,1,match($2, "system")-1)) 
     232    RealTime=(substr($3,1,match($3, ":")-1)*60.+substr($3, match($3, ":")+1, match($3, "elapsed"))) 
     233 
     234  } 
     235# AIX vargas system time 
     236  else if (match($0, "real   [0-9]*")) 
     237  { 
     238    myprint( "vargas" ) 
     239    vargas_found=1   
     240    counter=counter+1 
     241 
     242    RealTime=substr($0,8) 
     243    next 
     244  } 
     245  else if (vargas_found=1 ) 
     246  { 
     247    if (match($0, "user   [0-9]*")) 
     248      { 
     249        UserTime=substr($0,8) 
     250        next 
     251      } 
     252    if (match($0, "sys    [0-9]*")) 
     253      { 
     254        SysTime=substr($0,7) 
     255        next 
     256      } 
     257  } 
    212258# Get information with time output on SX hosts 
    213259# ksh time 
     
    267313        SysTime=(substr($2,1,match($2, ":")-1)) 
    268314    } 
    269   } 
    270 # csh time 
    271   else if (match($0, "[0-9.]+u [0-9.]+s .+")) 
    272   { 
    273     myprint( "csh" ) 
    274     counter=counter+1 
    275  
    276     UserTime=(substr($1,1,match($1, "u")-1)) 
    277     SysTime=(substr($2,1,match($2, "s")-1)) 
    278     RealTime=(substr($3,1,match($3, ":")-1)*60. + substr($3,match($3, ":")+1)) 
    279  
    280   } 
    281 # linux system time 
    282   else if (match($0, ".*user .*system .*elapsed .*CPU .*")) 
    283   { 
    284     myprint( "linux" ) 
    285     counter=counter+1 
    286  
    287     UserTime=(substr($1,1,match($1, "user")-1)) 
    288     SysTime=(substr($2,1,match($2, "system")-1)) 
    289     RealTime=(substr($3,1,match($3, ":")-1)*60.+substr($3, match($3, ":")+1, match($3, "elapsed"))) 
    290  
    291   } 
    292 # AIX vargas system time 
    293   else if (match($0, "real\ \ \ [0-9]*")) 
    294   { 
    295     myprint( "vargas" ) 
    296     vargas_found=1   
    297     counter=counter+1 
    298  
    299     RealTime=substr($0,8) 
    300     next 
    301   } 
    302   else if (vargas_found=1 ) 
    303   { 
    304     if (match($0, "user\ \ \ [0-9]*")) 
    305       { 
    306         UserTime=substr($0,8) 
    307         next 
    308       } 
    309     if (match($0, "sys\ \ \ \ [0-9]*")) 
    310       { 
    311         SysTime=substr($0,7) 
    312         next 
    313       } 
    314315  } 
    315316 
Note: See TracChangeset for help on using the changeset viewer.