3 lines
218 B
Bash
3 lines
218 B
Bash
#!/bin/bash
|
|
mysql -e 'SHOW SLAVE STATUS\G' | tee /dev/stderr | grep 'Seconds_Behind_Master' | cut -d':' -f2 | read seconds && eval "echo $(date -ud "@$seconds" +'$((%s/3600/24)) days %H hours %M minutes %S seconds')"
|