Skip to content

Instantly share code, notes, and snippets.

@toni-moreno
toni-moreno / core-20140617-core.10033
Last active August 29, 2015 14:02
collectd (core - recompiled RHEL 5.9)
[root@wastest85 case6]# gdb /opt/collectd/sbin/collectd opt/collectd/var/lib/collectd/core.10033
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-45.el5)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
@toni-moreno
toni-moreno / core-20140606-10266(ABORT)
Last active August 29, 2015 14:02
collectd (core)
# gdb /opt/collectd/sbin/collectd ./core.10266
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-45.el5)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
root@nono:~# valgrind --tool=helgrind /opt/collectd/sbin/collectd -C /opt/collectd/etc/collectd.conf.orig
==15196== Helgrind, a thread error detector
==15196== Copyright (C) 2007-2011, and GNU GPL'd, by OpenWorks LLP et al.
==15196== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==15196== Command: /opt/collectd/sbin/collectd -C /opt/collectd/etc/collectd.conf.orig
==15196==
option = Hostname; value = nono;
option = FQDNLookup; value = true;
option = PIDFile; value = /opt/collectd/var/run/collectd.pid;
Done parsing `/opt/collectd/share/collectd/types.db'
@toni-moreno
toni-moreno / graphite-dashboard-tool.sh
Last active April 25, 2017 23:57
A shell script to help export/import json formatted graph and dashboards from a Graphite mysql database.
#!/bin/bash
# (c) Toni Moreno
# tool to import / export graphs and dashboards to mysql db
# NOTE: be sure you have granted FILE privileges
# if apparmor is configured you should add to
# /etc/apparmor.d/usr.sbin.mysqld
# /tmp/* rw,
LOCAL_SETINGS="/opt/graphite/webapp/graphite/local_settings.py"
0.- Stop graphite-web
/etc/init.d/apache2 stop
1.- Backup SQLite db
export GRAPHITE_ROOT=/opt/graphite
PYTHONPATH=$GRAPHITE_ROOT/webapp django-admin.py dumpdata --settings=graphite.settings -e contenttypes --natural > sqlite_graphite_dump.json