Solved

how to use wlst to check runtime thread value and then send an email

Posted on 2011-02-18
1
2,277 Views
Last Modified: 2012-06-21
Hi Folks,

I am trying to use wlst to send an email whenever the runtime thread value exceeds some certain value let say 35.
I have found some links for that and unable to get it working.
http://wlstbyexamples.blogspot.com/2009/06/self-tuned-thread-pool-count.html
http://weblogic-wonders.com/weblogic/2010/11/13/sending-e-mail-alert-on-weblogic-server-shutdown/

So, now iam trying to redirect the o/p of wlst to a text file and then grep on that file and use if else statement.
The problem is redirect command is able to write to the mentioned file but its not writing the runtime value.

Below is interactive command with wlst:
wls:/testdom/serverConfig> redirect('/tmp/test.test')  ---- (redirecting to /tmp)
wls:/testdom/serverConfig> serverRuntime()
Location changed to serverRuntime tree. This is a read-only tree with ServerRuntimeMBean as the root.
For more help, use help(serverRuntime)

wls:/testdom/serverRuntime> cd('serverRuntime:/ThreadPoolRuntime/ThreadPoolRuntime/')
wls:/testdom/serverRuntime/ThreadPoolRuntime/ThreadPoolRuntime> cmo.getHoggingThreadCount()
0
wls:/testdom/serverRuntime/ThreadPoolRuntime/ThreadPoolRuntime> cmo.getExecuteThreadTotalCount()
8
wls:/testdom/serverRuntime/ThreadPoolRuntime/ThreadPoolRuntime> cmo.getExecuteThreadIdleCount()
0
wls:/testdom/serverRuntime/ThreadPoolRuntime/ThreadPoolRuntime> cmo.getPendingUserRequestCount()
0
wls:/testdom/serverRuntime/ThreadPoolRuntime/ThreadPoolRuntime> cmo.getQueueLength()
0
wls:/testdom/serverRuntime/ThreadPoolRuntime/ThreadPoolRuntime> cmo.getThroughput()
0.4975124378109453
wls:/testdom/serverRuntime/ThreadPoolRuntime/ThreadPoolRuntime> disconnect()
Disconnected from weblogic server: testdom_a1
wls:/offline> stopRedirect()
WLST output will no longer be redirected to /tmp/test.test.
wls:/offline> exit()

----
But when i check my /tmp/test.test file i dont see the runtime value.

bash-3.00$ more test.test
Location changed to serverRuntime tree. This is a read-only tree with ServerRuntimeMBean as the root.
For more help, use help(serverRuntime)

Disconnected from weblogic server: cmsintprd_a1
WLST output will no longer be redirected to /tmp/test.test.
bash-3.00$


Is there any way get the values written to a file and then use a shell script to send email?

Thank you,
Joe






0
Comment
Question by:jayatallen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
saranyannarayanan earned 250 total points
ID: 35023863
do the wls:/testdom/serverConfig> redirect('/tmp/test.test')  ---- (redirecting to /tmp)
after wls:/testdom/serverConfig> serverRuntime()
or other commands and check if it works for you
0

Featured Post

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Convert websphere application server default chained Certificates from 1024 to 2048 keysize or higher size and also you can change signatureAlgorithm . Please make sure Websphere Application Server fixpack 7.0.0.23 or Above. The following steps a…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question