This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description = pt-slave-delay 12h delay | |
After=syslog.target mysql.service | |
Requires=mysql.service | |
[Service] | |
Type = simple | |
PIDFile = /var/run/ptslavedelay.pid | |
ExecStartPre = /usr/bin/mysql --defaults-extra-file=/root/.my.cnf -e 'start slave; select sleep(3);' | |
ExecStart = /usr/bin/pt-slave-delay --daemonize --pid=/var/run/ptslavedelay.pid --nocontinue --delay 12h --defaults-file=/root/.my.cnf localhost |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#shows traffic on the specified device | |
function human_readable { | |
VALUE=$1 | |
BIGGIFIERS=( B K M G ) | |
CURRENT_BIGGIFIER=0 | |
while [ $VALUE -gt 10000 ] ;do | |
VALUE=$(($VALUE/1000)) |