Modifying Jython/JACL script to pull out stats from websphere

By mistake I closed following thread
http://www.experts-exchange.com/Software/Server_Software/Application_Servers/Java/IBM_Websphere/Q_26328297.html

I could get details of heapsize but other stats on threadpool, connectionpool are returning errors as below.

was61/was_scripts/check-was.py -i heapsize -s server_member1 -n Server1_Node01
WASX7209I: Connected to process "dmgr" on node Server1_Manager using SOAP connector;  The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[-i, heapsize, -s, server_member1, -n, Server1_Node01]"
heapsize: node=Server1_Node01  server=server_member1  used=1024.0 MB (85.34%)  free=176.0 MB

[was61@Server1 was_scripts]$ /opt/IBM/WebSphere/AppServer/profiles/Profile01/dmgr/bin/wsadmin.sh -f /home/was61/was_scripts/check-was.py -i threadpool -s server_member1 -n Server1_Node01
WASX7209I: Connected to process "dmgr" on node Server1_Manager using SOAP connector;  The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[-i, threadpool, -s, server_member1, -n, Server1_Node01]"
Not yet implemented: "threadpool"

[was61@Server1 was_scripts]$ /opt/IBM/WebSphere/AppServer/profiles/Profile01/dmgr/bin/wsadmin.sh -f /home/was61/was_scripts/check-was.py -i connectionpool -s server_member1 -n Server1_Node01
WASX7209I: Connected to process "dmgr" on node Server1_Manager using SOAP connector;  The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[-i, connectionpool, -s, server_member1, -n, Server1_Node01]"
Not yet implemented: "connectionpool"

[was61@Server1 was_scripts]$ /opt/IBM/WebSphere/AppServer/profiles/Profile01/dmgr/bin/wsadmin.sh -f /home/was61/was_scripts/check-was.py -i sessions -s server_member1 -n Server1_Node01
WASX7209I: Connected to process "dmgr" on node Server1_Manager using SOAP connector;  The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[-i, sessions, -s, server_member1, -n, Server1_Node01]"
Not yet implemented: "sessions"
crazywolf2010Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

HonorGodSoftware EngineerCommented:
I've re-read the original question:

and am currently looking at the ThreadPools portion.  However, I still have some questions.

- Given a server and node name, I can get the config ID for the specified server, e.g.,
   serverId = AdminConfig.getid( '/Node:%s/Server:%s/' % ( nodeName, serverName ) )

- Given a server config ID, I can list the ThreadPool configuration IDs using:
   print AdminConfig.list( 'ThreadPool', serverId );

Did you want the "statistics" computed for each of the Thread Pools configured for the specified server?

For example, on ne of my servers, I see the following result:
Default(cells/.../nodes/.../servers/server1|server.xml#ThreadPool_1183122130085)
HAManagerService.Pool(cells/.../nodes/.../servers/server1|hamanagerservice.xml#ThreadPool_1080665401693)
Message.Listener.Pool(cells/.../nodes/.../servers/server1|server.xml#ThreadPool_1183122130086)
ORB.thread.pool(cells/.../nodes/.../servers/server1|server.xml#ThreadPool_1183122130078)
ORB.thread.pool(cells/.../nodes/.../servers/server1|server.xml#ThreadPool_1183122130083)
SIBFAPInboundThreadPool(cells/.../nodes/.../servers/server1|server.xml#ThreadPool_1183122130081)
SIBFAPThreadPool(cells/.../nodes/.../servers/server1|server.xml#ThreadPool_1183122130082)
SIBJMSRAThreadPool(cells/.../nodes/.../servers/server1|server.xml#ThreadPool_1257990718617)
TCPChannel.DCS(cells/.../nodes/.../servers/server1|server.xml#ThreadPool_1183122130080)
WMQCommonServices(cells/.../nodes/.../servers/server1|server.xml#ThreadPool_1257990718804)
WMQJCAResourceAdapter(cells/.../nodes/.../servers/server1|server.xml#ThreadPool_1257990718817)
WebContainer(cells/.../nodes/.../servers/server1|server.xml#ThreadPool_1183122130079)
server.startup(cells/.../nodes/.../servers/server1|server.xml#ThreadPool_1183122130084)

Open in new window

0
crazywolf2010Author Commented:
Yes Please. That is what I wish to see.
Under nagios plugin for websphere I receive these details :

MonitorThreadPools :
Thread pool usage can be monitored for the entire server (all thread pools) or with a named thread pool. It is measured as: percent used/maximum configured

To monitor :
was61@Server1 check_was-0.3]$ ./check_was -s threadpool -w 80 -c 90 -p server_member1
CRITICAL – thread pool size: WebContainer 4/100 (4.0%), SoapConnectorThreadPool 3/5 (60.0%), SIBFAPInboundThreadPool 0/50 (0.0%), HAManager.thread.pool 2/2 (100.0%), MessageListenerThreadPool 0/50 (0.0%), ORB.thread.pool 0/50 (0.0%), SIBFAPThreadPool 2/50 (4.0%), ProcessDiscovery 1/2 (50.0%), TCPChannel.DCS 3/20 (15.0%)|webcontainer=4.0%;80;90; soapconnectorthreadpool=60.0%;80;90; sibfapinboundthreadpool=0.0%;80;90; hamanager_thread_pool=100.0%;80;90; messagelistenerthreadpool=0.0%;80;90; orb_thread_pool=0.0%;80;90; sibfapthreadpool=4.0%;80;90; processdiscovery=50.0%;80;90; tcpchannel_dcs=15.0%;80;90;
0
crazywolf2010Author Commented:
Hi HonorGod,
I am sure you are busy else by this time you do respond . Sorry for a reminder.

thanks
0
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

HonorGodSoftware EngineerCommented:
Not at all.

> I am sure you are busy ..

Very true!  ;-)  But, it is better to be busy then board.  However, I don't remember when I last had time to get board.  ;-)

I hope to get to this this afternoon.  I'm very sorry for the delay.
0
HonorGodSoftware EngineerCommented:
Do you want anything in particular displayed for inactive ThreadPool entries?
0
HonorGodSoftware EngineerCommented:
next Q

Given the ThreadPool attribute values shown below:

Which values should be used to compute the ratio to be displayed?

current / upperBound ?
current / highWaterMark ?
wsadmin>print AdminControl.getAttributes( mb )
[[name MessageListenerThreadPool] [maximumSize 50] [minimumSize 10] [inactivityTimeout 3500] [growable false] [stats [
Stats name=MessageListenerThreadPool, type=threadPoolModule
{
name=PoolSize, ID=4, description=The average number of threads in a pool., unit=N/A, type=BoundedRangeStatistic, lowWaterMark=10, highWaterMark=10, current=0, integral=0.0, lowerBound=10, upperBound=50
}]] ]

Open in new window

0
crazywolf2010Author Commented:
Hi Mate,
Not sure what these values signify but I need to have current values with max allowed.
I guess is they should be compared with current & upperBound  than highWaterMark.

Thanks
0
crazywolf2010Author Commented:
Do you want anything in particular displayed for inactive ThreadPool entries?
-- More is merrier so please list any details which you see are relevant. The most imp issue is formatting the output generated by Jython. Is there easy way to create tabular html report? I guess NOT. But I thought I will ask.

Regards
0
HonorGodSoftware EngineerCommented:
> Is there easy way to create tabular html report?
   Sure.  Let me take a look, and see what I can do.
0
crazywolf2010Author Commented:
You are a star, thanks a lot.
0
crazywolf2010Author Commented:
Hi,
Not sure if you already have something in your tookkit.

I am looking for a script to locate configration parameters
http://www.experts-exchange.com/Software/Server_Software/Application_Servers/Java/IBM_Websphere/Q_26415272.html
0
HonorGodSoftware EngineerCommented:
How does this look for active ThreadPool information?
|           lo  hi  lo  hi
                   Name | integral  WM  WM Bnd Bnd cur ratio
------------------------+-----------------------------------
  Message.Listener.Pool |      0.0  10  10  10  50   0 0.00%
        ORB.thread.pool |      0.0  10  10  10  50   0 0.00%
SIBFAPInboundThreadPool |      0.0   4   4   4  50   0 0.00%
       SIBFAPThreadPool |      0.0   4   4   4  50   0 0.00%
         TCPChannel.DCS | 228581.0   1   5   5  20   4 0.80%
  WMQJCAResourceAdapter |      0.0   5   5   5  25   0 0.00%
           WebContainer |      0.0  50  50  50  50   0 0.00%

Open in new window

0
HonorGodSoftware EngineerCommented:
Sorry, the indentation of the 1st line isn't right.
The '|' aligns up with that just after "Name" on the 2nd line.
0
HonorGodSoftware EngineerCommented:
The output of this looks pretty decent to me for this command prompt, please let me know what you think.
check-was.py.txt
0
HonorGodSoftware EngineerCommented:
Sorry, it did an auto-post/submit on me...

./wsadmin.sh -f check_was.py -i threadpool -s server1

output:
|           lo  hi  lo  hi
                   Name | integral  WM  WM Bnd Bnd cur ratio
------------------------+-----------------------------------
  Message.Listener.Pool |      0.0  10  10  10  50   0 0.00%
        ORB.thread.pool |      0.0  10  10  10  50   0 0.00%
SIBFAPInboundThreadPool |      0.0   4   4   4  50   0 0.00%
       SIBFAPThreadPool |      0.0   4   4   4  50   0 0.00%
         TCPChannel.DCS | 228581.0   1   5   5  20   4 0.80%
  WMQJCAResourceAdapter |      0.0   5   5   5  25   0 0.00%
           WebContainer |      0.0  50  50  50  50   0 0.00%

Open in new window

0
crazywolf2010Author Commented:
Hi,
Thanks for your response.
I just tried new script and have following exception. The script is working fine for heapsize.

[was61@was_scripts]$ /opt/IBM/WebSphere/AppServer/profiles/Profile01/dmgr/bin/wsadmin.sh -f /home/was61/was_scripts/check_was.py -i threadpool -s server_member1
WASX7209I: Connected to process "dmgr" on node eugbbopg10lt_Manager using SOAP connector;  The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[-i, threadpool, -s, server_member1]"
Exception  type: exceptions.ImportError
Exception value: no module named Help
WASX7017E: Exception received while running file "/home/was61/was_scripts/check_was.py"; exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
  File "<string>", line 483, in ?
  File "<string>", line 266, in main
  File "<string>", line 425, in threadpool
KeyError: stats
0
HonorGodSoftware EngineerCommented:
huh?

On what version of WebSphere did you run the script.

I added some code to check for this error, and dump out some details.

Thanks for your assistance.
check-was.py.txt
0
crazywolf2010Author Commented:
Hi,
I am using WAS ND 6.1 under RHEL. Same error returned, file attached.


check-was-threadpool-error.txt
0
HonorGodSoftware EngineerCommented:
Please forgive me.

I made a stupid error.

I had:

AdminConfig.getAttributes( mb )

instead of

AdminControl.getAttributes( mb )
check-was.py.txt
0
crazywolf2010Author Commented:
Hi,
I still have some errors returned as listed below.

[was61@Server1 was_scripts]$ /opt/IBM/WebSphere/AppServer/profiles/Profile01/dmgr/bin/wsadmin.sh -f /home/was61/was_scripts/check_was.py -i threadpool -s jsit_server_member2
WASX7209I: Connected to process "dmgr" on node Server1_Manager using SOAP connector;  The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[-i, threadpool, -s, jsit_server_member2]"
Exception  type: exceptions.ImportError
Exception value: no module named Help
Exception: <class exceptions.KeyError at 266866664>
    value: <exceptions.KeyError instance at 1666999132>
Processing:
[ [growable false] [maximumSize 50] [name MessageListenerThreadPool] [stats
Stats name=MessageListenerThreadPool, type=threadPoolModule
{
name=PoolSize, ID=4, description=The average number of threads in a pool., unit=N/A, type=BoundedRangeStatistic, lowWaterMark=10, highWaterMark=10, current=0, integral=0.0, lowerBound=10, upperBound=50
}] [inactivityTimeout 3500] [minimumSize 10] ]
0
crazywolf2010Author Commented:
Hi HonorGod,
Hope you will have some spare time to shade some light on this error.

Kind Regards
0
HonorGodSoftware EngineerCommented:
Oops, I missed the earlier update.

Let me track down a version 6.1 AppServer, and see what is going on.

I'm sorry about the delay, and the error.
0
crazywolf2010Author Commented:
Ok, I will wait here. Many thanks for picking it up.
0
HonorGodSoftware EngineerCommented:
ok, I'm seriously confused.

I did find/fix a typographical error in the usage (help) text, but when I try to execute it on my federated 6.1 environment, like this:

./wsadmin.sh -f ~bob/check_was.py -i threadpool -s server1

I see this output:
|           lo  hi  lo  hi
                   Name | integral  WM  WM Bnd Bnd cur ratio
------------------------+-----------------------------------
  Message.Listener.Pool |      0.0  10  10  10  50   0 0.00%
        ORB.thread.pool |      0.0  10  10  10  50   0 0.00%
         TCPChannel.DCS |  70079.0   1   5   5  20   4 0.80%
           WebContainer |      0.0  10  10  10  50   0 0.00%

Open in new window

check-was.py.txt
0
crazywolf2010Author Commented:
Hi HonorGod,
No luck. Not sure what is wrong here mate. Any clues?


0
HonorGodSoftware EngineerCommented:
Do me a favor and:

- open a command prompt
- "cd" to the AppServer bin directory
   Windows something like:
   > cd /d D:\IBM\WebSphere\AppServer\bin
   *ix something like:
   # cd /opt/IBM/WebSphere/AppServer/bin
- Execute the versionInfo command script
   Windows something like:
   > versionInfo
   *ix something like:
   # ./versionInfo.sh
- Look for the "Installed Product" section
- Verify which check_was.py you are using,
   where is it?
   What does the prologue (comment section at the beginning of the file) look like?
- Execute the wsadmin command script, and specify the input file
- Do a screen capture
- Append the information here.

Thanks!
0
crazywolf2010Author Commented:
1 Execute the wsadmin command script, and specify the input file
- Do a screen capture
- Append the information here.

[was61@eugbbopg11lt ~]$ /opt/IBM/WebSphere/AppServer/bin/wsadmin.sh -f check-was.py -i threadpool -s juat_server_member
WASX7209I: Connected to process "dmgr" on node eugbbopg11lt_Manager using SOAP connector;  The type of process is: Depl
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[-i, threadpool, -s, juat_server_member2]"
Exception  type: exceptions.ImportError
Exception value: no module named Help
Exception: <class exceptions.KeyError at 288821559>
    value: <exceptions.KeyError instance at 1697801522>
Processing:
[ [growable false] [maximumSize 50] [name MessageListenerThreadPool] [stats
Stats name=MessageListenerThreadPool, type=threadPoolModule
{
name=PoolSize, ID=4, description=The average number of threads in a pool., unit=N/A, type=BoundedRangeStatistic, lowWaterMark=10, highWaterMark=10, current=0, integral=0.0, lowerBound=10, upperBound=50
}] [inactivityTimeout 3500] [minimumSize 10] ]

2. # cd /opt/IBM/WebSphere/AppServer/bin
- Execute the versionInfo command script
- Look for the "Installed Product" section
Product List
--------------------------------------------------------------------------------
ND                       installed

Installed Product
--------------------------------------------------------------------------------
Name                     IBM WebSphere Application Server - ND
Version                  6.1.0.31
ID                       ND
Build Level              cf311015.02
Build Date               4/15/10

--------------------------------------------------------------------------------

3.- Verify which check_was.py you are using,   where is it?
It's at my home directory and it is existing.

4. What does the prologue (comment section at the beginning of the file) look like?
Here it is
#----------------------------------------------------------------------
# File Name: check_was.py
#   Purpose: Display user requested information about
#            WebSphere Application Server (WSAS) resources.
#    Author: HonorGod [HG] - http://www.experts-exchange.com/M_3572595.html
#   History:
#   date    ver  who  what
# --------  ---  ---  ----------
# 10/08/20  0.5  HG   Fix - typo in Usage
# 10/08/20  0.4  HG   Fix - AdminConfig.getAttributes()  is wrong
#                           AdminControl.getAttributes() is right (sigh)
# 10/08/20  0.3  HG   Fix - Add exception check in threadpool() based upon client issue
# 10/08/19  0.2  HG   Fix - Add the threadpool() routine specifics
# 10/07/22  0.1  HG   Fix - the Usage "example", added badInfo mapped message
# 10/07/15  0.0  HG   New - http://www.experts-exchange.com/Q_26328297.html
#----------------------------------------------------------------------



check-was-error.jpg
installed-prod.jpg
0
HonorGodSoftware EngineerCommented:
You are making my head hurt.  ;-)
0
HonorGodSoftware EngineerCommented:
Here's a modified check_was.py

It doesn't have a fix, just some added debug output in threadpool()
:-(
check-was.py.txt
0
crazywolf2010Author Commented:
Hi Mate,
Sorry for a delay. It was a bank holiday weekend. Please see an output.

[was61@Server1 was_scripts]$ /opt/IBM/WebSphere/AppServer/profiles/Profile01/dmgr/bin/wsadmin.sh -f /home/was61/was_scripts/check_was.py -i threadpool -s jsit_server_member2
WASX7209I: Connected to process "dmgr" on node Server1_Manager using SOAP connector;  The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[-i, threadpool, -s, jsit_server_member2]"
Exception  type: exceptions.ImportError
Exception value: no module named Help
Thread Pool MBean attributes:
--------------------------------------------------
--------------------------------------------------
Exception: <class exceptions.KeyError at 262541222>
    value: <exceptions.KeyError instance at 74122347>
Processing:
[ [growable false] [maximumSize 50] [name MessageListenerThreadPool] [stats
Stats name=MessageListenerThreadPool, type=threadPoolModule
{
name=PoolSize, ID=4, description=The average number of threads in a pool., unit=N/A, type=BoundedRangeStatistic, lowWaterMark=10, highWaterMark=10, current=0, integral=0.0, lowerBound=10, upperBound=50
}] [inactivityTimeout 3500] [minimumSize 10] ]
0
crazywolf2010Author Commented:
Hi HonorGod,
Can you see a fix for above error.

regards
0
crazywolf2010Author Commented:
Hi HonorGod
Any update on this?
0
HonorGodSoftware EngineerCommented:
Thanks for the reminder.  I had forgotten this one. :-(

Looking
0
HonorGodSoftware EngineerCommented:
Oh!  I see what I did wrong!  Working to fix it.
0
HonorGodSoftware EngineerCommented:
Please do me a favor, and:

- Open a command prompt

- Execute the clear command to clear the screen

- execute the following wsadmin command:
  /opt/IBM/WebSphere/AppServer/profiles/Profile01/dmgr/bin/wsadmin.sh -lang jython -c "dir()"

- Paste the results here.

Thanks!

0
crazywolf2010Author Commented:
[was61@was_scripts]$ /opt/IBM/WebSphere/AppServer/profiles/Profile01/dmgr/bin/wsadmin.sh -lang jython -c "dir()"
WASX7209I: Connected to process "dmgr" on node eugbbopg10lt_Manager using SOAP connector;  The type of process is: DeploymentManager
['AdminApp', 'AdminConfig', 'AdminControl', 'AdminTask', 'Help', 'LTPA_LDAPSecurityOff', 'LTPA_LDAPSecurityOn', 'TypedProxy', '__doc__', '__name__', 'bsf', 'cellName', 'checkuserpw', 'doAuthenticationMechanism', 'doGlobalSecurity', 'doGlobalSecurityDisable', 'doLDAPUserRegistry', 'domainHostname', 'exportLTPAKey', 'flag', 'forceSync', 'generateLTPAKeys', 'getLDAPUserRegistryId', 'getLTPAId', 'getSecId', 'getSecurityAdminMbean', 'java', 'ldapPassword', 'ldapPort', 'ldapServer', 'ldapServerId', 'ldapUserRegistryId', 'lineSeparator', 'ltpaId', 'nodeName', 'secMbean', 'securityId', 'securityoff', 'securityon', 'sleep', 'sys', 'whatEnv']
[was61@was_scripts]$
0
crazywolf2010Author Commented:
lang jython -c "dir()" output
directory-list.JPG
0
HonorGodSoftware EngineerCommented:
Yeah, that's what I expected...  Please try this, and let me know how it works for you...
check-was.py.txt
0
crazywolf2010Author Commented:
Stunning.. it's working for threadpool.
Not for connectionpool, sessions or other matrix  - Error : Not yet implemented: "sessions".

--------------------------------------------------
Thread Pool MBean attributes:
--------------------------------------------------
       Modifiable : ['maximumSize', 'minimumSize', 'inactivityTimeout', 'growable']
         growable : false
inactivityTimeout : 5000
      maximumSize : 20
      minimumSize : 5
             name : TCPChannel.DCS
            stats :
Stats name=TCPChannel.DCS, type=threadPoolModule
{
name=PoolSize, ID=4, description=The average number of threads in a pool., unit=N/A, type=BoundedRangeStatistic, l                                           owWaterMark=1, highWaterMark=5, current=3, integral=255726.0, lowerBound=5, upperBound=20
}
--------------------------------------------------
Thread Pool MBean attributes:
--------------------------------------------------
       Modifiable : ['maximumSize', 'minimumSize', 'inactivityTimeout', 'growable']
         growable : false
inactivityTimeout : 3500
      maximumSize : 50
      minimumSize : 10
             name : WebContainer
            stats :
Stats name=WebContainer, type=threadPoolModule
{
name=PoolSize, ID=4, description=The average number of threads in a pool., unit=N/A, type=BoundedRangeStatistic, l                                           owWaterMark=1, highWaterMark=10, current=7, integral=1.2011409E7, lowerBound=10, upperBound=50
}
--------------------------------------------------
                        |           lo  hi  lo  hi
                   Name | integral  WM  WM Bnd Bnd cur ratio
------------------------+-----------------------------------
  Message.Listener.Pool |      0.0  10  10  10  50   0 0.00%
        ORB.thread.pool |      0.0  10  10  10  50   0 0.00%
SIBFAPInboundThreadPool | 9090637.0   1   4   4  50   3 0.75%
       SIBFAPThreadPool | 112975.0   1   4   4  50   2 0.50%
         TCPChannel.DCS | 255726.0   1   5   5  20   3 0.60%
           WebContainer | 12011409.0   1  10  10  50   7 0.70%
0
crazywolf2010Author Commented:
Hi,
How should I read these values?

I can guess
Lo WM - Low Watermark
Hi WM - High Watermark
lo Bnd - ??
Hi Bnd - ??
Cur Rartio - ??

Thanks.

--------------------------------------------------
                        |           lo  hi  lo  hi
                   Name | integral  WM  WM Bnd Bnd cur ratio
------------------------+-----------------------------------
  Message.Listener.Pool |      0.0  10  10  10  50   0 0.00%
        ORB.thread.pool |      0.0  10  10  10  50   0 0.00%
SIBFAPInboundThreadPool | 9090637.0   1   4   4  50   3 0.75%
       SIBFAPThreadPool | 112975.0   1   4   4  50   2 0.50%
         TCPChannel.DCS | 255726.0   1   5   5  20   3 0.60%
           WebContainer | 12011409.0   1  10  10  50   7 0.70%
0
HonorGodSoftware EngineerCommented:
Lo WM == Low WaterMark - correct
Hi WM == High WaterMark - correct
Lo Bnd == Lower Bound
Hi Bnd == High Bound
Cur    == Current level
Ratio == Ratio of Current to upper bound

Q: Should I remove the "debug" threadpool messages now?
     i.e., the "Thread Pool MBean attributes" stuff

Q: How do you want the columns identified?
0
crazywolf2010Author Commented:
Q: Should I remove the "debug" threadpool messages now?
-- Yes Please .

Q: How do you want the columns identified?
--Could you please add FULL titile at top and TAB (CHR<>)them bit more so they separate out clearly.

Sorry to hassle you but I am trying to understand bit more on these titles.


So here  "WebContainer | 12011409.0   1  10  10  50   7 0.70%"
                         Name | integral      WM WM Bnd Bnd cur ratio

Means WebContainer currently using 7 processes out of 10 allocated and they can expand upto 50 MAX.

In that case the ratio should be = cur/ Hi Bnd .... Am I right in saying this ?

0
HonorGodSoftware EngineerCommented:
Q: Should I remove the "debug" threadpool messages now?
-- Yes Please .
    Done.

Q: How do you want the columns identified?
--Could you please add FULL titile at top and TAB (CHR<>)them bit more so they separate out clearly.
   Done.

> Sorry to hassle you but I am trying to understand bit more on these titles.
Not at all.

So here  "WebContainer | 12011409.0   1  10  10  50   7 0.70%"
                         Name | integral      WM WM Bnd Bnd cur ratio

Means WebContainer currently using 7 processes out of 10 allocated and they can expand upto 50 MAX.

> In that case the ratio should be = cur/ Hi Bnd .... Am I right in saying this ?

  I forgot to multiply by 100.0... it should b2 70.00%, not 0.70 % - fixed.

How's this look?

check-was.py.txt
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
crazywolf2010Author Commented:
Yeap this looks much better and clearer. Thanks a lot.

Shall I create another thread for connectionpool, sessions or other matrix -Not yet implemented message.

                        |           Low    High
                        |           Water  Water  Lower  Upper  Current
                   Name | integral  Mark   Mark   Bound  Bound  Usage    Ratio
------------------------+-----------------------------------------------------
  Message.Listener.Pool |      0.0   10     10     10     50      0      0.00%
        ORB.thread.pool |      0.0   10     10     10     50      0      0.00%
SIBFAPInboundThreadPool | 9090637.0    1      4      4     50      3     75.00%
       SIBFAPThreadPool | 112975.0    1      4      4     50      2     50.00%
         TCPChannel.DCS | 255726.0    1      5      5     20      3     60.00%
           WebContainer | 12011409.0    1     10     10     50      7     70.00%
0
HonorGodSoftware EngineerCommented:
up to you.  I was waiting to work on those until after we had finished the threadpool stuff
0
crazywolf2010Author Commented:
Hi mate,
I will close this off and add a new thread but I will link that to this page.

many thanks



0
crazywolf2010Author Commented:
0
HonorGodSoftware EngineerCommented:
Thank you sir for the grade, the points, and the compliments.

Good luck & see you in the next question. ;-)
0
Bob ArnoldCommented:
Getting exception errors  while running the script.....
I'm on the following version
 Report at date and time April 18, 2016 11:39:29 AM MDT

Installation
-------------------------------------------------------------------------------

Product Directory        D:\IBM\WebSphere\AppServer
Version Directory        D:\IBM\WebSphere\AppServer\properties\version
DTD Directory            D:\IBM\WebSphere\AppServer\properties\version\dtd
Log Directory            C:\ProgramData\IBM\Installation Manager\logs

Product List
-------------------------------------------------------------------------------

ND                       installed

Installed Product
-------------------------------------------------------------------------------

Name                  IBM WebSphere Application Server Network Deployment
Version               8.5.5.2
ID                    ND
Build Level           cf021414.01
Build Date            4/8/14
Package               com.ibm.websphere.ND.v85_8.5.5002.20140408_1947
Architecture          x86-64 (64 bit)
Installed Features    IBM 64-bit WebSphere SDK for Java
                      WebSphere Application Server Full Profile
                      EJBDeploy tool for pre-EJB 3.0 modules
                      Embeddable EJB container
                      Stand-alone thin clients and resource adapters

 And Im getting
Thread Pool Exception: <class exceptions.ValueError at 271541532>
    value: <exceptions.ValueError instance at 380895580>
  trace:<traceback object at 99937445

Processing:
[[name CPWEMDBThreadPool] [maximumSize 99] [minimumSize 34] [inactivityTimeout 5
000] [growable false] [stats [
Stats name=CPWEMDBThreadPool, type=threadPoolModule
{
name=ActiveCount, ID=3, description=The number of concurrently active threads.,
unit=N/A, type=BoundedRangeStatistic, lowWaterMark=0, highWaterMark=8, current=0
, integral=2342850.0, lowerBound=0, upperBound=0

name=PoolSize, ID=4, description=The average number of threads in a pool., unit=
N/A, type=BoundedRangeStatistic, lowWaterMark=1, highWaterMark=34, current=8, in
tegral=8.7676925691E10, lowerBound=34, upperBound=99

name=DeclaredThreadHungCount, ID=6, description=The number of threads that are d
eclared stopped., unit=N/A, type=CountStatistic, count=0

name=ClearedThreadHangCount, ID=7, description=The number of thread stops that c
leared., unit=N/A, type=CountStatistic, count=0

name=ConcurrentHungThreadCount, ID=8, description=The number of concurrently sto
pped threads., unit=N/A, type=RangeStatistic, lowWaterMark=0, highWaterMark=0, c
urrent=0, integral=0.0
}]] ]

It seems like it only going through one loop of the threadpool atributes then gettin an exception error.
I'm trying to figure out what the exception means but there doensn't seem to be much details to go on....
0
Bob ArnoldCommented:
I'm adding the first part  From the begiining of running the script :

D:\IBM\WebSphere\AppServer\profiles\CPWENode01\bin>D:\IBM\WebSphere\AppServer\pr
ofiles\CPWENode01\bin\wsadmin.bat -f check_was_new.py -lang jython -i threadpool
  -s CPWECapComCSR  -n CPWENode01 -user wasadmin -password
WASX7209I: Connected to process "dmgr" on node CPWEDeploymentManager using SOAP
connector;  The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are
 available as arguments that are stored in the argv variable: "[-i, threadpool,
-s, CPWECapComCSR, -n, CPWENode01]"
Thread Pool MBean attributes:
--------------------------------------------------
       Modifiable : ['maximumSize', 'minimumSize', 'inactivityTimeout', 'growabl
e']
         growable : false
inactivityTimeout : 5000
      maximumSize : 99
      minimumSize : 34
             name : CPWEMDBThreadPool
            stats :
Stats name=CPWEMDBThreadPool, type=threadPoolModule
{
name=ActiveCount, ID=3, description=The number of concurrently active threads.,
unit=N/A, type=BoundedRangeStatistic, lowWaterMark=0, highWaterMark=8, current=0
, integral=2342850.0, lowerBound=0, upperBound=0

name=PoolSize, ID=4, description=The average number of threads in a pool., unit=
N/A, type=BoundedRangeStatistic, lowWaterMark=1, highWaterMark=34, current=8, in
tegral=8.7676925691E10, lowerBound=34, upperBound=99

name=DeclaredThreadHungCount, ID=6, description=The number of threads that are d
eclared stopped., unit=N/A, type=CountStatistic, count=0

name=ClearedThreadHangCount, ID=7, description=The number of thread stops that c
leared., unit=N/A, type=CountStatistic, count=0

name=ConcurrentHungThreadCount, ID=8, description=The number of concurrently sto
pped threads., unit=N/A, type=RangeStatistic, lowWaterMark=0, highWaterMark=0, c
urrent=0, integral=0.0
}
--------------------------------------------------
Text: 'name=ActiveCount, ID=3, description=The number of concurrently active thr
eads., unit=N/A, type=BoundedRangeStatistic, lowWaterMark=0, highWaterMark=8, cu
rrent=0, integral=2342850.0, lowerBound=0, upperBound=0\n\nname=PoolSize, ID=4,
description=The average number of threads in a pool., unit=N/A, type=BoundedRang
eStatistic, lowWaterMark=1, highWaterMark=34, current=8, integral=8.7676925691E1
0, lowerBound=34, upperBound=99\n\nname=DeclaredThreadHungCount, ID=6, descripti
on=The number of threads that are declared stopped., unit=N/A, type=CountStatist
ic, count=0\n\nname=ClearedThreadHangCount, ID=7, description=The number of thre
ad stops that cleared., unit=N/A, type=CountStatistic, count=0\n\nname=Concurren
tHungThreadCount, ID=8, description=The number of concurrently stopped threads.,
 unit=N/A, type=RangeStatistic, lowWaterMark=0, highWaterMark=0, current=0, inte
gral=0.0'
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java App Servers

From novice to tech pro — start learning today.