how to generate websphere thread dump without wsadmin on windows server - windows

I have websphere application server v 7 over windows server and I want to generate thread dumps because i have thread hungs, but when I try to get the java cores with wsadmin appears an error, so I want to generate java core files like linux using kill -3 .
Is there something like this in Windows server ?.

Like ObiWanKenobi mentioned, your best bet would probably be through the deployment manager administrative console. From IBM's support site:
Set the com.ibm.websphere.threadmonitor.dump.java property to true:
Application Servers:
From the administrative console, click Servers > Application Servers > server_name.
Under Server Infrastructure, click Administration > Custom Properties.
Click New and add the following property:
Name: com.ibm.websphere.threadmonitor.dump.java
Value: true
Click Apply.
Click OK and save the configuration changes.
Restart the Application Server for the changes to take effect.
Node Agent:
From the administrative console, click System Administration > Node Agents > nodeagent.
Under Additional Properties, click Administration Services
Under Additional Properties, click Custom Properties
Click New and add the following property:
Name: com.ibm.websphere.threadmonitor.dump.java
Value: true
Click Apply.
Click OK and save the configuration changes.
Restart the Node Agent for the changes to take effect.

In short, there is no good answer.
The closest would be to use something like SendSignal. See the Can I send a ctrl-C (SIGINT) to an application on Windows? question for more information. Unfortunately, SendSignal doesn't work reliably on all versions of Windows (see my Send ctrl-break to java process on 64-bit Windows ala sendsignal on 32-bit question).
If you're willing to write some custom code, you could write a Java program that uses the attach API to load a Java agent that calls the Dump API. (I suspect that IBM Support Assistant has this capability built-in, but it's been too long since I tried to be authoritative on this point.)

You can make the JVM to do a thread dump when there are 'hung' threads messages in the SystemOut.log:
Add com.ibm.websphere.threadmonitor.dump.java=true under JVM's Administration > Custom Properties.

Related

Error in monitoring WebSphere portal threadpool using check_was Nagios plugin

I have installed WebSphere Portal 8.5 version on CentOS 7 . I am trying to monitor various portal parameters like heap memory , live sessions , threadpools etc . For monitoring , I am using Nagios .For this , I have installed latest version of 'check_was' nagios plugin . I am able to monitor heap memory and live sessions but I am not able to monitor thread pools . Whenever , I am firing the reqd command to check 'threadpool' , I am getting the following error ----
/usr/local/nagios/libexec/check_was-0.4/check_was -s threadpool -w 80 -c 90 -p WebSphere_Portal
ERROR - Failed to get stats object on WebSphere:cell=Cell85,mbeanIdentifier=null,name=server.startup,node=Node85,platform=dynamicproxy,process=WebSphere_Portal,spec=1.0,type=ThreadPool,version=8.5.5.2.
Can anybody help me in this ?
Probably you are missing to enable PMI. Take a look on bellow link:
https://www.ibm.com/support/knowledgecenter/en/SSAW57_9.0.0/com.ibm.websphere.nd.multiplatform.doc/ae/tprf_prfstartadmin.html
How to enable PMI:
Procedure
Open the administrative console.
Click Servers > Server Types > WebSphere application servers > server_name.
Click the Configuration tab.
Click Performance Monitoring Infrastructure (PMI) under Performance.
Select the Enable Performance Monitoring Infrastructure (PMI) check box.
Optionally, select the check box Use sequential counter updates to enable precise statistic update.
Optionally, choose a statistic set that needs to be monitored under Currently Monitored Statistic Set.
Optionally, click on Custom to selectively enable or disable statistics. Choose a component from the tree and enable or disable statistics on the opposite table. Go back to the main PMI configuration page by clicking the Performance Monitoring Infrastructure link.
Click Apply or OK.
Click Save.
Restart the application server. The changes you make will not take effect until you restart the application server.
Note: When Intelligent Management is enabled, the application server does not let you disable PMI counters that the Intelligent Management requires. For information about the list of PMI counters that cannot be disabled when Intelligent Management is enabled, see Enabling PMI data collection.
Regards!

Start Websphere Application Server but not loading any application

Is there any way that we can start Websphere Application Server but not loading any applications installed on it?
Environment: websphere 7.0
I didn't find a command line tool method for doing this, but you can edit the deployment.xml files underneath each WAR/EAR file that you want to stop from auto-starting when Websphere starts up.
These deployment.xml files are located typically here:
/opt/IBM/WebSphere/AppServer/profiles/<my profile>/config/cells/<my cell>/applications/<my .ear>/deployments/<my app>/deployment.xml
Within this file is this XML snippet:
<targetMappings xmi:id="DeploymentTargetMapping_1499739616851" enable="true" target="ServerTarget_1499739616851"/>
Change the enable=true to enable=false for every EAR/WAR that you don't want to auto-start. Once done start WAS as you'd normally do so.
References
http://www-01.ibm.com/support/docview.wss?uid=swg21265381
If you mean not starting installed applications, this is controlled through Administrative Console in Enterprise Applications > your_app > Target specific application status. There you can enable or disable auto start.
Target specific application status

How do i take Logs for windows application?

I am working on an application in Windows 7 environment and the application is not stable yet I wanted to see the crash logs , Please help me to get log files.
Reporting Services writes event messages to the Windows application
log. You can use the message information written to the application
log to find out about events that are generated by the report server
applications running on the local system.
Reporting Services provides three event sources:
Report Server (Report Server Windows service)
Report Manager
Scheduling and Delivery Processor
Source
You can use Log4Net to log errors or alternatively just write your errors to a text file.
Here is a link on how to use log4net Link

How to debug a lotus script agent inside a lotus script agent

I am debugging a lotus script agent using debug a lotus script. Agent is debugging fine but I have another lotus script agent inside that and my debugger is not going to that code line by line.Please help me how to do this.
Thanks in advance.
An agent, that is called in script from another agent runs in the background. These agents can not be debugged easily. If the called agent runs on the server, you can use the remote debugger, to debug that agent: you have to enable it in the server document, start the remote debug task, and enable remote debugging in the properties of the called agent. Then you have to be fast. You define a delay that each agent waits for the debugger to attach, before it really starts with its code. During this time, you have to start the remote debugger, open the database and select the agent to debug... Quite painful. And the normal Debugger has to be off and the agent you startet has to run in client background mode, otherwise you will not be able to switch to remote debugger...
If both agents are LotusScript and it is not needed, that they:
Run with different rights or
Run on different servers,
then there normally is no need for an agent calling another agent.
Use script- libraries and subs / functions instead, then you do not need two agents...
I recommend to you use a simple log in the second agent. You can use NotesLog (look at Domino Developer's Help), or you can write your own class as you need it.
In my apps, I use a LotusScript framework, written by me. In that framework, I have a CS_Log class, who connects to a LogAgents.nsf database and writes all in simple documents. Also, I have a CS_Document class, with a Dump method, who writes the full content of a document, for example.
The most times, debugging it's the best option. But in cases like this, I prefer to write all in a log.

WAS7 System Properties in RAD 7.5.1

I have an old project in WSAD 5.1.2 with a WAS4 server configuration that's in a .wsi-file. If I double click it I get the server configuration editor and on the environment tab there is a System Properties section with some name-value pairs.
Now I have opened the same project in RAD 7.5.1. Where can i input the same name-value pairs for a server in RAD 7.5.1? There's no "environment-tab" if I double-click my server, just an "Overview" tab.
I finally found the proper way of doing it in the admin web interface...
Application servers > myServer > Process definition > Java Virtual Machine > Custom properties
In RAD 7.5.4 JVM name value pair is stored in Servers --> Application Servers --> java and process Management --> process definition --> java virtual machine --> custom properties
here you can create a new name value pair which can be used by Java code using System get properties function.
Apparently IBM started to ship a real application server starting with RAD/RSA6 instead of the test server that comes with WSAD. So to configure the appserver it's just to use the web admin interface as usual.
Thanks to Jeanne Boyarsky for the answer in the forums over at The Java Ranch.
The old app I'm porting needs some properties in the system properties of the JVM set so that they can be retrieved with System.getProperty(...) and I found a dirty way of making it work. So, until I find out how to do it the proper way, if there is a proper way, I came up with this hack:
After doing some "find" and "grep" in the profile directory of the appserver i found a file called:
runtimes\base_v7\profiles\<profilename>\config\cells\<cellname>\nodes\<nodename>\servers\<servername>\server.xml
At the bottom of server.xml there is a <jvmEntries xmi:id="JavaVirtualMachine_.... tag.
Inside it you can add system properties tags on the format:
<systemProperties xmi:id="someId" name="name of your property" value="the value" required="false"/>
Anyone who knows how to to this the proper way and has read all the way down here must be crying by now... :)
But, it seams to work...

Resources