Profiling JBoss 7 using YourKit on Windows

This is how we got YourKit Profiler 2015 to work with JBoss 7 on Windows 7.

This short guide uses HOME directory variables that you need to match to your own personal setup.
1. Create the directory JBOSS_HOME\modules\com\yourkit\profiler\main\.

2. Copy YOURKIT_HOME\lib\yjp.jar to this new directory.

3. Create a module.xml file in this new directory with the following

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="com.yourkit">
        <resource-root path="yjp.jar"/>

4 Edit JBOSS_HOME\bin\standalone.conf.bat. Add the following lines
right at the end of the file, but before the :JAVA_OPTS_SET line.

rem # YourKit
set YOURKIT_AGENT={YOURKIT_HOME}\bin\win64\yjpagent.dll
set "JAVA_OPTS=%JAVA_OPTS% -agentpath:%YOURKIT_AGENT%=delay=10000

5. Change {YOURKIT_HOME} to the actual directory of YourKit.
{YOURKIT_HOME} cannot have any spaces. If your YourKit installation has
spaces in it, use the old DOS short names as a workaround.

6. Run JBoss 7. In YourKit, connect to the jboss-modules application.


FileZilla Custom Site Manager Location

Here’s how to use a different directory for the FileZilla Site Manager or “My Sites” configuration on Windows. This is useful when you need to specify a standard configuration directory for syncing across computers. Please note that site passwords are stored in this location and should be kept private and secure.

1. Open you favorite text editor as an Administrator.

2. Go to the FileZilla installation directory and open fzdefaults.xml. On our 64-bit Windows machine, the location is %PROGRAMFILES(x86)%\FileZilla FTP Client\fzdefaults.xml.

3. Change the “Config Location”, pointing it to the new configuration directory. Use slashes in the path. Something like:

    <Setting name="Config Location">C:/Users/john/FileZilla/</Setting>

4. Start FileZilla and go to File -> Site Manager. Site Manager should now display entries found under the newly configured directory.

rsyslog Email Notification

If you are using rsyslog, here’s how to get an email notification when a certain keyword is found in the logs.

1. Edit rsyslog.conf. We are using Red Hat.

> vi /etc/rsyslog.conf

2. Add the following lines at the end of the file. An email will be sent when the keyword ERROR is found. The action runs every 5 minutes.

$ModLoad ommail
$ActionMailSMTPServer localhost
$template mailSubject,"[rsyslog] %hostname%"
$template mailBody,"%msg%"
$ActionMailSubject mailSubject
$ActionExecOnlyOnceEveryInterval 300
if $msg contains 'ERROR' then :ommail:;mailBody

3. Restart rsyslog.

> service rsyslog restart