Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8311187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:43:42+00:00 2026-06-08T19:43:42+00:00

I want to profile tomcat server with a java profiler. My profiler runs from

  • 0

I want to profile tomcat server with a java profiler. My profiler runs from the script say run.sh which looks like below:

if [ -z "$JAVACMD" ] ; then
   if [ -n "$JAVA_HOME" ] ; then
      JAVACMD="$JAVA_HOME/bin/java"
   else
      JAVACMD="`which java`"
   fi
 fi

if [ ! -x "$JAVACMD" ] ; then
 echo "Error: JAVA_HOME is not defined correctly; cannot execute: $JAVACMD"
 exit 1
fi


java  -javaagent:lib/jborat-agent.jar \
 -Dch.usi.dag.jborat.exclusionList="conf/exclusion.lst" \
  -Dch.usi.dag.jborat.liblist="conf/lib.lst" \
   -Dch.usi.dag.jp2.outputFilePrefix="output" \
   -Dch.usi.dag.jborat.instrumentation="ch.usi.dag.jp2.instrument.AddInstrumentation" \
   -Dch.usi.dag.jp2.dumpers="ch.usi.dag.jp2.dump.xml.XmlDumper" \
     -Dch.usi.dag.jborat.codemergerList="conf/codemerger.lst" \
      -Xbootclasspath/p:./lib/Thread_JP2.jar:lib/jborat-runtime.jar:lib/jp2-runtime.jar/jp2.jar/jborat-agent.jar/jborat.jar $* 

Could somebody please guide me how can I include this profiler in tomcat ?

Is it possible to write something like this CATALINA_OPTS=”$CATALINA_OPTS -javaagent:run.sh” in catalina.sh ?

I would really appreciate any help regarding this.

Thanks.

I tried adding options of run.sh (profiler) to setenv.sh as below but does not work. It does not give any error but The server is not starting. I dont know why.

Here is my setenv.sh file:

 #!/bin/sh
export CATALINA_OPTS="java -javaagent:lib/jborat-agent.jar \
 -Dch.usi.dag.jborat.exclusionList="conf/exclusion.lst" \
  -Dch.usi.dag.jborat.liblist="conf/lib.lst" \
   -Dch.usi.dag.jp2.outputFilePrefix="output" \
   -Dch.usi.dag.jborat.instrumentation="ch.usi.dag.jp2.instrument.AddInstrumentation" \
   -Dch.usi.dag.jp2.dumpers="ch.usi.dag.jp2.dump.xml.XmlDumper" \
     -Dch.usi.dag.jborat.codemergerList="conf/codemerger.lst" \
      -Xbootclasspath/p:./lib/Thread_JP2.jar:lib/jborat-runtime.jar:lib/jp2-runtime.jar/jp2.jar/jborat-agent.jar/jborat.jar "
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T19:43:43+00:00Added an answer on June 8, 2026 at 7:43 pm

    I already answered your exact same question yesterday. Briefly, you want this:

    $ export CATALINA_OPTS="-javaagent:lib/jborat-agent.jar -Xss256m -Xms256m  \ -Dch.usi.dag.jborat.exclusionList="conf/exclusion.lst" \ -Dch.usi.dag.jp2.dumpers="ch.usi.dag.jp2.dump.xml.XmlDumper" \ -Xbootclasspath/p:./lib/Thread_JP2.jar:lib/jborat-runtime.jar:lib/jp2-runtime.ja‌​r"
    $ $CATALINA_HOME/bin/startup.sh
    

    I don’t understand why you need more than that: your script just adds a bunch of system properties to the JVM launcher: you can do that with $CATALINA_OPTS. If you want to set them somewhat permanently, put the export into bin/setenv.sh and it will automatically be run every time you run bin/startup.sh (and bin/shutdown.sh for that matter).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to profile my code on arm 9, Is there any profiler which
I want to reload my user profile from a script file. I thought that
Let's say I want to profile usage of a single library which is used
I want to carry some cookies value to different subdomains like blog.mydomain.com , profile.mydomain.com
I want to do something, like edit my email address in a profile page,
I have a function in an app called email which I want to profile.
I want to profile my jBoss Apps on a remote server. I've tried the
I have a pom with 3 profiles defined. I want: run generate profile always
I have configured mini profiler with asp.net mvc application. I also want to profile
I want users to able to have a profile page at site.com/myNameHere. Rails looks

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.