Monday, June 27, 2011

How To Write a Condor_q Wrapper



You may want to write a condor_q wrapper to display information specific to your installation. With condor_q's -format option, this is usually straightforward. Each call to -format allows you to write one piece of information. That information can be simple attributes from the job's ClassAd, or it can be full ClassAd expressions.

Note that all of this applies to condor_status as well.


Here is a a command that almost replicates the output of "condor_q". It does not print the "-- Submitter:" line at the start, nor does it print the summary at the bottom. Furthermore, condor_q truncates the Cmd name to just the executable itself, excluding the directory portion of the path. If #1368 is implemented, extracting just the executable will be relatively straightforward.


 








condor_q 
-format '%4d.' ClusterId
-format '%-3d ' ProcId
-format '%-14s ' Owner
-format '%-11s ' 'formatTime(QDate,"%m/%d %H:%M")'
-format '%3d+' 'int(RemoteUserCpu/(60*60*24))'
-format '%02d:' 'int((RemoteUserCpu-(int(RemoteUserCpu/(60*60*24))*60*60*24))/(60*60))'
-format '%02d:' 'int((RemoteUserCpu-(int(RemoteUserCpu/(60*60))*60*60))/(60))'
-format '%02d ' 'int(RemoteUserCpu-(int(RemoteUserCpu/60)*60))'
-format '%-2s ' 'ifThenElse(JobStatus==0,"U",ifThenElse(JobStatus==1,"I",ifThenElse(JobStatus==2,"R",ifThenElse(JobStatus==3,"X",ifThenElse(JobStatus==4,"C",ifThenElse(JobStatus==5,"H",ifThenElse(JobStatus==6,"E",string(JobStatus))))))))'
-format '%-3d ' JobPrio
-format '%-4.1f ' ImageSize/1024.0
-format '%-18.18s' 'strcat(Cmd," ",Arguments)'
-format 'n' Owner








(The RUN_TIME formatting is complicated because 7.4.x and earlier ClassAds lack the modulus (%) operator. 7.5.2 and later will likely include this operator along with "New ClassAds", allowing for simpler expressions. The ST formatting might be simplified if #1369 or something similar is implemented, but that is uncertain.)





Very useful in order to get exactly the information you want from condor_q. In my particular case, I wanted to see the full line of arguments passed to the executable. For this I change the last 3 lines of the command above to:



-format '%-4.1fn ' ImageSize/1024.0  
-format '%s' Args  
-format 'n' Owner



Sunday, June 26, 2011

How to get rid of Ubuntu's 11.04 overlay scrollbars




How to get rid of Ubuntu's overlay scrollbars



I don't want to be a party pooper, but I can't scroll in Eclipse, and I need to.



[2011-05-02]
Mobile Linux

I like Ubuntu's new overlay scrollbars. They're cool. They are so nice and neat. Brilliant ...


... except they don't work properly in Eclipse, and I use Eclipse all the time. I am a developer. It's what I do for money. And I do it using Eclipse. So Eclipse has to work for me.


To get your old-style scrollbars back for just one application, start it from a terminal like this:


 





$ LIBOVERLAY_SCROLLBAR=0 eclipse &





 


(Replace "eclipse" with whichever application you want your old scrollbars back for.) To make life easier, you can edit the launcher in the menu to do this every time, or make a little shell script.


To get your old-style scrollbars back for all subsequently-started applications, try:


 





$ export LIBOVERLAY_SCROLLBAR=0





 


But personally, I'll keep the new overlay scrollbar on for everything other than Eclipse.







A very useful hint for Ubuntu 11.04 with Eclipse.


Saturday, June 11, 2011

The gift

Esta es la última parte de "The gift" de The Velvet Underground.



Inside the package, Waldo was so transfixed with excitement that he could 
Barely breathe. His skin felt prickly from the heat, and he could feel his 
Heart beating in his throat. It would be soon. Sheila stood quite upright and 
Walked around to the other side of the package. Then she sank down to her 
Knees, grasped the cutter by both handles, took a deep breath, and plunged the 
Long blade through the middle of the package, through the masking tape, through 
The cardboard, through the cushioning and (thud) right through the center of 
Waldo Jeffers head, which split slightly and caused little rhythmic arcs of red 
To pulsate gently in the morning sun.



Eso.