On 02/22/2013 12:42 PM, Brian Gilmer wrote:
> I have a user request for a "summarize" capability for squeue.  The
> user wants a summary report of the count of jobs by users and job
> name.  The idea is to compact the report from 80+ lines to around 10.
>
> 1) Does anyone have home grown tools that summarize the output of squeue?
>
> 2) Is anyone interested in something along these lines?
>
> We think this is a good project for a novice Slurm developer so any
> feedback will be put into project description.
>
> Brian
>

Enjoy :) Took 15 minutes. Not perfect but ... Is it what you look for ?


#! /bin/sh

squeue -h -a -o '%u|%j' | awk -F'|' '
     {
         job_n[$1] += 1;
         job[$1]    = job[$1] "," $2;
     }
     END {
         for (user in job) {
             printf "%-16s %3d %s\n", user, job_n[user], job[user];
         }
     }
'

-- 

-----------------------------------------------------------
      Michel Bourget - SGI - Linux Software Engineering
        "Life is a job but a job is not a life." (Me)
-----------------------------------------------------------

Reply via email to