Changeset 161 for trunk/libIGCM
- Timestamp:
- 08/19/09 12:21:32 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_sys/IGCM_add_out.awk
r137 r161 1 #!/usr/bin/ awk -f1 #!/usr/bin/gawk -f 2 2 # IGCM_add_out - filter of output of the job : 3 3 # command : … … 210 210 211 211 } 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 } 212 258 # Get information with time output on SX hosts 213 259 # ksh time … … 267 313 SysTime=(substr($2,1,match($2, ":")-1)) 268 314 } 269 }270 # csh time271 else if (match($0, "[0-9.]+u [0-9.]+s .+"))272 {273 myprint( "csh" )274 counter=counter+1275 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 time282 else if (match($0, ".*user .*system .*elapsed .*CPU .*"))283 {284 myprint( "linux" )285 counter=counter+1286 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 time293 else if (match($0, "real\ \ \ [0-9]*"))294 {295 myprint( "vargas" )296 vargas_found=1297 counter=counter+1298 299 RealTime=substr($0,8)300 next301 }302 else if (vargas_found=1 )303 {304 if (match($0, "user\ \ \ [0-9]*"))305 {306 UserTime=substr($0,8)307 next308 }309 if (match($0, "sys\ \ \ \ [0-9]*"))310 {311 SysTime=substr($0,7)312 next313 }314 315 } 315 316
Note: See TracChangeset
for help on using the changeset viewer.