Thursday, August 19, 2010

moved

This blog has moved to pydude.blogspot.com.

Wednesday, May 27, 2009

SSH Port forwarding

Local Forwarding: forward local service to remote service

Local: ssh -L 9998::
Remote server: nc -l
Local: nc localhost 9998


Remote Forwarding: forward remote service to local service
Local: nc -l localhost 9998
Local: ssh -R 9999::
Remote server: nc -l locahost 9999

Friday, July 21, 2006

How to enable dtrace with usermod on Solaris 10?

To enable dtrace for "foo"
usermod -K defaultpriv=basic,proc_owner,dtrace_kernel,dtrace_proc,dtrace_user foo

Friday, July 14, 2006

How to instrument WebLogic with JProbe?

There are two ways.

1. Customize startManagedWebLogic.sh with instrumentation.
For instance, for JProbe, we can do the following
${JPROBE}/bin/jplauncher
-jp_java="$JAVA_HOME/bin/java" -jp_input="myapp.jpl" -Dweblogic.Name=${SERVER_NAME} -Dweblogic.management.username=${WLS_USER} -Dweblogic.management.password=${WLS_PW} -Dweblogic.management.server=${ADMIN_URL} -Djava.security.policy="${WL_HOME}/server/lib/weblogic.policy" -Duser.timezone="MST" -Djava.security.auth.login.config="${EM_ABP_HOME}/wl_jaas.config" weblogic.Server

jplaucher will kick off the instrumented JVM.

2. Use a different node manager start up script.
To avoid passing those environment variables as above, use a customized node manager start up script is a good idea.

look at startNodeManager.sh to write your own

nodemanager.properties
======================
StartTemplate=myjprobe.sh


For example, if you set StartTemplate=myjprobe.sh, myjrobe.sh is used to start Weblogic Managed server with jplauncher just like in 1.

Sunday, December 05, 2004

indoor volleyball and basketball

Ever since the beach volleyball is over, I have been playing indoor volleyball and basketball every Sat afternoon. It has been fun and will end this season next week. I will be on vacation/time off soon:-).They approved my time off and I could spend my chinese new year in china with my parents this time. fell pretty cool and excited. I plan do some travelling.

last night went out for dinner (YunNan style). Then we played poker and "killer" game at a friend's place. He finished his contract and go back to Beijing next week.. should be loads of fun over there. I will probably see him in over a month over there. o well it's wierd last night that a few us has been playing "killer" on and on, me 4 times, then playing "cop" 2 times.. some ppl never did.. odd as it is. had to take 5-6 shots of hard liquor. going down my throat and burned right to my stomach.. eventually feel sleepy and all went home.. haven't had this 65 % liquor for a while.. it is good and I sleep till 10:00 and no need to go work or give a ride or sth...good feeling.

Friday, December 03, 2004

Pytion is not java

Python is not Java!

I like what he said: stop writing too much code . I will add: stop thinking too much code

Tuesday, November 30, 2004

hackable software is about control over code

Then hackers like UNIX while the rest loves Windows. However Windows is morphing itself into a UNIX kernel with its window system. Why? It is because it is statically hackable in UNIX thru shell script, pipe etc. That give them more control.

Open source software and UNIX have a common characteristic: hackable. For UNIX, it appears hard to hack for a starter. Windows seems go the other way. But once you master C, a few shell script language then everythings seems downhill from there.

And the hackers like open source just because it is hackable. The more hackable the software is, the more control hackers over it. The software (actually requirements from human) is a live form that keeps changing dynamically, to maintain sth. like that you need it be hackable, either staticlly hackable or dynamically.