[Mauiusers] Need Average Wait Time

Jim Prewett download at hpc.unm.edu
Tue Jun 1 14:02:24 MDT 2010


Hi Stephen,

Here's something quick-and-dirty that I put together for a project I was 
working on that required something simular.  Below is an awk script 
(wrapped in a bash script) that will summarize queue time by queue and 
globally.  In order to use it, save it to a file, make it executeable 
(chmod a+x or simular), then cat the statistics file(s) you're interested 
in analyzing and pipe them into this script.  I'd be surprised if it were 
perfect... 

HTH,
Jim

-------------------------- begin makestats.sh ----------------------------
#!/bin/bash

awk '/^[0-9]/ { \
  gcount++;  \
  qtime = $11 - $9; \
  gtot += qtime; \
  tot[$8] += qtime; \
  count[$8]++; \
  if(qtime > gmax){gmax = qtime;} \
  if(qtime > max[$8]){max[$8] = qtime;} \
  } \
  END { \
  for (q in tot){ \
    print q " total jobs:         " count[q]; \    if(count[q] > 0){ print 
q " average queue time: " (tot[q] / count[q] / 3600)
 " (hours)" ; } \
    print q " max queue time:     " max[q] / 3600 " (hours)"; \
    print ""; \
    } \
  print "GLOBAL INFORMATION:"; \
  print "total jobs:         " gcount; \
  print "average queue time: " (gtot / gcount / 3600) " (hours)" ; \
  print "max queue time:     " gmax / 3600 " (hours)" ; \
}'
-------------------------- end makestats.sh ----------------------------


James E. Prewett                    Jim at Prewett.org download at hpc.unm.edu 
Systems Team Leader           LoGS: http://www.hpc.unm.edu/~download/LoGS/ 
Designated Security Officer         OpenPGP key: pub 1024D/31816D93    
HPC Systems Engineer III   UNM HPC  505.277.8210

On Tue, 1 Jun 2010, Steven Backus wrote:

>   I would like to find out how long a job waits in the queue before
> it's started (on average).  Anyone know how to get this?  Posted
> once before without luck so am trying again.  Any help is greatly
> appreciated.
> 
> Steve
> -- 
> Steven J. Backus                        Computer Specialist
> University of Utah                      E-Mail:  steven.backus at utah.edu
> Genetic Epidemiology                    Alternate:  backus at math.utah.edu
> 391 Chipeta Way -- Suite D              Office:  801.587.9308
> Salt Lake City, UT 84108-1266           http://www.math.utah.edu/~backus
> _______________________________________________
> mauiusers mailing list
> mauiusers at supercluster.org
> http://www.supercluster.org/mailman/listinfo/mauiusers
> 


More information about the mauiusers mailing list