How to connect JProfiler to Virgo Server running in remote linux machine - jprofiler

Please help me how to connect JProfiler from windows machine to remote Virgo Jetty Server which is running in linux server.
Below are the steps I am following
From Choose Integration Wizard selecting Eclipse Virgo(Next)
Then I am selecting option of on remote computer with Linux platform(Next)
Then I am selecting JVM vendor Version etc (Next)
selecting option Wait or a connection from JProfiler GUI(Next)
Providing remote hostname:port(Next)
I was stuck at specifying remote installation directory
Here we didnt install JProfiler in our linux remote environment but we have server running there.I have seen option like If JProfiler is not installed,you can create archive and that contains profiling agent and extractit in above directory.Asking folder where to create Archive.
Can you please help what exactly this means what I need to do to create archive .Only thing I have done is installed JProfiler evaluation version in local machine and profiling local server.
Please help and let me know any additional information is required..Thanks in Advance..

If you select the option to create an archive in the integration wizard, JProfiler will create a .tar.gz file that contains the libraries for the profiling agent. You transfer that archive to the Linux server and extract it somewhere, e.g. to /home/myname/jprofiler by calling
mkdir /home/myname/jprofiler
cd /home/myname/jprofiler
tar xzvf /path/to/jprofiler_agent_linux-x64.tar.gz
In the integration wizard, specify /home/myname/jprofiler as the remote installation directory.

Related

Access WSL2 java vm through IDEA

I have setup GraalVM by downloading it through oracle page and extracting the tar file in drive E:/ ("E:\Programs\Java\graalvm-ee-java17-22.0.0.2\bin").
Then I log into WSL2 (ubuntu) bash and setup the environment variables in bashrc.
now I can execute the VM through command line...
However my IDEA Community could not load this JVM into my project. When I try to manually add JDK, it would not allow to open mnt folder and specify the path.
I can't expand the e directory. How can I overcome this issue and allow IDEA to recognize the WSL instance JDK?
It's a Windows limitation, if you open \\wsl$\Ubuntu-20.04\mnt in File Explorer, you will not be able to browse the drives. I'd recommend you install JDK in another browsable place under WSL.

How to start WebLogic in profiling mode?

No information found for this. Is there any way to start weblogic in profiling mode? Or, maybe, it's activated by default?
Profiling action can be initiated 2 ways
1) Pass the profiling action while you execute the startWeblogic.sh. Following parameters can be appended
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8010
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
2) The same parameters can be appended from startup tab in weblogic server
Here's what i got. Mainly focused on remote profiling using NetBeans
generated remote profiling package for target OS and JVM architecture (32 or 64 bit) (Netbeans -> Profile -> Attach Profiler -> Change link, select OS and Java platform -> click "Create a remote profiling package" link)
copy this package to target machine
execute calibration script (calibrate.bat / calibrate.sh (chmod +x))
add specific argument to java_otps with path to this package
-agentpath:PathToProfilerPackage\lib\deployed\jdk16\windows-amd64\profilerinterface.dll=PathToProfilerPackage\lib,5140
restart weblogic. Startup will be interrupted until remote profiler connected
connect to a server using NetBeans profiler. Weblogic startup will continue.
However, i still can't download heap dump (which is available when attaching to local java.exe Weblogic process) but that's something.

How to Run a Program (which is compiled on Local Machine) on a Remote Machine through ssh?

I want to run a program which its files is located and compiled in local machine on a remote machine through ssh. I used to scp (copy through ssh) its compiled files to remote machine and then run it. Is it possible to escape scp and run it from local machine?
#rekire's suggestion is reasonable.
alternatively, you could mount (part of) the developments machine file system on the target machine with sshfs and execute the remote binary as if it were stored locally on the target.
for more information on sshfs see e.g. https://help.ubuntu.com/community/SSHFS
I expect that both computers have the same architecture or that you cross compiled them to fit on the target.
I would use this two commands:
scp yourapp target:/path/to/store/yourapp
ssh target /path/to/store/yourapp
That requires that you have a running ssh setup which auths you on the target system.
There are several ways to setup this you could try this page http://www.rebol.com/docs/ssh-auto-login.html

Error while using jprofiler for profiling remote weblogic server

Hi I am new to jprofiler . My task is to profile a remote weblogic server for which i have followed the steps for remote profiling and came till sh file creation which the jprofiler creates itself. As i have read I need to start my weblogic server with this sh file .
But i am stuck up with the following error.
:Error occured during initialisation of VM could not find agent library in the absolute path ......./linuxX64/libjprofilerti.so
I can see the file in path mentioned in the error. Help needed quickly .
Thanks in advance,
Raghu dev
Likely, you're profiling a 32-bit JVM, not a 64-bit JVM. Repeat the integration wizard and deselect the "64-bit JVM" check box on the "Profiled JVM" step. Then it should work.
uncheck the 64-bit vm option in jprofiler while creating the profiling settings. this should solve the issue

Automate CentOS installation with VMware for testing

Is is possible to automate the installation of an OS using VMware or any other virtualization product?
One of our products consists of a customized version of CentOS that installs the OS and our application on a server. It's much like any CentOS/RHEL installation where you choose a mode that corresponds to different kickstart options, and then you choose your keyboard type. The rest of the installation is automatic.
What I'd like to have is an automated system that will create a new guest VM, boot it with the ISO image of our product, start the installation (including choosing the keyboard), wait for the reboot, and then launch a set of automated tests.
I know that there are plenty of ways to automate the creation of new VM guests from existing templates/images, and I know you can use the VIX API to interact with virtual machines, but the VIX API seems to require that VMware tools is already running (which won't be the case when you're booting from the CentOS install disk).
This answer (Automating VMWare or VirtualPC) indicates that you can script VMware to boot from an ISO that does an unattended installation, but I would really like to test the same process that our customers will be using.
Another option might be to use Xen's fully-virtualized mode and see if scripting it over the serial port will work.
TIA,
Jason
I have a very very similar question, it is on superuser:
https://superuser.com/questions/36047/moving-vmware-os-image-as-primary-os-on-a-system
You can also use VirtualBox instead of VMWare. The VirtualBox SDK allows you to directly control the keyboard, the mouse the serial port and the parallel port of the guest without the virtualbox guest tools installed.
Unfortunately it doesn't offer a text console interface but the serial port can be connected to a local pipe file and that can probably be worked with just as well.
This may not be exactly what you need:
I have done something similar with a Ubuntu-based install. We used preseeding (Debian's form of kickstart), to answer all the questions during the install - providing the preseed file and the installer via tftp.
In addition to the official Ubuntu mirror we added the apt-server with our own packages in the preseed file. We put a .deb version of vmware-tools on the apt-server and added it to the packages to be installed.
The .deb of vmware tools just contained the .tar.gz and a postinstall script that would extract it to /tmp and run the vmware install script (which has a switch to be run unnattended, so it does not ask any questions).
So after the reboot vmware-tools were up and running and we could use vix to script the rest (which was not very reliable).
If you should encounter problems with running vmware-config.pl during boot, you could make a custom package that just extracts the tools and an init script that installs them on first boot, disables itself and reboots.
Maybe you can use this strategy (replacing apt by yum, preseed by kickstart and tftp by a remastered iso). If you really need to test that your users choose a keyboard in the installer (which is not very different from kickstart) this would obviously not work for you..