This file contains 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
Command to get info: | |
java -XshowSettings:properties -version | |
Get tomcat info: | |
java -cp lib/catalina.jar org.apache.catalina.util.ServerInfo |
This file contains 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
Test if a port on a remote system is reachable: | |
nc -zv 10.57.1.61 3307 |
This file contains 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
Hint, how to use port forwarding, which allows forward traffic on a port of your local computer to the SSH server, which is forwarded to a destination server. | |
On your local computer, type in command line: | |
ssh -N -L 7000:destination.server.com:9300 user@example.com | |
Any traffic comes to this port is sent to the SSH server and traffic received is sent to port 9300 of destination.server.com, which is the server itself. | |
Now, you get access to use 127.0.0.1 as the host and 7000 as the port. | |
This file contains 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
import groovy.time.TimeCategory | |
import groovy.time.TimeDuration | |
def timeStart = new Date() | |
// do something here | |
def timeStop = new Date() | |
TimeDuration duration = TimeCategory.minus(timeStop, timeStart) | |
println duration |