Skip to content

Instantly share code, notes, and snippets.

View djw8605's full-sized avatar

Derek Weitzel djw8605

View GitHub Profile
@djw8605
djw8605 / jobnumber-glidein
Created February 23, 2011 20:34
SQL Query to get number of jobs running on glidein
select * from JobUsageRecord limit 100;
select * from JobUsageRecord where ResourceType = 'Batch' limit 100;
Probe name
condor-glidein:glidein.unl.edu
Get userids:
select distinct LocalUserId from JobUsageRecord where ResourceType = 'Batch' limit 200;
Get submit hosts:
@djw8605
djw8605 / condor_meter.pl.patch
Created October 15, 2011 03:05
Condor_meter patch for cms overflow jobs
--- condor_meter.pl.orig 2011-11-03 21:58:53.000000000 -0500
+++ condor_meter.pl 2011-11-03 22:11:20.000000000 -0500
@@ -993,9 +993,16 @@
} else {
$fqdn_last_rem_host = $hash{'LastRemoteHost'};
}
+
+ $host_description = $hash{'MATCH_EXP_JOBGLIDEIN_ResourceName'};
+ $match_gatekeepers = quotemeta($hash{'MATCH_GLIDEIN_Gatekeeper'});
+ $desired_gatekeepers = quotemeta($hash{'DESIRED_Gatekeepers'});
@djw8605
djw8605 / exampleuuid.spec
Created January 20, 2012 19:55
el5 vs el6: uuid edition
%if 0%{?el6}
BuildRequires: libuuid-devel
%else
BuildRequires: e2fsprogs-devel
%endif
@djw8605
djw8605 / osg.repo
Created January 24, 2012 22:55
osg.repo for testing globus packages in osg-software installs.
[osg]
name=OSG Software for Enterprise Linux 5 - $basearch
#baseurl=http://repo.grid.iu.edu/osg-release/$basearch
mirrorlist=http://repo.grid.iu.edu/mirror/osg-release/$basearch
failovermethod=priority
#priority=98
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-OSG
consider_as_osg=yes
@djw8605
djw8605 / condorg.submit
Created January 25, 2012 02:36
Condor-G submission
universe = grid
output = out
error = err
executable = /bin/sleep
arguments = 10
log = logfile
grid_resource = gt5 pf-grid.unl.edu/jobmanager-condor
x509userproxy = /tmp/x509up_u44843
queue 1
@djw8605
djw8605 / gist:1850697
Created February 17, 2012 04:34
Example Ceph configuration
[global]
; enable secure authentication
auth supported = none
; allow ourselves to open a lot of files
max open files = 131072
; set log file
log file = /var/log/ceph/$name.log
; log_to_syslog = true ; uncomment this line to log to syslog
@djw8605
djw8605 / bosco.submit
Created February 27, 2012 21:28
bosco submit file
universe = grid
grid_resource = pbs dweitzel@ff-grid.unl.edu
executable = /bin/hostname
output = /dev/null
error = /dev/null
+remote_iwd="~/"
transfer_executable=false
queue
@djw8605
djw8605 / rack-script.sh
Created March 2, 2012 05:18
hadoop rack script for each domain.
#!/bin/sh
#value=`nslookup $1 | grep name | awk '{print \$4}'`
echo $@ >> /tmp/rack.out
for ARG in "$@"
do
if [[ "$ARG" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
name=`nslookup $ARG | grep name | awk '{print \$4}'`
site=`expr "$name" : '.*\.\([a-zA-Z0-9]*\.[a-zA-Z0-9]*\).$'`
else
@djw8605
djw8605 / run-all.sh
Created March 16, 2012 20:24
Script to burn multiple USB live images
#!/bin/bash -x
device="sdb sdc sdd sde"
for dev in $device; do
fdisk /dev/$dev << EOF
d
n
p
1
@djw8605
djw8605 / osg_graphs.conf
Created May 29, 2012 20:25
top of /etc/osg_graphs.conf
[General]
Source=http://10.148.2.148:8100/gratia/
Dest=/var/www/html/gratiastatic/
Suffix=.png
Enabled=true
UTCOffset=-6
StartDate=2008-06-25
Replace=false
GenerateHistoricalGraphs=true