Export custom probes graphs from offline run in JProfiler - java

I'm using offline profiling in JProfiler (in a remote machine) and I was trying to export the graphs from the snapshot using the jpexport command. However, from some reason, I can't get the ones from my custom probes, even if when I use the JProfiler GUI to open the snapshot, I have access to those graphs.
Note that I'm collecting data through the Profiling API, using Java classes which implements the 'TelemetryProbe', for example. In the documentation, there is also the possiblity of using the Custom Probe Wizard, and I wonder if I have to do by this method to get what I want, after exporting the session files to the profiling machine.
For the jpexport, I tried to export the graphs from 'ProbeTelemetry', following the instructions for the custom probes, giving the ID 1 to get my first probe, with no success. I even tried 0, but still, it returned saying there was no probe with such ID.
Still, I repeat, when uploading the snapshot with the GUI, the graphs are there, so JProfiler is collecting the information, I just can't figure out how to access it.
Any suggestions? Thank you.

As probe names for the export, use
-probeid=1
where n is the 1-based index of the custom probe.

Related

Best way to execute java program on server

I need to execute a java simulation program for a very long time, many hours or maybe days, and i wish i could do it on a server.
I've been heard about Cloud Computing, and i'm searching a free platform, or a very cheap one.
For example, i found Oracle Cloud, but i am open to any type of solution.
On the link there are several points to follow to deploy an application, it seems a bit complicated and you also have to install Maven.
Do you think there is a simpler solution, or that this one could be my best try?
I mean, my program consists on a few .class files, i wish i could edit/compile/run the main class very easily, like with a kind of shell or cmd.
Unfortunately, i know very little about web programming, so i don't know even if this would be possible.
However, assuming i can launch my program, and log in after a very long time, will i be able to read the results?
Or is it possible to write a text file to read the results later?
i wish i could do it on a server. I've been heard about Cloud Computing
A possible solution is using AWS Lambda. You only provide your Java code in a ZIP file and it will run in a "server-less" environment. What this means is that you don't have to setup a server yourself instead AWS will manage everything for you.
i'm searching a free platform, or a very cheap one.
It's not for free, but it's pretty cheap though: https://aws.amazon.com/lambda/pricing/
However, assuming i can launch my program, and log in after a very long time, will i be able to read the results? Or is it possible to write a text file to read the results later?
I would not recommend writing it to a text file, instead look at solutions such as S3 Buckets or Elasticsearch with Kibana

(Bad) lagg on auto complete in Eclipse

Basically when I auto complete on Eclipse (By pressing CTRL+Space) the program laggs for about 5 seconds. This is getting really annoying because I use the auto complete alot. How do I fix this?
The workspace I'm working on is located on a NAS with a 1Gbit/s connection. Could this be causing it?
Thanks.
Check if problem exists with local resources too
Create a local workspace and open it with same eclipse instance. Now create a simple java project by new project wizard at your local machine inside this workapce and try code completion there. If it's still slow go to Step 2.
(by the way - I wouldn't store workspace information on remote side, but always local)
Check proposal kinds
If it's not a network issue and the problem still exists on a simple local workplace with local sources you should inspect your proposal setup as shown in next picture.Maybe one of the proposal kinds is slowing down your IDE. You can experiment with turning off proposal kinds sequential to find the problematic one.
System requirements
If you got stil the problem after doing Step 1-2 maybe your system has not enough power/memory to provide eclipse (but normally not the reason - I am using eclipse at Linux on an old T61 notebook with 4 GB Ram + SSD and it works fine!)

Java Control Panel Proxy Settings - where are they stored?

I have... a situation. Imagine you have many, many PCs (Windows 7 to 8) that run a Java Application which is started by using a .jnlp. Now finally there has been a version-jump from java 6 to 8 (took way to much time), and suddenly this application wont start any more (can't parse first jnlp, javaws tells me).
To solve this we have to insert the correct proxy-setting inside java-control panel (wasn't necessary with the old version).
So... doing this by hand is a task that most users can't perform (sadly their level of knowledge isn't sufficient), but doing ths by myself at all PCs would take... uh... a really long time.
So we decided to create a little batch-file, that does perform all the stuff necessary (installing latest jre, clearing cache and so on) which just has to be runned once at every users PC. In Theory.
We were able to place all steps necessary in that .bat, except for setting the proxy at the java control panel. I wonder if this is possible at all. The javaws arguments don't contain such an argument, and I wasn't able to find a physical storage whatever inside the jre or the java cache.
And I can't use these -dHTTP.xxx.... flags for that .jnlp file I'm afraid, because that java webstart is the one that need to know the correct proxy-settings, not the application.
So is there a way to change the proxy setting you can access with the java control panel by some command line argument or something like this, enabling myself to complete this "all new" script?
Greetings, ConfusedMerlin
Java control panel settings are located in %userprofile%\AppData\LocalLow\Sun\Java\Deployment\deployment.properties
to add proxy you can use something like
(
(echo(deployment.proxy.bypass.local=true)
(echo(deployment.proxy.type=1)
(echo(deployment.proxy.http.host=10.10.10.10)
(echo(deployment.proxy.http.port=10)
)>>"%userprofile%\AppData\LocalLow\Sun\Java\Deployment\deployment.properties"
though if there are already set proxy you'll need to replace the data.

Exporting data from dev_appserver

I'm testing a schema change over two versions of my app. I used version 1 to generate test data, and now I'd like to take that data into version 2 to run and test the converter. This is easy enough to do live on appengine, since the datastore stays persistent between versions, but I'm finding that local_db.bin does not survive from one version to the next (maybe this is because the version of the sdk also changes between versions).
I'd like to use appcfg.py to download_data from dev_appserver and then upload_data to the new version, but it seems to be asking me to download each kind of entity individually ("Kind stats are not available on dev_appserver.").
I can write a script that iterates through all of my kinds to use download_ and upload_data. Is there an easier way to transfer data between instances of the dev server?
One unelegant solution:
bash script to pump data out:
KINDS="Assessment AssessmentScore Course GradingPeriod GradingPolicy OverallGradeDefinition Standard StandardTag User"
for KIND in $KINDS
do
echo "ugh" | appcfg.py download_data --filename=$KIND --kind=$KIND -email=blagh --url=http://localhost:8888/remote_api --passin --application=myapp
sleep 5
done
And a corresponding script with upload_data to pump it back in. Getting pretty kludgy when you're using bash to drive python to drive http requests to your java app!

What does "rundll32 dsquery,OpenQueryWindow" return?

So I'm working on a project where I would like to be able to have the user browse the Active Directory to find a machine or workstation. I already know that you can envoke this directory search in the command prompt by using:
rundll32 dsquery,OpenQueryWindow
I'm using java for my project and I understand how to capture input from a command that I execute in the program but currently, at home, I'm not connected to a domain so I cannot test what the command returns when a user selects a computer or if it even returns anything. Could someone test this for me and tell me what it returns.
Also, if anyone has any better ideas on how to achieve this without relying on window's tools, like maybe a Java API for Active Directory Services?
Instead of calling an API function using rundll32, you should use a Java based LDAP library which will encapsulate the work in front of the Active Directory (so you won't have to parse the results by yourself).
Also, if anyone has any better ideas on how to achieve this without relying on window's tools, like maybe a Java API for Active Directory Services?
Choosing a pure Java library could help you run your application on many platforms (as opposed to using Windows' rundll32 which will limit you to Windows platform)
Check out this thread: https://stackoverflow.com/questions/389746/ldap-java-library.
currently, at home, I'm not connected to a domain so I cannot test what the command returns
There are solutions for this kind of testing problems. You should read about mocking: http://en.wikipedia.org/wiki/Mock_object
Good luck!
Tal.
Talk to the AD via the LDAP API.

Categories