Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
share|improve this question
up vote 2 down vote accepted

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

share|improve this answer

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)

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.