I have started a background job. Is there a way to know how it is progressing, and whether it has stopped?

My command line is like:

java weka.classifiers.trees.J48  -t data.arff  J48-data.model >&  log

3 Answers 3


For java processes, use jps command. This would give more information pertaining to the java environment of the java process.


You could simply tail the log, which would be useful if the job produces regular output

Or a ps -ef will let you know current status of your job (ie whether it is running, finished or in some other state)


In addition to Nikhil's Java-specific suggestion of jps and Rory's suggestion to look at the log:

You can look for the process in the output of htop (or top, which has a crappier UI). You'll see how much CPU time it's currently using.

You can trace the process with strace (on Linux, or some equivalent such as trace or dtrace or ktrace on other unices): strace -p1234 where 1234 is the process ID. This will tell you if the process is doing something (which may or may not be something useful) or if it's blocked waiting for input somewhere.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .