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 | |
| # check mysql file open limit | |
| # | |
| # Assumption: | |
| # 1) ssh without password to host | |
| # 2) mysql connection to remote host | |
| # === configuration here ==== | |
| ALL_HOSTS="qadb1 qadb2 qadb3 stagedb1 stagedb2 stagedb3 proddb1 proddb2 proddb3" | |
| SSH_USER="ops" |
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
| Guava is just better with JMX |
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
| package net.hang321.http.client; | |
| import java.io.IOException; | |
| import java.net.InetSocketAddress; | |
| import java.net.Socket; | |
| import java.net.URI; | |
| import java.util.LinkedHashSet; | |
| import java.util.Set; | |
| import org.slf4j.Logger; |
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
| def dateTimeFormat = "yyyy-MM-dd HH:mm:ss 'GMT'" | |
| def timeZone = TimeZone.getTimeZone("UTC") | |
| def dateTimeFormatter = new java.text.SimpleDateFormat(dateTimeFormat) | |
| dateTimeFormatter.setTimeZone(timeZone) | |
| def msgTime = dateTimeFormatter.format(new java.util.Date()) | |
| println(msgTime) |