Skip to content

Instantly share code, notes, and snippets.

View tcooper's full-sized avatar

Trevor Cooper tcooper

View GitHub Profile
@tcooper
tcooper / keybase.md
Created June 24, 2021 03:29
keybase.md

Keybase proof

I hereby claim:

  • I am tcooper on github.
  • I am tkcooper (https://keybase.io/tkcooper) on keybase.
  • I have a public key ASBaADSVfIxEcFe8fpZfb8B8hyFxR4yzPE0u27RFcEQ_Pwo

To claim this, I am signing this object:

@tcooper
tcooper / README.md
Last active May 7, 2021 07:49
rocky8-podman-systemd-httpd

Rocky 8 Container Demo

Screen capture demonstrating running a Rocky 8 container running httpd in systemd via podman on a Rocky 8 VirtualBox virtual machine

Image

Video

@tcooper
tcooper / list-roll-info
Created June 4, 2019 21:22
Display additional information about installed and enabled Rocks rolls
#!/bin/sh
ROLL_VERS="$(rocks list roll | awk '/ yes/{print $1,$2}' | sed 's/://g')"
printf " roll ; version ; release ; date\n"
while IFS= read
do
roll=$(echo $REPLY | awk '{print $1}')
vers=$(echo $REPLY | awk '{print $2}')
printf "%14s ; " $roll;
roll_info=$(grep release /export/rocks/install/rolls/$roll/$vers/x86_64/roll-$roll.xml | sed 's,\t<info ,,g;s,/>,,g;s,",,g;s,version=,,g;s,release=,,g;s,arch=,,g;s,os=,,g' | awk '{print $1" "$2}')
@tcooper
tcooper / Singularity
Created November 30, 2017 01:23
Example Singularity image with help for binding to typical HPC data directories on Comet
Bootstrap: docker
From: python:2.7.13
%help
This container creates internal directories to bind HPC system locations to as
follows...
/pfs_data - The location of your high performance parallel file system data
/pfs_scratch - The location of your high performance parallel file system scratch
@tcooper
tcooper / pull_rolls.sh
Created November 8, 2017 01:35
Pull Rocks rolls from beta7.rocksclusters.org
#!/bin/bash
AWK=$(which awk)
CURL=$(which curl)
ECHO=$(which echo)
GREP=$(which grep)
SORT=$(which sort)
BASE="http://beta7.rocksclusters.org/isos"
ROLLS=$(${CURL} -s ${BASE}/ | ${AWK} -F\" '/iso\"/ {print $8}' | ${SORT} -u)
@tcooper
tcooper / sdsc-roll-build-sample.md
Created June 10, 2015 16:50
SDSC Roll Building Sample

Installed Rolls

	[root@sidewinder-fe1 ~]# rocks list roll
	NAME            VERSION ARCH   ENABLED
	kernel:         6.2     x86_64 yes
	web-server:     6.2     x86_64 yes
	base:           6.2     x86_64 yes
	CentOS:         6.6     x86_64 yes
@tcooper
tcooper / util-graphite
Last active August 29, 2015 14:21
Slurm utilization for Graphite
#!/bin/sh
# Usage : Show queue utilization for running & pending jobs
E_INVALID_OPT=1
usage() { echo "Usage: $0" 1>&2; exit 1; }
cleanup () { /bin/rm $_squeue_tmp; }
while getopts ":h" opt; do
case $opt in
@tcooper
tcooper / remove-nodes-from-res
Created May 9, 2015 20:51
Remove a single node of 'matchable' Slurm nodelist from a Slurm reservation with SPEC_NODES specified
#!/bin/sh
EXPECTED_ARGS=2
E_BADARGS=65
if [ $# -ne $EXPECTED_ARGS ]
then
echo "Usage: `basename $0` {reservationname} {nodelist}"
exit $E_BADARGS
fi
@tcooper
tcooper / build_patched_bash.sh
Created December 26, 2014 20:46
Building a patched BASH on OSX
#!/bin/bash
# Original from: http://apple.stackexchange.com/a/146851
# If you want to disable auto-imported functions, uncomment the following
#export ADD_IMPORT_FUNCTIONS_PATCH=YES
mkdir ~/bash-fix
cd ~/bash-fix
curl https://opensource.apple.com/tarballs/bash/bash-92.tar.gz | tar zxf -
cd bash-92/bash-3.2
@tcooper
tcooper / summarize.sh
Created November 8, 2014 23:52
Summarize iozone reports
#!/bin/bash
function summarize_for_pattern() {
LOG_PATTERN=$1
#echo "128K IO - Streaming Write Bandwidth - 16 Initial Writers"
echo -e " Child"
echo -e " Min Max Avg Aggr Units"
echo -n "initial writers (bw): "
for val in Min Max Avg Children;
do