JProfiler: Offline Profiling with folder instead of filename | Is there an XSD for jprofiler_config.xml? - jprofiler

I'd like to offline profile a YARN application. My application starts 10 containers. One of those starts consuming 100% CPU shortly before it crashes. I don't know which one is going to crash. And sadly, as this application starts multiple containers, they could potentially run on the same cluster hardware nodes. If I use a standard JProfiler config, I have to specify a filename for the savepoint. On my cluster, I can't use a relative path (relative to the working directory) as the folder is removed when the application crashes/finishes, so I need to specify an absolute path on the machine which then is the same for all containers overwriting their snapshots...
Is there a way to solve this issue? I'd like to offline profile all of my containers, let them write to a savepoint and pick the snapshot of the one which crashed.
Today, I found an old jprofiler-config.xml for JProfiler 7 on GitHub indicating that there are several more options available compared to the ones I see in my jprofiler-config.xml (JProfiler 11). Are you aware if there is any XSD describing the schema and what can be configured?

The "Save snapshot" action can add a number to the snapshot name to make it unique. It will check for existing files before writing the snapshot.
Since JProfiler 11, the config file only saves modified attributes and not all possible attributes. You can make changes in the GUI and observe the changes in the config file. There is no XSD for the config file format.

Related

Why did Pycharm ask me to set up a sync folder every time when I add a remote interpreter?

Every time I tried to config a remote interpreter, Pycharm asked me to set a sync folder. In my routine, I usually have the Cannot find declaration to go to error which can not be solved by invalidating caches. So I have to config the interpreter again. And these caused the redundant folders in my remote machine. And another situation is that I want to create other projects with the same interpreter. Where I have to config the folder mapping for each project to make the interpreter valid.
I do not understand this way. In my opinion, the sync folders should correspond to my local project. And the interpreter should be independent of the projects.
Every time I tried to config a remote interpreter, Pycharm asked me to set a sync folder.
To be able to execute a script on the remote machine, it is necessary to make sure it exists on it. This is by design, but if you already have a project folder deployed, you can change the suggested paths to needed ones during the interpreter configuration.
See step 7. https://www.jetbrains.com/help/pycharm/configuring-remote-interpreters-via-ssh.html#ssh
And another situation is that I want to create other projects with the same interpreter. Where I have to config the folder mapping for each project to make the interpreter valid.
Unfortunately, this setup does not work, please vote for
https://youtrack.jetbrains.com/issue/PY-40680/Allow-reusing-a-single-remote-interpreter-in-multiple-project
to increase its priority.

BlueZ: Change local storage directory

By default, BlueZ stores its persistent data in /var/lib/bluetooth. This includes controller settings and information about paired devices. However, I'm working in a system where the /var directory is unreliable, so I wonder if there is any way I can change this directory?
I have seen examples where it can be changed during installation, with the "--localstatedir" flag, but I'm looking for a solution that doesn't require reinstallation.
Without reinstalling its not possible. Path is configured at compile time so recompilation and installation is required. You can replace STORAGEDIR macro with string which is read from main.conf to different path at runtime. After modifying these changes you can restart bluetoothd every time you change path then it works.

How to synchronise jEdit settings between multiple computers

I use jEdit as a text editor, because it's cross-platform, and has all the features I need (Java regular expressions, keystroke macros, etc). However, it's a pain to set up on a new computer, and to synchronise settings (keyboard bindings, file save options, etc).
Can anyone suggest a good way of doing this? Ideally it should synchronise in the background, perhaps writing to a Dropbox folder. I've had a look in the jEdit plugins, and there doesn't appear to be anything.
Thanks!
I use the following macro to clean up and zip my jEdit settings directory to my Google Drive directory on my Mac:
void delete(String name) {
path = jEdit.getSettingsDirectory()+"/"+name;
VFS vfs = VFSManager.getVFSForPath(path);
session = vfs.createVFSSession(path,view);
vfs._delete(session, path, view);
if (session != null) vfs._endVFSSession(session,view);
}
runInSystemShell(view, "cd " + jEdit.getSettingsDirectory());
// clean up files
delete("abbrevs"); // I use SuperAbbrevs
delete("killring.xml");
delete("recent.xml");
delete("perspective.xml");
delete("activity.log");
delete("history");
delete("printspec");
delete("registers.xml");
delete("pluginMgr-Cached.xml.gz");
delete("macros" + File.separator + ".macroManagerCache"); // File.separator = System.getProperty("file.separator")
delete("server");
delete("jedit_quicknote.txt"); // or qn.txt
delete("mirrorList.xml"); // mirrorList can be updated by Options -> Plugin Manager
// clean up directories
delete("jars-cache");
delete("settings-backup");
delete("cache");
delete("DockableWindowManager");
delete("PluginManager.download");
delete("printspec");
runInSystemShell(view, "rm -f ~/Google\\ Drive/doc/jedit.zip; zip -r ~/Google\\ Drive/doc/jedit.zip * -x '*.DS_Store'");
Then I can run the following alias to unzip the settings on other machines:
alias je_sync="rm -rf ~/.jedit/*; unzip ~/Google\ Drive/doc/jedit.zip -d ~/.jedit/"
There is no built-in or plugin way I'm aware of to synchronize jEdit settings. But everything should be stored in your settings directory. ("should" because some plugins might store stuff elsewhere, especially if it uses settings together with other ways to do stuff, like git or svn that store user credentials in ~/.subversion/ and so on. Where the settings directory lives depends on the OS you are using jEdit on if you do not use the -settings switch to start jEdit).
So to synchronize the settings, just synchronize the settings directory via some means like Google Drive, Box, Dropbox or anything else. You can even make jEdit directly use those directories with the -settings switch, e. g. if you are on an OS that does not properly support symlinks like Windows.
But be aware that there can arise serious problems or unexpected behaviour. E. g. you will also sync stuff like recent files, last window and dialog positions, last opened files, ...
And more importantly, jEdit currently does not behave too well if you run two instances in the same settings directory, this for sure also would cover cases where you sync the settings folder via some means.
One scenario that will happen if you use two jEdit instances (not windows, real instances, like opened with -noserver) on the same computer on the same settings directory and will for sure also happen with such a synced directory:
instance A starts running, reads the settings files and stores their last modification date
instance A writes configuration file Z and stores its last modification date
instance B starts running, reads the settings files and stores their last modification date
instance B writes configuration file Z and stores its last modification date
instance A wants to write configuration file Z, but sees that its last modification date is newer than what it remembered. It will give a warning to the log, but nothing more and will not save file Z anymore until restarted.
So if Z e. g. is the properties file, any settings changes done after this in instance A will just be lost and not saved. And this happens on a per-file basis, depending on which instance first writes a certain file after both instances were started, so some files may be locked by instance A, some by instance B which could further increase confusion.
So, if you are ok with syncing stuff like recent files, last open files, and other stuff with paths in it and so on and so on and you make sure that you will not use two jEdit instances on the same settings directory at the same time, it could be ok to just use something like Google Drive or alike.

IntelliJ-IDEA: Where are settings files saved for v11.x on Windows 7?

When I load/save settings on my PC for IntelliJ-IDEA v11+ Ultimate on Windows 7, it is super slow (seconds). I think the settings are being saved on a network drive (corporate setup), but I want to confirm.
What is the default location on Windows 7 for IntelliJ-IDEA settings files?
How can I change the location of settings files?
UPDATE
I checked my idea.properties file here: C:\Program Files (x86)\JetBrains\IntelliJ IDEA 11.1.5\bin\idea.properties. I see this entry (commented-out):
# idea.config.path=${user.home}/.IntelliJIdea/config
My insane corporate setup has Java's user.home mapped to \\UBSPROD.MSAD.UBS.NET\UserData\arpeke\RF. There, I found the folder named .IntelliJIdea with my settings.
IntelliJ saves its config and indexes, which can amount to several gigs worth of data, to your home directory. It's been that way for approximately "a long time". In my experience, if you have default network mounts, your home dir will be set to one of those, so that's very likely your problem. Edit <idea dir>/bin/idea.properties to change the location where it saves stuff. There will be a handful of properties to change because it calls things out individually rather than having one, overall directory.
Props to Ryan for the hint I needed. Posting a detailed answer here, because I could not find the answer anywhere else on the Net.
Discover your Java's user.home System property settings.
See this Q&A: On Windows 7, how does Java JVM set "user.home" System property?
Or, try in an Java IDE: System.out.println(System.getProperty("user.home"));
You may surprised by its value!
Let us suppose it is C:\Users\user123
There, you will find a folder named .IntelliJIdea, and sub-folder within named config.
If the .IntelliJIdea folder is stored on a network drive, you may find IntelliJ performance less than ideal.
Modify your idea.properties file. Possible full path: C:\Program Files (x86)\JetBrains\IntelliJ IDEA 11.1.5\bin\idea.properties
Modify options for config, system, plugins, and logs. Example: idea.config.path=${user.home}/.IntelliJIdea/config => idea.config.path=c:/local/path/.IntelliJIdea/config
Update
Official Knowledge Base article from JetBrains: http://intellij-support.jetbrains.com/entries/23348963

CF - Config file on device gets read-only attribute

I have added a config file (myapp.exe.config) that is deployed to the device after installation. But the problem is that this file gets read-only attribute. I have tried adding some stuff in the setup project in "codeINSTALL_EXIT" function. On emulator it works ... it removes the read only attribute, while when installing on the phone the attribute stays.
SetFileAttributes(szPathConfig, FILE_ATTRIBUTE_NORMAL)
Any ideas?
It's not completely clear from your question how the file is getting deployed (though I think from a CAb only). Things to check/know:
If you install via CAB, but then deploy from Studio (i.e. Debug) the file will get overwritten and the file studio pushes may well be read-only, especially if your SCC mechanism locks local files that aren't checked out (like VSS does).
When you build a CAB file, the file attributes get inherited from the source, meaning that if the file is read-only on the PC when you create the CAB, it will be read-only coming out of the CAB. One woudl think that the EXIT of the installer would be late enough to alter the attributes, but I've never tested it. Following your current path, you might check that the attributes before setting and also check to see if the Set call is actually succeeding. Personally I'd just make sure all files were read/write enabled before building the CAB to avoid the whole problem in the first place.