WLST – Lister les sessions HTTP d’une application web

Le script WLST suivant affiche la liste des sessions HTTP d’une application web tournant dans un serveur WebLogic Server.

[pastacode lang= »python » manual= »%0A%0Ahost%3D%22…%22%0Aport%3D%22…%22%0Ausername%3D%22…%22%0Apassword%3D%22…%22%0A%0AwebApp%3D%22…%22%0AentApp%3D%22…%22%0A%0AserverName%3D%22AdminServer%22%0A%0Aprint%20%22Connexion%20au%20serveur…%22%0Aconnect(username%2Cpassword%2C%20host%2B%22%3A%22%2Bport)%0A%0AserverRuntime()%0Acd(‘ApplicationRuntimes%2F’%20%2B%20entApp%20%2B%20’%2FComponentRuntimes%2F’%20%2B%20serverName%20%2B%20’_%2F’%20%2B%20webApp)%20%0AMIDs%20%3D%20mon_ids%20%3D%20cmo.getServletSessionsMonitoringIds()%0A%0Aprint%20%22Nombre%20de%20sessions%20dans%20l’application%20%22%2BentApp%2B%22%2F%22%2BwebApp%2B%22%20%3A%20%22%2Bstr(len(MIDs))%0A%0Afor%20mid%20in%20MIDs%3A%0A%20%20%20%20%20%20%20%20print%20mid%0A%0A%0Aprint%20%22Deconnexion%20du%20serveur…%22%0Adisconnect()%0A%0A%0A » message= »listHttpSessions.py » highlight= » » provider= »manual »/]