Skip to content

Instantly share code, notes, and snippets.

@diegopacheco
Last active August 17, 2022 12:17
Show Gist options
  • Save diegopacheco/1c2680da898aac8123e87eab0307ad25 to your computer and use it in GitHub Desktop.
Save diegopacheco/1c2680da898aac8123e87eab0307ad25 to your computer and use it in GitHub Desktop.
How to install and use JvmTOP?
wget https://github.com/patric-r/jvmtop/releases/download/0.8.0/jvmtop-0.8.0.tar.gz
tar -xzvf jvmtop-0.8.0.tar.gz
rm -rf jvmtop-0.8.0.tar.gz
chmod +x jvmtop.sh
./jvmtop.sh

More on: https://github.com/patric-r/jvmtop

@noetic-armughan
Copy link

/usr/lib/jvm/java-11-openjdk-11.0.9.11-3.el8_3.x86_64 seems to be no JDK!

I'm having this issue when I try to run jvmtop script on CentOS 8 by ./jvmtop.sh

Please suggest the solution

@manpakhong
Copy link

I have confronted the same problem. You can solve it by adding:
JAVA_HOME="/usr/java/jdk1.8.0_251-amd64" (your java home path)
to jvmtop.sh

=======================================

#!/bin/sh

jvmtop - java monitoring for the command-line

launch script

author: Markus Kolb

DIR=cd "\dirname "$0"`" && pwd`
JAVA_HOME="/usr/java/jdk1.8.0_251-amd64"

if [ -z "$JAVA_HOME" ] ; then
JAVA_HOME=readlink -f \which java 2>/dev/null` 2>/dev/null |
sed 's//bin/java//'`
fi

TOOLSJAR="$JAVA_HOME/lib/tools.jar"

if [ ! -f "$TOOLSJAR" ] ; then
echo "$JAVA_HOME seems to be no JDK!" >&2
exit 1
fi

"$JAVA_HOME"/bin/java $JAVA_OPTS -cp "$DIR/jvmtop.jar:$TOOLSJAR"
com.jvmtop.JvmTop "$@"
exit $?

@skyer9
Copy link

skyer9 commented Sep 15, 2021

also need to install JDK.

sudo apt-get install openjdk-8-jdk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment