Search code examples
bashtop-command

Bash: How do I show the name of a specific java -jar in Top command?


Note: this is not a java question. I'm asking about the Top Command in bash.

Often I am running several programs written in java at the same time. For example;

`java -jar [program] [options]`

I want to check that they are running using top, however when I try it the output says java is running.

enter image description here

Is there a way to get the last column to say the program's name instead of "java"?


Solution

  • top -c will show you the command details, but with java programs it might be too long to be useful.