Weblogic

WLST Thread Count

아도니우스 2014. 8. 20. 08:26
WLST Thread Count in WebLogic 9.x and all higher version the Thread model is depends on WorkManager. The WorkManager internally uses self-tuning threads for each WebLogic Server instances.
  1. ######################################################
  2. # This script is used to monitor all servers
  3. # Author: Pavan Devarakonda
  4. # Date: 28th April 2009
  5. ######################################################
  6. import thread
  7. # Configured user credentials with storeUserConfig
  8. ucf='keypath/xuserconfig.key'
  9. ukf='keypath/xkeyfile.key'
  10. admurl = "t3://hostingdns.com:port"
  11. def monitorThrds():
  12. connect(userConfigFile=ucf, userKeyFile=ukf, url= admurl )
  13. serverNames = getRunningServerNames()
  14. domainRuntime()
  15. print 'EXECUTE QUEUES'
  16. print ' '
  17. print 'Execute Total Current PendRequest ServicedRequest'
  18. print 'QueueName Count IdleCount CurrCount TotalCount '
  19. print '===========**=======**=================================='
  20.   for snam in serverNames:
  21.      try:
  22.        cd("/ServerRuntimes/" + snam.getName() + "/ExecuteQueueRuntimes/weblogic.kernel.Default")
  23.        totcnt=get('ExecuteThreadTotalCount')
  24.        idlecnt = get('ExecuteThreadCurrentIdleCount')
  25.        pndcnt =get('PendingRequestCurrentCount')
  26.        sevcnt = get('ServicedRequestTotalCount')
  27.        print '%10s %4d %4d %4d %16d' % (snam.getName(), totcnt, idlecnt, pndcnt, sevcnt)
  28.     except WLSTException,e:
  29.      # this typically means the server is not active, just ignore
  30.     pass
  31. def getRunningServerNames():
  32. domainConfig()
  33. return cmo.getServers()
  34. if __name__== "main":
  35. monitorThrds()
  36. disconnect()