cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco and Yourkit profiler

dsoe
Champ in-the-making
Champ in-the-making
I want to use Yourkit to measure the performance in alfresco. For this case I generated a new startup.bat with Yourkit. But nothing happens when I start the tomcat server by executing the new bat-file.

Thanks,
dsoe
3 REPLIES 3

afaust
Legendary Innovator
Legendary Innovator
Hello,

would you mind providing the code of your adapted startup script? Are there any errors in your Alfresco log files?

Regards
Axel

dsoe
Champ in-the-making
Champ in-the-making
here is the content of the generated startup.bat:


rem Generated with YourKit Java Profiler 12.0.3

@echo off
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements.  See the NOTICE file distributed with
rem this work for additional information regarding copyright ownership.
rem The ASF licenses this file to You under the Apache License, Version 2.0
rem (the "License"); you may not use this file except in compliance with
rem the License.  You may obtain a copy of the License at
rem
rem     http://www.apache.org/licenses/LICENSE-2.0
rem
rem Unless required by applicable law or agreed to in writing, software
rem distributed under the License is distributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.

if "%OS%" == "Windows_NT" setlocal
rem —————————————————————————
rem Start script for the CATALINA Server
rem
rem $Id: startup.bat 895392 2010-01-03 14:02:31Z kkolinko $
rem —————————————————————————

rem Guess CATALINA_HOME if not defined
set "CURRENT_DIR=%cd%"
if not "%CATALINA_HOME%" == "" goto gotHome
set "CATALINA_HOME=%CURRENT_DIR%"
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
cd ..
set "CATALINA_HOME=%cd%"
cd "%CURRENT_DIR%"
:gotHome
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
echo The CATALINA_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
goto end
:okHome

set "EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat"

rem Check that target executable exists
if exist "%EXECUTABLE%" goto okExec
echo Cannot find "%EXECUTABLE%"
echo This file is needed to run this program
goto end
:okExec

rem Get remaining unshifted command line arguments and save them in the
set CMD_LINE_ARGS=
:setArgs
if ""%1""=="""" goto doneSetArgs
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto setArgs
:doneSetArgs

set JAVA_OPTS=-agentpath:C:\development\YourKit\bin\win64\yjpagent.dll=disablestacktelemetry,disableexceptiontelemetry,builtinprobes=none,delay=10000,sessionname=Tomcat %JAVA_OPTS%
call "%EXECUTABLE%" start %CMD_LINE_ARGS%

:end


There are no errors in my Alfresco log file.

afaust
Legendary Innovator
Legendary Innovator
Hello,

please change the last command in your script to use "run" instead of "start", then open up a command shell and call your startup.bat from there. This should result in any console output being directed to your command shell, while "start" would send any output to a different shell, which closes immediately if the Tomcat fails to start.
I'd expect any kind of error setting up / starting the JVM. The batch in general looks ok, since it's basically an adapted original - I expected a custom file based on the wording of your first post.

Regards
Axel