Thursday, December 12, 2013

Wednesday, December 11, 2013

wsadmin Check Automatic Synchronisation jython

na= AdminConfig.list('NodeAgent').splitlines()
for i in na:
    fs=AdminConfig.showAttribute(i,'fileSynchronizationService')
    sy=AdminConfig.showAttribute(fs,'autoSynchEnabled')
    print "=" *30
    print "Automatic Synchronization Enabled : "+sy
    print "=" *30

ClassUnloadign Issue IBM Websphere

</con>
  <gc type="global" id="18" totalid="1830" intervalms="5375702.871">
    <classunloading classloaders="97276" classes="96598" timevmquiescems="0.000" timetakenms="27654.667" />
    <finalization objectsqueued="159" />
    <timesms mark="313.364" sweep="5.282" compact="0.000" total="31012.005" />
    <nursery freebytes="320865168" totalbytes="360956928" percent="88" />
    <tenured freebytes="411184336" totalbytes="1282799616" percent="32" >
      <soa freebytes="411184336" totalbytes="1282799616" percent="32" />
      <loa freebytes="0" totalbytes="0" percent="0" />
    </tenured>
  </gc>
  <nursery freebytes="320865168" totalbytes="360956928" percent="88" />
  <tenured freebytes="411184336" totalbytes="1282799616" percent="32" >
    <soa freebytes="411184336" totalbytes="1282799616" percent="32" />
    <loa freebytes="0" totalbytes="0" percent="0" />
  </tenured>
  <refs soft="97660" weak="68715" phantom="2543" dynamicSoftReferenceThreshold="10" maxSoftReferenceThreshold="32" />
  <time totalms="31057.771" />
</con>



The time taken by classunloading is 27654ms.the total time taken is 31057ms.
If its repeating in the gc logs then we have to tune the JVM.

If the environment you are 
Use -Xgc:classUnloadingKickoffThreshold=<number> to specify the
number of classes to be available for unloading to kick off a
Global GC earlier, this will reduce the impact of the class
unloading time.
 
Also analyse the  application is having problem from the  dump using MAT tool.
  


Refer IBM Document
-Xnoclassgc should not be used to prevent class loading and unloading as it may lead to native OOM.

IBM link for noclassgc lead to OOM

wsadmin List Server Port Details jython

servers = AdminConfig.list( 'ServerEntry' ).splitlines()
for server in servers :
    print '\n'
    print "Server Name : " +  server[0:server.find('(')]
    print "=" *30
    NamedEndPoints = AdminConfig.list( "NamedEndPoint" , server).splitlines()
    for namedEndPoint in NamedEndPoints:
        endPointName = AdminConfig.showAttribute(namedEndPoint, "endPointName" )
        endPoint = AdminConfig.showAttribute(namedEndPoint, "endPoint" )
        host = AdminConfig.showAttribute(endPoint, "host" )
        port = AdminConfig.showAttribute(endPoint, "port" )
        print "Endpoint Name  : " +  endPointName + " Host : " + host + " port : " + port



 


wsadmin Global Security Enable jython

gs=AdminTask.isGlobalSecurityEnabled()
if gs == true:
    print "=" *30
    print "Global Security is Enabled"
    print "=" *30
else:
    print "=" *30
    print "Global Security is disabled and enabling it"
    AdminTask.setGlobalSecurity ('[-enabled true]')
    print "=" *30