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
import java.io.UnsupportedEncodingException; | |
public class WasPasswordEncoder { | |
public static void main(String[] args) { | |
// Test | |
String password = "testpw123"; | |
String encodedPassword = encode(password); | |
System.out.println("encoded pw: " + encodedPassword); | |
// check from http://www.sysman.nl/wasdecoder/getEncodedString.jsp?waspwd=testpw123 | |
// shall be KzosKy8obm1s |
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
cat `ls -rt trace*.log` >> trace_merged.log |
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
tprof -skex sleep 60 | |
# produces sleep.prof. | |
# take javacores during this interval | |
# correlate thread id from tprof (decimal) to javacore (hex) using following | |
echo "obase=16; <decimal_thread_id>" | bc |
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 nameToDict(nameString): | |
stringList = nameString.split(','); | |
dict = {}; | |
for part in stringList: | |
keyValueList = part.split('='); | |
dict[keyValueList[0]] = keyValueList[1]; | |
return dict; | |
pools = AdminControl.queryNames("WebSphere:*,type=ThreadPool").split("\n"); |
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
import sys | |
if len(sys.argv) < 1: | |
print 'please supply trace string as parameter' | |
sys.exit(1) | |
print 'tracestring is:' , sys.argv[0] | |
tsc = AdminControl.queryNames('WebSphere:type=TraceService,*').split("\n") |
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
import sys | |
if len(sys.argv) < 1: | |
print 'please supply trace string as parameter' | |
sys.exit(1) | |
print 'tracestring is:' , sys.argv[0] | |
traceservices = AdminConfig.list('TraceService').split('\n') | |
for ts in traceservices: |
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
# memory usage for all active processes | |
svmon -P | |
# same as above, one line for each process | |
svmon -P -O summary=basic,unit=MB | |
# Total memory used and total number of processes | |
svmon -P -O summary=basic,unit=KB | tail +4 | awk '// {total+=$3} END {print "total mem=",total/1024/1024," GB, n=",NR}' | |
# Total memory used and total number of processes for Java processes only |
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
tcpdump -s 0 -w output.cap host target_host_name |
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 | |
for i in `find . -name '*.jar'`; do jar -tf "$i" | grep $1 | xargs -I{} echo "$i : {}" ; done | |
# if 'jar' is not in the path, you may use 'unzip -l' instead of 'jar -tf' |