Link to home
Create AccountLog in
Avatar of crazywolf2010
crazywolf2010Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Add functionality to support connectionpool, sessions & other details at existing Jython Websphere script

This is a new thread to add functionality to support connectionpool, sessions at existing script discussed https://www.experts-exchange.com/questions/26400327/Modifying-Jython-JACL-script-to-pull-out-stats-from-websphere.html


check-was-py.txt
Avatar of HonorGod
HonorGod
Flag of United States of America image

What information do you want displayed for ConnectionPools ?
agedTimeout : 0
             connectionTimeout : 180
 freePoolDistributionTableSize : 0
                maxConnections : 10
                minConnections : 1
    numberOfFreePoolPartitions : 0
  numberOfSharedPoolPartitions : 0
numberOfUnsharedPoolPartitions : 0
                    properties : []
                   purgePolicy : EntirePool
                      reapTime : 180
                stuckThreshold : 0
                     stuckTime : 0
                stuckTimerTime : 0
         surgeCreationInterval : 0
                surgeThreshold : -1
                testConnection : true
        testConnectionInterval : 0
                 unusedTimeout : 1800

Open in new window

Avatar of crazywolf2010

ASKER

I would prefer all of these details. Better have everything & filter out later what is most needed.

Do you see a way to run these scripts with switches remotely?

I will explain what I means here...
1. I am trying to create websphere basic monitoring framework on my central RHEL node. I wish to run scripts like check-was-py.txt with options at remote node with click of a mouse. I wish to know an easiest way.
I can probably use wsadmin with [-conntype SOAP [-host host_name] [-port port_number] [-user userid] [-password password] & [-f <script_file_name>]
 to run things at remote node.

2. At this stage I am creating XML file thru http://localhost:9080/wasPerfTool/servlet/perfservlet (performance servlet) and copying manually at node before running check-was-py.
I read something which says using curl and directly downloading xml data for processing check-was-py script.

Thanks


ASKER CERTIFIED SOLUTION
Avatar of HonorGod
HonorGod
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
You realize, of course, that displaying all of the columns (especially with verbose column headings) makes for a very wide table, right?
-- Got it so let's handpick these columns.

agedTimeout : 0
             connectionTimeout : 180
                maxConnections : 10
                minConnections : 1
                   purgePolicy : EntirePool
                      reapTime : 180
                 unusedTimeout : 1800
ok, next question..

From the above, it would seem that you want the configured values, not currently active ones.
Is that correct?
Check this, and let me know what you think...

./wsadmin.sh -f check_was.py -i connectionpool -s server1
check-was.py.txt
I just tried attached script & following error returned..

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_member2]"
 agedTimeout | connectionTimeout | maxConnections | minConnections | purgePolicy | reapTime | unusedTimeout
-------------+-------------------+----------------+----------------+-------------+----------+---------------
Exception  type: exceptions.ImportError
Exception value: no module named AdminConfig
Exception: <class exceptions.KeyError at 472063011>
    value: <exceptions.KeyError instance at 254283560>
Processing:
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 627, in ?
  File "<string>", line 359, in main
  File "<string>", line 182, in connectionpool
NameError: mb
Interesting.  one moment please.
Please try this, and let me know.
check-was.py.txt
Hi Mate,
I still have these errors..

WASX7209I: Connected to process "dmgr" on node eugbbopg03lt_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]"
WASX7017E: Exception received while running file "/home/was61/check_was.py"; exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
  File "<string>", line 639, in ?
  File "<string>", line 376, in main
  File "<string>", line 166, in connectionpool
KeyError: kind
Hi HonorGod,
Hope you will have some time to look at this error.

Regards.
Hi HonorGod,
Hope you will have some time this week to look at attached error.

WASX7209I: Connected to process "dmgr" on node eugbbopg03lt_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]"
WASX7017E: Exception received while running file "/home/was61/check_was.py"; exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
  File "<string>", line 639, in ?
  File "<string>", line 376, in main
  File "<string>", line 166, in connectionpool
KeyError: kind

Regards
sorry.  I didn't realize that you had an unanswered question.

Line 167 should be changed from:
--------------------------------------------------
  Exception  type: %(kind)s
--------------------------------------------------
to
--------------------------------------------------
  Exception  type: %(Type)s
--------------------------------------------------

Thanks for the grade & points.

Good luck & have a great day.