[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2011-02-18
1
Medium Priority
?
2,323 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 1000 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

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…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

649 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