Connect to Redis CLI
$ redis-cli
Enable the current redis as a slave for the master node
statgrab -b | grep -E '[0-9]+' | tr -s ": " ":" | tr -s "." "_" | awk '{print $0"|c"}' |awk '/[0-9]/' |nc -C -w 1 -u localhost 8125 |
# get a list of all packages which are required for minimum os operation | |
aptitude search '?essential' or dpkg-query -Wf '${Package;-40}${Essential}\n' | grep yes |
#!/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" |
# 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 |
--- | |
- hosts: backup | |
tasks: | |
- name: generate hostlist root backup for rsnapshot | |
lineinfile: "dest=/opt/rsnapshot/rsnapshot.conf | |
line='{{ item }} / {{ item }}/' | |
state=present" | |
with_items: | |
- "{{ groups['all'] }}" | |
- name: generate hostlist root backup for rsnapshot |
#!/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 |
CPUTYPE?=native | |
OPTIONS_SET=OPTIMIZED_CFLAGS CPUFLAGS | |
OPTIONS_UNSET=CUPS DEBUG DOCS FONTCONFIG NLS X11 | |
WITHOUT_MODULES=sound ntfs linux | |
WITHOUT_X11=yes | |
DEFAULT_VERSIONS+=ssl=openssl |
dladm create-aggr -d nic1 -d nic2 -L active aggr0 |
zfs list -Hp -t snapshot |grep 2018-02-17 | awk {'print $2'} |awk '{ sum+=$1} END {print sum}' |