Skip to content

Instantly share code, notes, and snippets.

View zzzoom's full-sized avatar

Carlos Bederián zzzoom

  • Universidad Nacional de Córdoba
  • Córdoba, Argentina
View GitHub Profile
@zzzoom
zzzoom / split-debug.sh
Created April 27, 2016 01:05
Split debugging information to a separate .dbg file
#!/bin/sh
objcopy --only-keep-debug $1 $1.dbg
strip -g $1
objcopy --add-gnu-debuglink=$1.dbg $1
@zzzoom
zzzoom / ipmi_system_temp.sh
Created July 4, 2015 08:42
Ganglia gmetric that sends the system temperature (read from IPMI)
#!/bin/bash
GMETRIC=gmetric
GMETRIC_OPTS=""
# TODO: check ipmi modules?
# send cpu temps if gmond is running
service gmond status &> /dev/null
if [ $? -eq 0 ]; then
$GMETRIC $GMETRIC_OPTS --type="int32" --group="temp" --name="system_temp" --units="Celsius" --value=`ipmitool sdr 2>/dev/null | grep 'Sys.* Temp' | cut -d'|' -f2 | awk '{print $1}'`
@zzzoom
zzzoom / max_coretemp.sh
Last active August 29, 2015 14:24
Ganglia gmetric script that sends the maximum coretemp value
#!/bin/bash
GMETRIC=gmetric
GMETRIC_OPTS=""
# check that coretemp is loaded
module=`lsmod | awk '{print $1}' | grep coretemp`
if [ -z "$module" ]; then
exit
fi