Jul
19
comment How 'expensive' is it to execute jstack on a running JVM?
@StuThompson Sorry, I somehow read jstack as jstat, now the answers make more sense.
Jul
18
comment How 'expensive' is it to execute jstack on a running JVM?
The question is about stats collection, but the answers are about thread dumps? I presume the OP is talking about using options like -gcutil with jstack, and I am wondering the same as OP.
Jul
8
comment Java using enum with switch statement
You need the unqualified enum names in the case statement, so case GuideView.SEVEN_DAY: gives a compilation error, it should be case SEVEN_DAY:.
Jul
7
comment HBase error: Not a host:port pair
Yes, the samething happened when I accidentally used 0.94 to connect to 0.98.
Jul
2
awarded Curious
Jun
19
awarded Necromancer
Jun
11
awarded Popular Question
Jun
11
comment How do I manipulate $PATH elements in shell scripts?
Note that the t=($PATH) has the side effect of expanding any wildcards in the PATH. Now, I don't know if it is valid for path components to have wildcards, but I did come across this situation while manipulating a CLASSPATH. For some reason set -f and WILDIGNORE had no impact on this behavior.
Jun
4
comment How to roll the log file on startup in logback
Since my requirement is for a command-line tool, I don't need time based triggering at all, so I was able to get it working by switching to FixedWindowRollingPolicy and a custom TriggeringPolicy class with an isTriggering method that returns true only once.
Jun
4
comment How to roll the log file on startup in logback
This seems to break the cleanHistoryOnStart. I used this technique for a short running tool to generate a separate log file for every run, and notice that the configured maxHistory is not working. Could this be some race condition?
May
20
awarded Civic Duty
May
20
comment How to get pid of piped command?
If you must really find the PID, you could do so by separating the two commands via a named pipe. You would create a named pipe using mknod or mkfifo and the approach is: command1 > PIPE &; pid1=$PID; command2 < PIPE. See linuxjournal.com/content/using-named-pipes-fifos-bash for more information on named pipes.
May
20
answered In Mac, how do I determine in a script (sh/bash/applescript) if currently running via Apple Remote Desktop?
May
19
comment GNUPLOT: How to use a function to decide the plot style
Would you be OK with just cycling through all the available line types? I was able to get something like this to work plot for [n=0:20:1] '' index n-1 using 2:1 with linespoints pointtype n pointsize 0.5 where pointtype n just cycles through all the available point types.
May
19
comment Know of any Java garbage collection log analysis tools?
I get "No useful data in file" error, even after renaming the file .hprof. The problem is of course not the filename, as I can make it open the .log file also, by just entering the name.
May
15
awarded Necromancer
May
10
comment Create a zip file from a generator in Python?
Other than exposing the write stream the rest of the code was from Python built-in classes, so perhaps the bug exists there also?
May
10
comment python paramiko shell commands
Do you have to reuse a single shell? Have you considered using exec_command(), which gives a clear indication of an exit code? You would also need not worry about timeouts, and you can get separate stdout and stderr streams.
May
9
revised Version number comparison
Added tests to make sure the logic works.
May
9
comment Gnuplot bad data on line 1
nm... didn't read properly.
1 2 3 4 5