Skip to content

Instantly share code, notes, and snippets.

View jserviceorg's full-sized avatar

Juergen Gotteswinter jserviceorg

  • Regensburg - DE
View GitHub Profile
@jserviceorg
jserviceorg / elasticache_dump_to_rdb.md
Created May 28, 2021 07:36 — forked from lmmendes/elasticache_dump_to_rdb.md
Save Amazon ElastiCache Redis to file dump.rdb

Instructions to DUMP localy a Elasticache Redis database

Connect to Redis CLI

$ redis-cli

Enable the current redis as a slave for the master node

@jserviceorg
jserviceorg / debian-install-zram.sh
Last active June 19, 2019 19:30
Install zRAM on Debian(8)
#!/bin/bash
#
not_root() {
echo "ERROR: You have to be root to execute this script"
exit 1
}
zram_exists() {
echo "ERROR: /etc/init.d/zram already exists"
@jserviceorg
jserviceorg / prometheus-extra-etcd-instance.yaml
Created June 13, 2019 13:07 — forked from jhohertz/prometheus-extra-etcd-instance.yaml
Enable prometheus monitoring of etcd and etcd-events on kops clusters
# To be used with current stable/prometheus-operator helm chart on kops clusters
# where 4001/4002 ports are blocked from the worker nodes
#
# In you helm, disable etcd monitor by setting kubeEtcd.enabled=false
# Then apply this yaml, and you should see the etcd stats on your main instance
#
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
name: prometheus-operator-prometheus-master
@jserviceorg
jserviceorg / plot_bonnie.sh
Created July 16, 2018 09:01 — forked from npinto/plot_bonnie.sh
plot_bonnie.sh
#!/bin/bash
#
# script formats bonnie output and calls gnuplot to create a png graph
# of various bonnie parameters.
#
# feed script bonnie++ output - it will attempt to find the last line of bonnie output
# which is all it really cares about anyway
#
# eg: Using uid:65534, gid:65534.
# Writing a byte at a time...done
@jserviceorg
jserviceorg / mysql-convert-myisam-to-innodb.sh
Created December 6, 2017 16:21 — forked from ablyler/mysql-convert-myisam-to-innodb.sh
Convert all MyISAM tables in all databases on a server to InnoDB
#!/bin/bash
for t in $(mysql --batch --column-names=false -e "select concat(TABLE_SCHEMA, '.', TABLE_NAME) from INFORMATION_SCHEMA.TABLES where ENGINE = 'MyISAM' and TABLE_TYPE = 'BASE TABLE' and TABLE_SCHEMA <> 'mysql'" mysql); do
mysql -e "alter table $t type=InnoDB";
done