How to open eclipse memory anaylzer index files in eclipse - heap-dump

I've heap dump file testdump.hprof. I parsed this file using below command.
./ParseHeapDump.sh /home/rajkumar/Documents/heap-dump-ads03/testdump.hprof
The above command generated the below files.
testdump.threads
testdump.idx.index
testdump.o2c.index
testdump.a2s.index
testdump.inbound.index
testdump.outbound.index
testdump.o2hprof.index
testdump.index
testdump.domIn.index
testdump.o2ret.index
testdump.domOut.index
I've installed eclipse memory analyzer plugin im my eclipse IDE. I don't know how to open the index files in IDE for analyzing. I opened the index file directly but it shows some binary string.
Any idea how can I open the index files in the eclipse?

Once you have installed MAT into Eclipse, open the Memory Analysis perspective and then do File > Open Heap Dump > "/home/rajkumar/Documents/heap-dump-ads03/testdump.hprof" and that will open the heap dump using the existing index files (so no reparsing is needed).
Then go to the toolbar 'Run Expert System Test' > 'Leak Suspects' to run the leak suspects report.
As suv3ndu said, you can also run the report from the command line. You can also open an existing report zip from the GUI using 'Run Expert System Test' > 'Open Report'.

Related

Console command for opening files inside already opened project in PhpStorm

I've faced the problem. I use PhpStorm to edit files from FTP server using WinSCP client. In WinSCP client I've set command for using external editor. So, when I try to open php-file from remote FTP server WinSCP downloads this file in temporary file and open it using command provided by me - "C:\Program Files\JetBrains\PhpStorm 2020.1.1\bin\phpstorm64.exe" "!.!"
Earlier, when I used PhpStorm 2019 or 2018, it opened file in already opened window/project. But when I've upgraded to PhpStorm 2020, it started to open file from FTP in separate windows. It's so annoying and some functionality doesn't work in such case (auto suggestions and others).
I know that I can use built-in remote files browser within PhpStorm to view and edit remote files, but I accustomed to use separate FTP client for such purposes.
Does somebody know how to fix this problem? What console command should I use so as to open separate file in already opened window/project?
It's a LightEdit mode: https://blog.jetbrains.com/idea/2020/04/lightedit-mode/
Since 2020.2 you can use the -p (--project) option instead to force opening files in already opened project windows. For example idea -p myfile.txt. IDEA-237118
You can also permanently disable that mode by following these steps:
Invoke Help | Find Action... (or via Search Anywhere: use Double Shift and switch to Actions tab)
Search for Registry... action and select it
Once in the Registry dialog locate light.edit.file.open.enabled entry (just start typing, speed search will narrow it down) and set it to false (uncheck the box).
Not sure if IDE restart is needed (probably not).

How to create a transaction log on WinSCP on SSIS package

I have SSIS package, which uses winscp to execute some commands in a text file to upload files to a FTP site. I use DTExec.exe to execute this SSIS package. Right now, I need to show winscp FTP log including display file name uploaded on FTP site. Does someone know how to capture the log? I use '>' and it does not work.
WinSCP can generate its own log using /log command-line switch (or /xmllog):
winscp.com /script=script.txt /log=winscp.log
If you want to just capture WinSCP console output:
Make sure you are using winscp.com, not winscp.exe.
Run winscp.com via cmd.exe, as that is what understands the >.
cmd.exe /C winscp.com /script=script.txt > winscp.log
In both cases, you will typically need to use full paths to all files (winscp.com, script.txt, winscp.log).

SSIS file path changing to C:\windows\system32 depending on how I open the project file

I've been working with SSIS reading different files - from CSVs to XLSXs - with no problems. My paths are relative, so SSIS searches for the files from the project's folder.
Well, today my colleague tried to run a package and he got a curious error message saying that the file could not be found under the "C:\windows\system32" folder. There's no configuration that would point SSIS to that folder and with me and a third colleague it's working well.
After some investigation we discovered that the problem has nothing to do with the user itself, but with how the user opens the project. Since the beginning I've been opening the project by double clicking the ".dtproj" file. My colleague first opens the SSIS development interface then opens the project file from the menu.
Has anyone noticed that behavior? What could be the cause for that?
error message print
Microsoft Visual Studio 2008
Version 9.0.30729.4462 QFE
Microsoft .NET Framework
Version 3.5 SP1
Installed Edition: IDE Standard
This happens because the different ways of launching the IDE end up with different current directories for the IDE process. You can test this by creating a package with only a Script Task, with the one line:
MessageBox.Show(Environment.CurrentDirectory);
And then running this project after launching it both ways.
Double-clicking the project or solution file sets the folder containing that file as the current directory. (I assume this is standard Windows process launching behaviour when starting a process based on the file extension association.) SSIS packages then look in the current directory when the path to the configuration file is relative.
We use relative paths to configuration files all the time to simplify deployment, and have to always remember to open the solutions by double-clicking the SLN file.

Lost Database in Microsoft Access 2010

While "finishing off" my database, I chose options from the file menu.
File Menu -> options -> Current database -> Application Options -> Display Form: field.
Upon hitting OK, Access immediately shut down and now just gives me the "Access has stopped working" message when trying to open the database.
Can I get my database back? How?
A good place to start would be, as Gord Thompson has suggested, try and hold the SHIFT key to bypass the startup form.
However this scenario suggests that the code might be corrupted. Sometimes, when you copy a file to a new location, the content of the file is disabled. So this could make the file in an openable state, where you would be able to Compact and Repair.
If this did not work (copying the file to a new location), then the other option is to Decompile your file. So in the file location of copy you just made; create a shortcut. With the following as the Location of the item
"C:\Program Files (x86)\Microsoft Office\Office14\MSACCESS.EXE" "C:\PathToYourFile\YourFileName.accdb" /decompile
'Make sure the first path is the path where MSACCESS is installed.
'I have it in Program Files (x86).......
Then double click the Shortcut, you should (hopefully) have your file back up and running.

Jenkins won't execute correctly a command from a .bat

I have set up Jenkins so that it builds my project, runs some tests and then creates an HTML page containing a report.
I made a .bat file to open the html report in my browser. There is just one line in that .bat file :
"E:\user\Visual Studio 2010\JenkinsWorkspace\JobTest\index.html"
When I run that .bat in a prompt myself, the page index.html is open (so it works).
But the problem is that when I set up a Jenkins' job to run that .bat, nothing happens.
The job gets stuck after calling the .bat and never finishes.
Any idea why?
Note: I have other .bat (that do not open html pages) that are successfully executed by Jenkins.
EDIT: here is the errors I get in the prompt log from Jenkins's menu :
C:\Program Files\Jenkins\jobs\JobTest2_enUnSeulScript\workspace>echo "
Opening html page" " >> Opening html page"
C:\Program
Files\Jenkins\jobs\JobTest2_enUnSeulScript\workspace>"C:\Program
Files\Google\Chrome\Application\chrome.exe" "E:\user\Visual
Studio 2010\JenkinsWorkspace\JobTest\testResults.14h05m15s65ms.11.04.2013.trx.htm"
[688:3900:0411/140520:ERROR:gpu_info_collector_win.cc(96)] Can't
retrieve a valid WinSAT assessment.
[688:3900:0411/140520:ERROR:process_singleton_win.cc(540)] Lock file
can not be created! Error code: 32
[688:3900:0411/140520:ERROR:chrome_browser_main.cc(1157)] Failed to
create a ProcessSingleton for your profile directory. This means that
running multiple instances would start multiple browser processes
rather than opening a new window in the existing process. Aborting now
to avoid profile corruption.
Build step 'Exécuter une ligne de commande batch Windows' marked build as failure [htmlpublisher]
Archiving HTML reports... [htmlpublisher] Archiving at PROJECT level
E:\user\Visual Studio 2010\JenkinsWorkspace\JobTest to C:\Program
Files\Jenkins\jobs\JobTest2_enUnSeulScript\htmlreports\HTML_Tests_Report
Finished: FAILURE
If you are running Jenkins as a Window's service, you will probably need to enable the service to interact with the desktop. Do the following:
Open the Services module
Right-click on Jenkins and select "Properties"
On the "Log On" tab, run as "Local System account" and select the "Allow service to interact with desktop" checkbox
-- OR --
You can run Jenkins via the command-line. Ie: "java -jar jenkins.war".
I am guessing that your Jenkins install is running as a Windows Service. When Jenkins is run as a service on a Windows machine it runs under the System account, not a user account. The System account usually does not have the same settings as a user account.
You might want to try starting a CMD shell as the System Account. (The answers to this question should help you with that: How Do You Run CMD under System Account.) From there, try running the batch file and see what happens. You may find that you need to setup somethings like the PATH before it works.
I know this is late, but I just answered another question on how to open an .exe (or .bat) from Jenkins's service on Windows
Open Excel on Jenkins CI
The issue is that while your command actually works, it does that in Session 0 (which is the session of Local System user that launched your Jenkins service), which you cannot see while being logged in through your own user account, most likely in Session 1.
Hope this helps