Skip to content

Instantly share code, notes, and snippets.

View giffels's full-sized avatar

Manuel Giffels giffels

View GitHub Profile
@giffels
giffels / globus-toolkit.rb
Last active May 7, 2024 16:49
VOMS Client Brew Formular
class GlobusToolkit < Formula
desc "Toolkit used for building grids"
homepage "https://www.globus.org/toolkit/"
# Note: Stable distributions have an even minor version number (e.g. 5.0.3)
url "https://downloads.globus.org/toolkit/gt6/stable/installers/src/globus_toolkit-6.0.1531931206.tar.gz"
sha256 "ef7b127174016627e1e161a99a95a4558b1c47fc0d368c4c3e84320924f14081"
revision 1
depends_on "pkg-config" => :build
depends_on "gcc" => :build
@giffels
giffels / SConstruct
Last active December 8, 2017 12:49
Using ROOT in combination with scons
import subprocess
root_link_flags = subprocess.check_output(['root-config', '--libs']).split()
root_cc_flags = subprocess.check_output(['root-config', '--cflags']).split()
Program(target="root_test", source=["root_test.cc"],
CCFLAGS = root_cc_flags, LINKFLAGS = root_link_flags)
@giffels
giffels / RESTClient.py
Last active December 15, 2017 15:44
REST client for services hosted on cmsweb.cern.ch
import json
import requests
from requests.exceptions import HTTPError
#disable ssl ca verification errors
requests.packages.urllib3.disable_warnings()
class RESTClient(object):
_requests_client_session = None
@giffels
giffels / GSSAPITrustDNS.patch
Last active September 29, 2016 08:18
Patch for openssh version 7.3p1 to enable GSSAPITrustDNS option
commit 2d9b2ea3384842cf3f2f2c9c4b5b61540e9a1a53
Author: Manuel Giffels <giffels@gmail.com>
Date: Tue Sep 27 14:06:05 2016 +0200
GSSAPITrustDNS Patch
diff --git a/readconf.c b/readconf.c
index c177202..bab01ff 100644
--- a/readconf.c
+++ b/readconf.c
@giffels
giffels / history_replica_data.csv
Last active July 26, 2016 14:45
T1_DE_KIT Space Monitoring
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 16 columns, instead of 1. in line 7.
date,PhEDEx_Debug,PhEDEx_LoadTest_SingleSource,backfill,data,generator,hidata,himc,mc,relval,results,temp,unmerged,user,total_size_ddm,total_size_non_ddm
2016-04-07 07:05:00,20.339354501119995,0.0,0.0,0.079280808666,0.0,0.0,0.0,0.203082927011,0.0,0.0,0.0,0.0,0.0,0.282363735677,20.339354501119995
2016-04-08 07:05:00,20.339354501119995,0.0,0.0,0.079280808666,0.0,0.0,0.0,0.203082927011,0.0,0.0,0.0,0.0,0.0,0.282363735677,20.339354501119995
2016-04-09 07:05:00,20.339354501119995,0.0,0.0,0.079280808666,0.0,0.0,0.0,0.203082927011,0.0,0.0,0.0,0.0,0.0,0.282363735677,20.339354501119995
2016-04-10 07:05:00,20.339354501119995,0.0,0.0,0.079280808666,0.0,0.0,0.0,0.203082927011,0.0,0.0,0.0,0.0,0.0,0.282363735677,20.339354501119995
2016-04-11 07:05:00,20.339354501119995,0.0,0.0,0.079280808666,0.0,0.0,0.0,0.203082927011,0.0,0.0,0.0,0.0,0.0,0.282363735677,20.339354501119995
2016-04-12 07:05:00,20.339354501119995,0.0,0.0,0.079280808666,0.0,0.0,0.0,0.203082927011,0.0,0.0,0.0,0.0,0.0,0.282363735677,20.339354501119995
2016-04-13 0
@giffels
giffels / dcache_prestage-status.py
Last active December 5, 2015 14:01
Multi-threaded PhEDEx stage-in scripts for dCache
#!/usr/bin/env python
from threading import Thread
import logging, os, sys
class LessThanFilter(logging.Filter):
def __init__(self, level):
self._level = level
logging.Filter.__init__(self)
def filter(self, rec):
@giffels
giffels / iperf_scan.sh
Last active August 29, 2015 14:22
iperf_scan
#!/bin/bash
IPERF_BIN="/usr/bin/iperf"
SERVER_IP="192.168.101.243"
CLIENT_IP="192.168.101.219"
SCANNING_INTERVAL="30"
TOTAL_SCAN_TIME="300"
SLEEPING_TIME="1800"
OUTPUT_FILE="iperf_results.csv"
@giffels
giffels / collect_net_io.py
Last active August 29, 2015 14:16
Collect Network IO Statistic using psutil
#!/usr/bin/env python
#-# Copyright 2015 Karlsruhe Institute of Technology
#-#
#-# Licensed under the Apache License, Version 2.0 (the "License");
#-# you may not use this file except in compliance with the License.
#-# You may obtain a copy of the License at
#-#
#-# http://www.apache.org/licenses/LICENSE-2.0
#-#
@giffels
giffels / usm.py
Created October 10, 2014 11:15
User Space Monitoring NRG
#!/usr/bin/env python
@giffels
giffels / GetStorageCfgFromTFC.py
Created December 18, 2013 13:38
This script retrieves the stage out parameters for your crab.cfg using the Phedex LFN2PFN API, if you want to stage out into group space /store/group. You need to be in a CMSSW release environment (SL5 releases only!) before using this script. For example: cmsrel CMSSW_x_x_x cd CMSSW_x_x_x cmsenv
"""
This script retrieves the stage out parameters for your crab.cfg using the Phedex LFN2PFN API, if you want to stage out into group space /store/group.
You need to be in a CMSSW release environment (SL5 releases only!) before using this script.
For example:
cmsrel CMSSW_x_x_x
cd CMSSW_x_x_x
cmsenv