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/sh | |
| # you might want to add some user authentication here | |
| mysql -e "show variables; show status" | awk ' | |
| { | |
| VAR[$1]=$2 | |
| } | |
| END { | |
| MAX_CONN = VAR["max_connections"] | |
| MAX_USED_CONN = VAR["Max_used_connections"] | |
| BASE_MEM=VAR["key_buffer_size"] + VAR["query_cache_size"] + VAR["innodb_buffer_pool_size"] + VAR["innodb_additional_mem_pool_size"] + VAR["innodb_log_buffer_size"] |
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 | |
| echo "starting check sidekiq" | |
| process=`cat /path-to/sidekiq.pid` | |
| processConfirmation=`ps aux | awk '{print $2 }' | grep $process` | |
| if [ -z $processConfirmation ] | |
| then | |
| echo "oops! not running... restarting sidekiq" |
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
| stats = Sidekiq::Stats.new | |
| stats.queues | |
| stats.enqueued | |
| stats.processed | |
| stats.failed |
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
| # Install `dnsmasq` and configure for *.test domains | |
| $ brew install dnsmasq | |
| $ vim /usr/local/etc/dnsmasq.conf | |
| # Reload configuration and clear cache | |
| $ sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
| $ sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
| $ dscacheutil -flushcache |