Skip to content

Instantly share code, notes, and snippets.

@ptrlv
ptrlv / get-queues.py
Created April 26, 2013 09:44
parse queues.conf
#!/usr/bin/env python
import io
import requests
from ConfigParser import SafeConfigParser
#from ConfigParser import SafeConfigParser, NoSectionError, InterpolationMissingOptionError
url = 'http://gridui18.usatlas.bnl.gov:25880/queues.conf'
r = requests.get(url)
This is pilot wrapper : runpilot3-wrapper.sh-example 15275 2013-04-24 11:26:25Z plove $
Please send development requests to p.love@lancaster.ac.uk
Monitor ping: OK
Scanning landing zone...
Current dir: /home/atlasprd/home_cream_450850604/CREAM450850604
total 16
-rw-r--r-- 1 atlasprd atlas 0 May 7 13:44 1340840.11.err
-rw-r--r-- 1 atlasprd atlas 253 May 7 13:44 1340840.11.out
-rwxr-xr-x 1 atlasprd atlas 10050 May 7 13:44 runpilot3-wrapper-apr24.sh
Me and my args: ./runpilot3-wrapper-apr24.sh -s UKI-SOUTHGRID-OX-HEP -h UKI-SOUTHGRID-OX-HEP-t2ce02-longfive-pbs -p 25443 -w https://pandaserver.cern.ch -j false -k 0
@ptrlv
ptrlv / gist:5684103
Created May 31, 2013 10:15
traccar error
INFO | jvm 1 | 2013/05/31 11:14:36 | May 31, 2013 11:14:36 AM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
INFO | jvm 1 | 2013/05/31 11:14:36 | WARN: SQL Error: 0, SQLState: 08003
INFO | jvm 1 | 2013/05/31 11:14:36 | May 31, 2013 11:14:36 AM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
INFO | jvm 1 | 2013/05/31 11:14:36 | ERROR: No operations allowed after connection closed.
INFO | jvm 1 | 2013/05/31 11:14:36 | 2013-05-31 11:14:36.899:WARN:/:Exception while dispatching incoming RPC call
INFO | jvm 1 | 2013/05/31 11:14:36 | com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract org.traccar.web.shared.model.User org.traccar.web.client.model.DataService.login(java.lang.String,java.lang.String)' threw an unexpected exception: javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: No operations allowed after connection closed.
@ptrlv
ptrlv / gist:7804550
Created December 5, 2013 12:40
ARC xrsl
nordugridrsl = '(jobname = arc_pilot)'
rsladd = '(runtimeenvironment = APPS/HEP/ATLAS-SITE-LCG)(runtimeenvironment = ENV/PROXY)'
rsladd += '(jobname = arc_pilot)'
if memory:
rsladd += '(memory = %d)' % memory
if corecount:
rsladd += '(count = %d)' % corecount
if maxmemory and corecount:
percore = maxmemory/corecount
rsladd += '(maxmemory = %d)' % percore
@ptrlv
ptrlv / gist:7889634
Created December 10, 2013 12:08
ARC mcore jdl
rsladd = '(runtimeenvironment = APPS/HEP/ATLAS-SITE-LCG)(runtimeenvironment = ENV/PROXY)'
rsladd += '(jobname = arc_pilot)'
if corecount:
rsladd += '(count = %d)' % corecount
rsladd += '(countpernode = %d)' % corecount
if maxmemory and corecount:
percore = maxmemory/corecount
rsladd += '(memory = %d)' % percore
elif memory:
rsladd += '(memory = %d)' % memory
$ _CONDOR_TOOL_DEBUG=D_ALL condor_submit -debug -remote cloudscheduler.cern.ch:8081 /tmp/asoka.jdl
02/12/14 20:57:13 (fd:3) (pid:13681) (D_CONFIG) config: using subsystem 'SUBMIT', local ''
02/12/14 20:57:13 (fd:3) (pid:13681) (D_LOAD) Reading from /proc/cpuinfo
02/12/14 20:57:13 (fd:3) (pid:13681) (D_LOAD) Found: Physical-IDs:False; Core-IDs:False
02/12/14 20:57:13 (fd:3) (pid:13681) (D_HOSTNAME) condor_gethostname() claims we are aipanda020
02/12/14 20:57:13 (fd:3) (pid:13681) (D_HOSTNAME) NETWORK_INTERFACE=* matches lo 127.0.0.1, eth0 128.142.135.97, virbr0 192.168.122.1, choosing IP 128.142.135.97
02/12/14 20:57:13 (fd:3) (pid:13681) (D_CONFIG) ENABLE_IPV6 is undefined, using default value of False
02/12/14 20:57:13 (fd:3) (pid:13681) (D_HOSTNAME) Considering aipanda020.cern.ch (Ranked at 3) as possible local hostname versus aipanda020/ (0)
02/12/14 20:57:13 (fd:3) (pid:13681) (D_HOSTNAME) Identifying myself as: Short:: aipanda020, Long: aipanda020.cern.ch, IP: 128.142.135.97
02/12/14 20:57:13 (fd:3) (pi
$ _CONDOR_TOOL_DEBUG=D_ALL condor_submit -debug -remote cloudscheduler.cern.ch:8081 /tmp/asoka.jdl
02/12/14 21:27:32 (fd:3) (pid:17633) (D_CONFIG) config: using subsystem 'SUBMIT', local ''
02/12/14 21:27:32 (fd:3) (pid:17633) (D_LOAD) Reading from /proc/cpuinfo
02/12/14 21:27:32 (fd:3) (pid:17633) (D_LOAD) Found: Physical-IDs:False; Core-IDs:False
02/12/14 21:27:32 (fd:3) (pid:17633) (D_HOSTNAME) condor_gethostname() claims we are aipanda020
02/12/14 21:27:32 (fd:3) (pid:17633) (D_HOSTNAME) NETWORK_INTERFACE=* matches lo 127.0.0.1, eth0 128.142.135.97, virbr0 192.168.122.1, choosing IP 128.142.135.97
02/12/14 21:27:32 (fd:3) (pid:17633) (D_CONFIG) ENABLE_IPV6 is undefined, using default value of False
02/12/14 21:27:32 (fd:3) (pid:17633) (D_HOSTNAME) Considering aipanda020.cern.ch (Ranked at 3) as possible local hostname versus aipanda020/ (0)
02/12/14 21:27:32 (fd:3) (pid:17633) (D_HOSTNAME) Identifying myself as: Short:: aipanda020, Long: aipanda020.cern.ch, IP: 128.142.135.97
02/12/14 21:27:32 (fd:3)
@ptrlv
ptrlv / gist:d2a852a0153fd6ded0a1
Last active August 29, 2015 14:02
Broken pip install
$ virtualenv --version
1.11.6
$ virtualenv env
New python executable in env/bin/python
Installing setuptools, pip...done.
$ . env/bin/activate
(env)$
@ptrlv
ptrlv / gist:80cf15fdc6f6b42852ee
Created August 3, 2014 14:28
wrapper set_limits
function set_limits() {
# Set some limits to catch jobs which go crazy from killing nodes
# 20GB limit for output size (block = 1K in bash)
fsizelimit=$((20*1024*1024))
echo Setting filesize limit to $fsizelimit
ulimit -f $fsizelimit
# Apply memory limit?
memLimit=0
# What does logstash do with the topic string?
# How can I filter messages zmq.SUBSCRIBE?
# Is logstash missing this: http://zguide.zeromq.org/page%3aall#Pub-Sub-Message-Envelopes
# logstash config
input {
generator {
lines => [