Date Published: Feb 17,2017 Category: Product:Application_and_Webserver_Learn; Version:Learn_9_1_Q4_2016_3100_0_0_rel_107_401e,Learn_April_2014_9_1_201404_160205,Learn_October_2014_9_1_201410_160373,Learn_9_1_Q4_2015_9_1_201510_1171621,Learn_9_1_Q2_2016_3000_1_0_rel_52_991d Article No.: 000064203
Product: Blackboard Learn
Release: 9.1
Note:
If you have Windows application servers, you can simply run jvisualvm from Windows Explorer, and skip the PuTTY/VcXSrv. You can also skip the PuTTY/VcXSrv installation if you have another SSH client that supports X11 and another X Windows server for Windows (there are many free versions available).Functionality:
jVisualVM - The easy way
You need two software packages, which may or may not already be installed:
- SSH client like PuTTY (or another PuTTY-based client, like SuperPuTTY)
- X Server package for Windows.
-
Install PuTTY client for your Windows workstation (http://www.putty.org/)
-
Install Visual C++ Redistributable 2015 (08 or newer works, if you already have it): (https://www.microsoft.com/en-us/download/details.aspx?id=48145)
- If you have issues installing Visual C++ Redistributable on Win7, see the 'Common Issues' section below.
- If you have issues installing Visual C++ Redistributable on Win7, see the 'Common Issues' section below.
-
Install VCXSrv (Visual C X Server) for Windows (https://sourceforge.net/projects/vcxsrv/)
-
Restart your machine after installing both (VcXsrv needs to set system variables)
-
Open PuTTY and enter the app server host name you want to profile
-
Start the VcXServ server in the background (Start > Search > VcCSrv > Enter)
-
In PuTTY, click Connection > SSH > X11 and check Enable X11 Forwarding. Under Connection > SSH click Enable Compression
-
Open your SSH session, then run /usr/local/jdk1.8_0_91/bin/jvisualvm (replace with whichever JDK Learn is using)
-
Since X11 is enabled, you should get a GUI window for jVisualVM. From here, find the main Tomcat JVM by looking for org.tanukisoftware.wrapper.WrapperStartStopApp:
-
Double click the WrapperStartStopApp, and you're in! You can now take CPU samples, memory samples, observe the live heap, take thread dumps or heap dumps, or anything else you might need to do. For example, we often use CPU Sample Snapshots to find out what classes are taking up the most time in a specific action. To get a snapshot, click the "Sampler" tab:
-
Then click "CPU" to start sampling (do this DURING an issue):
-
After you've been sampling the issue for enough time and can see some items may be problematic, take a snapshot by clicking the Snapshot button:
-
Save the snapshot by clicking the new snapshot-generated tab and selecting Export to:
-
Save it to a location from which you can retrieve it, and use WinSCP or some other SFTP client of your choice to retrieve it:
-
Repeat as needed for further snapshots, thread dumps, etc. and submit the requested CPU Snapshots, App Snapshots, Heap dumps, or Thread dumps to support for investigation.
If you have issues installing Visual C++ Redistributable on Windows 7, you may find the following resources useful:
- Visual C++ Stuck during install at Windows7_MSU_x64: http://stackoverflow.com/questions/41233672/installation-microsoft-visual-c-redistributable-stuck-at-processing-window
- Install Update for Windows 7 for x64-based Systems (KB2999226)
-
Download the update KB2999226 for your OS edition from here: Update for Universal C Runtime in Windows
-
Manually install the KB2999226 as below:
-
o Find the path to the file Windows6.1-KB2999226-x64.msu from the folder C:\ProgramData\Package Cache\xxxxx\packages\Patch\x64, where xxxxx is the update ID, similar to "42D5BEC7DDFBD49E76467529CBC2868987BF8460"
o Create a folder named ‘XXXX’ in that and execute following commands from Admin command prompt (start > cmd.exe > right click > run as admin)
o wusa.exe Windows6.1-KB2999226-x64.msu /extract:XXXX
o DISM.exe /Online /Add-Package /PackagePath:XXXX\ Windows6.1-KB2999226-x64.cab
o Run the Visual C++ Redistributable with the repair option: vc_redist.x64.exe /repair