Zagura’s blog

March 19, 2010

SPL-C ERROR - Please use the proper driver on Samsung CLP-310N printer

Filed under: English, Linux — puthre @ 12:10 am

If you get this error written on the test page when using Ubuntu or any other Linux distribution, you should install the Samsung Unified Driver. I’ve followed the tutorial on http://ubuntuforums.org/showthread.php?t=341621 point II.c and then I’ve added the network printer as lpd:///PASSTHRU with Make and Model “Samsung CLP-310 Series (SPL-C)” (NOT Samsung CLP-310 Foomatic/foo2qpdl)

March 10, 2010

How to programmatically dump the threads list of a running java process in bash

Filed under: English, Java, Linux, Programming — puthre @ 4:43 pm

It seems that jdb cannot accept commands from command line, so we must use expect.
I created the following expect script dumpthreads
You can use it like:
dumpthreads java_process_pid

#!/usr/bin/expect
set pid [lindex $argv 0];
spawn jdb -connect sun.jvm.hotspot.jdi.SAPIDAttachingConnector:pid=$pid;
expect “>”;
send “threads\n”;
expect “>”;
send “quit\n”;

Powered by WordPress