Dom and Miguel,

It's a simple script I found on github. I just made a fork here:

  https://github.com/mathomp4/rpen

so I didn't have uncommitted changes around.

I use in in tcsh by making an alias:

  alias squeue "squeue \!* | rpen.py PENDING RUNNING $USER COMPLET"

as csh shells make it easy since you can pass arguments (and I'm in a csh shop). Not sure how you'd do it in bash with the arguments. I have this:

  alias q="squeue -au $USER | rpen.py PENDING RUNNING $USER COMPLET"

but that is a specific alias. Probably have to use a function, right?

Note that the colorizer is pretty simple in that you pass it things to match and the first is red, second is green... My rpen.py has the third color yellow inverted to be black on yellow.

Matt

On 06/06/2016 02:54 AM, Dominikus Heinzeller wrote:

Hi Matt,

I’d be also very interested in that script - thanks a lot in advance.

Cheers

Dom

On 6/06/2016, at 8:42 AM, Miguel Gila <[email protected]> wrote:


Hi, this is really cool, would you share the python script?

Thanks!
Miguel

On 27 May 2016, at 17:11, Thompson, Matt[SCIENCE SYSTEMS AND APPLICATIONS INC] 
<[email protected]> wrote:


On 05/27/2016 08:18 AM, Aaron Knister wrote:

Hey Matt,

Was it just those two fields you had colored? Also, were there colors for other 
queue states?

The script is a hammer. It colorizes by matching with grep. I have it set to 
match:

PENDING RUNNING $USER COMPLET

and then I tweaked the colors to get the black-on-yellow for $USER so it's 
really visible.

It has the ability to colorize anything else you like. I rarely see any of the 
other states in my experience. Probably because SLURM kicks them off but fast.

I'm pondering using %r to more finely recognize and colorize different PENDING 
states (due to priority, resources, etc.), but my squeue is already pretty long 
and my font is already pretty dang small...

Matt
--
Matt Thompson, SSAI, Sr Scientific Programmer/Analyst
NASA GSFC,    Global Modeling and Assimilation Office
Code 610.1,  8800 Greenbelt Rd,  Greenbelt,  MD 20771
Phone: 301-614-6712                 Fax: 301-614-6246
http://science.gsfc.nasa.gov/sed/bio/matthew.thompson

--
Miguel Gila
CSCS Swiss National Supercomputing Centre
HPC Operations
Via Trevano 131 | CH-6900 Lugano | Switzerland
mg [at] cscs.ch


--
Matt Thompson, SSAI, Sr Scientific Programmer/Analyst
NASA GSFC,    Global Modeling and Assimilation Office
Code 610.1,  8800 Greenbelt Rd,  Greenbelt,  MD 20771
Phone: 301-614-6712                 Fax: 301-614-6246
http://science.gsfc.nasa.gov/sed/bio/matthew.thompson

Reply via email to