How to monitor active sessions in a cluster

Hi all,
we currently test failover of our WLS 11g cluster.
How can I see in the Console to which managed server a client is connected?
Thank you in advance
Regards
Rolf

today i found a way to get the name of the server in a cluster which handles the active session, using a managed bean in my application.
There i added a getter method
public String getServerName() {
return System.getProperty("weblogic.Name");
and then I used an af:outputText with
#{<mybean>.serverName}
See this blog entry http://theblasfrompas.blogspot.com/2009/05/adf-failover-within-weblogic-103.html
Is there realy no way to get something like client-ip:<managed server> using WLS console?
I only found the number of requests (which is incrementing after reloading the console) in Deployments-> <application> -> Monitoring - Workload
Regards Rolf
Best Regards

Similar Messages

  • How to find active sessions count on a server in weblogic server console

    Hi All,
    I would like to know how to find active sessions count on a server in weblogic console. I am using weblogic 11g.
    Regards,
    Sunil.

    On the deployment, monitoring tab, you can select web applications. Here the number of current sessions are listed per web application deployed on the domain.
    The deployment itself (deployments, application, monitoring, sessions) shows a list of sessions and where it is located. Unfortunately, there is no aggregation (but that is something you can so yourself as well).
    When you are using a load balancer in front, the count of sessions on per web application on the domain gives you some clue how many sessions there are present on each server.
    That is to say, when load balancer is using round-robin (and does that correct), you can take the total number of sessions divide it by the number of servers.

  • How to get active sessions in tomcat 5.0?

    Hi,
    As I am working on monitoring related requirement, I need to get no. Of active sessions,sessions created, etc.
    I found interesting code in ManagerServlet, As it has some protected methods, I cant call it from its object, I need to create servlet for my work, So I even can't extend ManagerServlet, So I've created one POJO for that, But now I need to populte the context and many other objects,
    Is there any other way out for this?,
    I really appriciate any kind of help. :-)
    -Jeff

    hi :-)
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Servlets.html
    or
    http://www.google.com.ph/search?hl=en&q=java+servlet+tutorial&btnG=Google+Search&meta=
    regards,

  • How to get active session details

    Dear all
    in my application i want to display number of users online in a list and their details,for that how can i get the active session details in a jsp , or any other ways to do this.any suggestion regarding this is very much helpful to me. thanks in advance
    thanking u
    yours
    kumaran ramu

    Hi,
    You can use a Listener class for track the sessions and do some logic when a session is created/destroyed. See HttpSessionListener interface. You can save the session IDs and session objects when a session is created, for example in a hashmap. Save the hashmap in application context. In your JSP get the hashmap and get its key/values. See thread safe problems if you are using a hashmap in application context.

  • How to access "Active Sessions" using MBeans

    Hi all,
    I have deployed an application at EM (Enterprise Manager).
    when I logged into EM and click the application I can see the number of active sessions under "Servlets and JSPs" topic.
    how can I access that parameter at application level..??
    (I want to access that parameter *"x"* at my web application and display Logged in users : x )
    EM shows that the number of active sessions. it updates too.. so there must be some bean or record for that parameter..
    how can I access that....??
    Regards,
    Dinuka.

    You can use something like the following:
    package middleware.magic;
    import javax.management.MBeanServerConnection;
    import javax.management.ObjectName;
    import javax.management.remote.JMXConnector;
    import javax.management.remote.JMXConnectorFactory;
    import javax.management.remote.JMXServiceURL;
    import javax.naming.Context;
    import java.io.IOException;
    import java.util.Hashtable;
    public class Browse {
        private String hostname = "172.31.0.106";
        private Integer port = 7001;
        private String username = "weblogic";
        private String password = "transfer11g";
        private String protocol = "t3";
        private String jndiRoot = "/jndi/";
        private String mBeanServer = "weblogic.management.mbeanservers.domainruntime";
        private String serviceName = "com.bea:Name=DomainRuntimeService,Type=weblogic.management.mbeanservers.domainruntime.DomainRuntimeServiceMBean";
        private JMXConnector connector;
        public static void main(String[] args) {
            Browse test = new Browse();
            try {
                MBeanServerConnection connection = test.getMBeanServerConnection();
                test.getSomeInformation(connection);
                test.closeJmxConnector();
            } catch (Exception e) {
                e.printStackTrace();
        public void getSomeInformation(MBeanServerConnection connection) throws Exception {
            ObjectName service = new ObjectName(serviceName);
            ObjectName[] serverRunTimes = (ObjectName[]) connection.getAttribute(service, "ServerRuntimes");
            for (int i = 0; i < serverRunTimes.length; i++) {
                String name = (String) connection.getAttribute(serverRunTimes, "Name");
    String version = (String) connection.getAttribute(serverRunTimes[i], "WeblogicVersion");
    String state = (String) connection.getAttribute(serverRunTimes[i], "State");
    System.out.println("Server name: " + name + ", Version: " + version + ", Server state: " + state);
    for (int i = 0; i < serverRunTimes.length; i++) {
    ObjectName[] applicationRuntimes = (ObjectName[]) connection.getAttribute(serverRunTimes[i], "ApplicationRuntimes");
    for (int j = 0; j < applicationRuntimes.length; j++) {
    String name = (String) connection.getAttribute(applicationRuntimes[j], "Name");
    ObjectName[] componentRuntimes = (ObjectName[]) connection.getAttribute(applicationRuntimes[j], "ComponentRuntimes");
    System.out.println("Application name: " + name);
    for (int k = 0; k < componentRuntimes.length; k++) {
    if (connection.getAttribute(componentRuntimes[k], "Type").equals("WebAppComponentRuntime")) {
    String componentName = (String) connection.getAttribute(componentRuntimes[k], "Name");
    Integer sessionsCurrent = (Integer) connection.getAttribute(componentRuntimes[k], "OpenSessionsCurrentCount");
    Integer sessionsHigh = (Integer) connection.getAttribute(componentRuntimes[k], "OpenSessionsHighCount");
    System.out.println(" - Component Name: " + componentName + ", Sessions Current: " + sessionsCurrent + ", Sessions High: " + sessionsHigh);
    public MBeanServerConnection getMBeanServerConnection() throws IOException {
    return getJmxConnector().getMBeanServerConnection();
    public JMXConnector getJmxConnector() throws IOException {
    JMXServiceURL serviceURL = new JMXServiceURL(protocol, hostname, port, jndiRoot + mBeanServer);
    Hashtable hashtable = new Hashtable();
    hashtable.put(Context.SECURITY_PRINCIPAL, username);
    hashtable.put(Context.SECURITY_CREDENTIALS, password);
    hashtable.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES, "weblogic.management.remote");
    connector = JMXConnectorFactory.connect(serviceURL, hashtable);
    return connector;
    public void closeJmxConnector() throws IOException {
    connector.close();
    Information regarding runtimeMBean can be found here: http://download.oracle.com/docs/cd/E12839_01/apirefs.1111/e13951/core/index.html.
    Open the tree Runtime MBeans, ServerRuntimeMBean and click attributes to see the available attributes (such as Name, WeblogicVersion, State etcetera).
    An example output of the program above:Server name: AdminServer, Version: WebLogic Server 10.3.2.0 Tue Oct 20 12:16:15 PDT 2009 1267925 , Server state: RUNNING
    Server name: soa_server1, Version: WebLogic Server 10.3.2.0 Tue Oct 20 12:16:15 PDT 2009 1267925 , Server state: RUNNING
    Application name: FMW Welcome Page Application_11.1.0.0.0
    - Component Name: AdminServer__11.1.0.0.0, Sessions Current: 0, Sessions High: 0
    Application name: Module-FMWDFW
    Application name: bea_wls_internal
    - Component Name: AdminServer_/bea_wls_internal, Sessions Current: 0, Sessions High: 0
    Application name: mds-soa
    Application name: bea_wls_deployment_internal
    - Component Name: AdminServer_/bea_wls_deployment_internal, Sessions Current: 0, Sessions High: 0
    Application name: wsil-wls
    - Component Name: AdminServer_/inspection.wsil, Sessions Current: 0, Sessions High: 0
    Application name: bea_wls_diagnostics
    - Component Name: AdminServer_/bea_wls_diagnostics, Sessions Current: 0, Sessions High: 0
    Application name: mejb
    Application name: bea_wls9_async_response
    - Component Name: AdminServer_/_async, Sessions Current: 0, Sessions High: 0
    Application name: uddiexplorer
    - Component Name: AdminServer_/uddiexplorer, Sessions Current: 0, Sessions High: 0
    Application name: mds-owsm
    Application name: bea_wls_management_internal2
    - Component Name: AdminServer_/bea_wls_management_internal2, Sessions Current: 0, Sessions High: 0
    Application name: consoleapp
    - Component Name: AdminServer_/console, Sessions Current: 0, Sessions High: 2
    - Component Name: AdminServer_/consolehelp, Sessions Current: 0, Sessions High: 1
    Application name: DMS Application_11.1.1.1.0
    - Component Name: AdminServer_/dms_11.1.1.1.0, Sessions Current: 0, Sessions High: 0
    Application name: em
    - Component Name: AdminServer_/em, Sessions Current: 0, Sessions High: 0
    Application name: uddi
    - Component Name: AdminServer_/uddi, Sessions Current: 0, Sessions High: 0
    Application name: MQSeriesAdapter
    Application name: OraSDPMDataSource
    Application name: JmsAdapter
    Application name: uddi
    - Component Name: soa_server1_/uddi, Sessions Current: 0, Sessions High: 0
    Application name: wsil-wls
    - Component Name: soa_server1_/inspection.wsil, Sessions Current: 0, Sessions High: 0
    Application name: SOAJMSModule
    Application name: DbAdapter
    Application name: bea_wls9_async_response
    - Component Name: soa_server1_/_async, Sessions Current: 0, Sessions High: 0
    Application name: composer
    - Component Name: soa_server1_/soa/composer, Sessions Current: 0, Sessions High: 0
    Application name: DMS Application_11.1.1.1.0
    - Component Name: soa_server1_/dms_11.1.1.1.0, Sessions Current: 0, Sessions High: 0
    Application name: Module-FMWDFW
    Application name: usermessagingdriver-email
    - Component Name: soa_server1_/sdpmessagingdriver/email-mbeanlifecycle, Sessions Current: 0, Sessions High: 0
    Application name: UMSJMSSystemResource
    Application name: AqAdapter
    Application name: FtpAdapter
    Application name: OracleBamAdapter
    Application name: SOADataSource
    Application name: usermessagingserver
    - Component Name: soa_server1_/sdpmessaging/mbeanlifecycle, Sessions Current: 0, Sessions High: 0
    - Component Name: soa_server1_/sdpmessaging/parlayx, Sessions Current: 0, Sessions High: 0
    - Component Name: soa_server1_/sdpmessaging/userprefs-ui, Sessions Current: 0, Sessions High: 0
    Application name: bea_wls_internal
    - Component Name: soa_server1_/bea_wls_internal, Sessions Current: 0, Sessions High: 0
    Application name: SocketAdapter
    Application name: SOALocalTxDataSource
    Application name: FileAdapter
    Application name: DefaultToDoTaskFlow
    - Component Name: soa_server1_/DefaultToDoTaskFlow, Sessions Current: 0, Sessions High: 0
    Application name: soa-infra
    - Component Name: soa_server1_/soa-infra, Sessions Current: 0, Sessions High: 0
    - Component Name: soa_server1_/integration/services, Sessions Current: 0, Sessions High: 0
    - Component Name: soa_server1_/integration/services/TaskService, Sessions Current: 0, Sessions High: 0
    - Component Name: soa_server1_/integration/services/TaskMetadataService, Sessions Current: 0, Sessions High: 0
    - Component Name: soa_server1_/integration/services/TaskQueryService, Sessions Current: 0, Sessions High: 0
    - Component Name: soa_server1_/integration/services/TaskReportService, Sessions Current: 0, Sessions High: 0
    - Component Name: soa_server1_/integration/services/IdentityService, Sessions Current: 0, Sessions High: 0
    - Component Name: soa_server1_/integration/services/UserMetadataService, Sessions Current: 0, Sessions High: 0
    - Component Name: soa_server1_/integration/services/RuntimeConfigService, Sessions Current: 0, Sessions High: 0
    - Component Name: soa_server1_/integration/services/TaskEvidenceService, Sessions Current: 0, Sessions High: 0
    - Component Name: soa_server1_/integration/services/CompositeMetadataService, Sessions Current: 0, Sessions High: 0
    - Component Name: soa_server1_/integration/services/b2b, Sessions Current: 0, Sessions High: 0
    - Component Name: soa_server1_/b2b, Sessions Current: 0, Sessions High: 0
    - Component Name: soa_server1_/integration/services/AGMetadataService, Sessions Current: 0, Sessions High: 0
    - Component Name: soa_server1_/integration/services/AGQueryService, Sessions Current: 0, Sessions High: 0
    - Component Name: soa_server1_/integration/services/AGAdminService, Sessions Current: 0, Sessions High: 0
    Application name: wsm-pm
    - Component Name: soa_server1_/wsm-pm, Sessions Current: 0, Sessions High: 0
    Application name: mds-owsm
    Application name: b2bui
    - Component Name: soa_server1_/b2bconsole, Sessions Current: 0, Sessions High: 0
    Application name: bea_wls_diagnostics
    - Component Name: soa_server1_/bea_wls_diagnostics, Sessions Current: 0, Sessions High: 0
    Application name: bea_wls_cluster_internal
    - Component Name: soa_server1_/bea_wls_cluster_internal, Sessions Current: 0, Sessions High: 0
    Application name: EDNLocalTxDataSource
    Application name: EDNDataSource
    Application name: uddiexplorer
    - Component Name: soa_server1_/uddiexplorer, Sessions Current: 0, Sessions High: 0
    Application name: bea_wls_deployment_internal
    - Component Name: soa_server1_/bea_wls_deployment_internal, Sessions Current: 0, Sessions High: 0
    Application name: worklistapp
    - Component Name: soa_server1_/integration/worklistapp, Sessions Current: 0, Sessions High: 0
    Application name: mds-soa
    Application name: OracleAppsAdapter

  • How to display active Session ?

    hi,
    i would like to implement for an administrative usage, a jsp page that list all active session. I notice in the J2EE api that there's a HttpSessionListener interfaces wich enables listener to receive notification when creating and deleting session. Is it a good way to implement this functionnality, thanks in advance for your help.
    PS : i am sure, others persons have already implement a solution, perhaps there is a Design Pattern for that.

    Hi ,
    Its really simple....
    See the following code
    public class SessionCounter implements HttpSessionListener {
    int sessionCount = 0;
    public void sessionCreated(HttpSessionEvent evt) {
    sessionCount ++;
    evt.getSession().setAttribute("Count", sessionCount);
    public void sessionDestroyed(HttpSessionEvent evt) {
    sessionCount --;
    evt.getSession().setAttribute("Count", sessionCount);
    now add this Listener to your web.xml
    and you can get it anywhere (in jsp or servlet) using session.getAttribute("Count");
    Is this you want.
    Please let me know.
    cheers
    kuttus

  • How to know active sessions logged in by same database users

    This is 10g. I need to query list of DB users who have logged in using the same database user accounts. How can I achieve this? This is on 10g and 9i

    Hello,
    You may enable audit. Then, with the following query you may get the list of User who logged on the same Oracle User account:
    select username, os_username, userhost, terminal, timestamp, action_name
    from dba_audit_trail
    where action_name in ('LOGON','LOGOFF')
    order by username;Please, find below a link about audit:
    http://www.oracle-base.com/articles/10g/Auditing_10gR2.php
    Hope this help.
    Best regards,
    Jean-Valentin

  • Monitoring Users session with specific profiles

    Hi,
    I created a specific profile that terminates a session with idle time 4 minutes. I would like to know how to monitoring which sessions are been disconnected by Oracle.
    Thanks in advance,

    enable auditing by using
    alter system set audit_trail = db scope=spfile
    and bounce
    Then issue audit connect
    The dba_audit_session view will have the reason why the process was disconnected.
    Sybrand Bakker
    Senior Oracle DBA

  • Invalidate Session at all Cluster Weblogic

    hi all,
    i try to save user session in a hashmap on every cluster. and when i need to invalidate it, i will take specified session id. and invalidate it where the session created with normal way to invalidate session.
    public class SessionListener implements HttpSessionListener {
    public HashMap<String, HttpSession> sessionHolder = new HashMap<String, HttpSession>();
    @Override
    public void sessionCreated(HttpSessionEvent se) {
    sessionHolder.put(se.getSession().getId(), se.getSession());
    public void invalidate(String sessionId){
    if(this.sessionHolder.get(sessionId)!= null){
    System.out.println("Invalidate session ID : " + sessionId);
    HttpSession session = sessionHolder.get(sessionId);
    session.invalidate();
    } else {
    System.out.println("Session is not created in this cluster ID : " + sessionId);
    @Override
    public void sessionDestroyed(HttpSessionEvent se) {
    System.out.println("Session " + se.getSession().getId() + " has been destoryed");
    sessionHolder.remove(se.getSession().getId());
    session will perish where invalidate occur. but on other cluster session is still avaliable.
    why the session on other cluster is still. and how to also invalidate session on other cluster.
    thanks.
    Edited by: jeggy on Jan 20, 2011 8:47 PM

    Can you provide little bit more information on how many servers, clusters you have and what kind of replication etc?

  • What is a "logged in user" on the "Active Sessions" report in CF8 Server Monitor?

    I was looking at the Active Sessions Report (The Chart View) and saw I have more "logged in users" than "active sessions".
    I had expected them to be nearly the same.    It's on our Intranet where I log users in (using cflogin and cfloginuser) at the begining of their session and users should be logged when the session ends.
    I couldn't find a detailed explaination of what a "logged in user" means.   There is a chance that the same user is logged into a nested application as well as the Intranet, but I don't think that is what I'm seeing.
    I also don't see a way to get a list of what CF is counting as a logged in user.  I can only see a way to get the total count.
    Any help is appreciated. 
    Thanks,
    Jeff

    Thank you Michael for the reply, but I don't think that is the issue.
    When a user opens their browser on the intranet, a session begins and they are logged in (using the cflogin and cfloginuser).    If they close their browser, the session should hang around for 20 min. (per the server setting).   I am assuming this is still considered an "Active Session" since I can see this behavior in the report.
    At first, the Active Sessions and Logged In Users are exactly the same.   When the sessions start to time out, the active sessions are reduced,  but the Logged In Users remain the same.    Then,  after a while, they start to move together.  So I have more Logged In Users than Active Sessions.
    I left the Server Monitor open last night and for most of the night, I had 0 sessions, but 57  "logged in users".   This morning, as people opened their browsers, the Active Sessions and Logged In Users moved together.   The gap of 57 looks consistent.
    It looks like people are remaining logged in after their session ended.
    I am really looking for a detailed explaination of "active session" and/or "logged in user" as used in the server monitor.  It would be really nice to find a way to list the details about each item counted in the "logged in user" and not just the total count. 
    Thanks Again for your reply.
    jsm

  • How can I find out if a user has an active session

    How can I find out if a user has an active session or sessionObject in the application Server.
    When a user logs on to my web-application, I want him to be able to see a
    list of all the other users that are also loged on. To do this I need to get a
    list of all the session objects avaliable in the sever at that perticular moment?
    In J2EE 2.1 I found the class "javax.servlet.http.HttpSessionContext" with the method "getIds()"
    that returned all the session Id's. By using the method getSession(java.lang.String sessionId)
    from the same class, you could then retrieve the sessionObject.
    But these methods are depricated (and want to be able to use the
    latest version of J2EE).
    Is there any other way to do this?
    I'm using JBoss application server.

    Check out HttpSessionListener -> http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSessionListener.html
    Essentially what you have to do is implement this interface. You also have to register the listener in your web.xml, like this:
    <listener>
        <listener-class>
            package.name.YourListener
        </listener-class>
    </listener>sessionCreated() will get called each time the app server creates a session and sessionDestroyed() will get called each time the app server invalidates a session. You could have a Map that contains all the active sessions, and a method for printing a list of all of the active sessions.

  • How to monitor oracle 11g database sessions on Windows 2008 server?

    Hi Experts
    How to monitor the Oracle 11g database sessions on Windows 2008 server (other than SQL Developer tool), which procedure or query is taking more time with Java application.

    Recently i found this tool- myorasql on the net to monitor the performence of database, easy to setup and check the performence.  i never tested it but seems impresive.  It is free and i think it would be use ful to you.
    http://myorasql.com/
    You can also use Quest - Toad or sqlplus if you are very good at sql commands and all dictionary tables or OEM/EM grid if it is configured .

  • How to Configure Active-Passive oracle cluster in Windows 2008 R2 64bit Server.

    How to Configure Active-Passive oracle cluster in Windows 2008 R2 64bit Server With Oracle 11g R2.
    How many database will play in this role.
    Best,

    hello
    I was going through your post and i am also doing the same thing here at our organisation for Oracle 10g R2
    Can you pls send me any docs u r having for configuration of Oracle in windows clusters .
    And, can you pls elaborate on this point
    e)Create Oracle Service with the same name in the 2nd node and copy all the files like spfile,tnsnames.ora,listener.ora,password file to Node2.
    Pls send me the details at [email protected] or you can contact me at 08054641476.
    Thanks in advance.

  • Counting how many active sessions in a webapp

    Hi folks,
    I was wondering if it is possible to count how many active sessions that there currently are in a webapp? I've looked at the ServletContext and ServletConfig classes, but I can't find anything. Any ideas?
    Cheers,
    Raj.

    HttpSessionListener was introduced in servlet spec 2.3 which is supported in Tomcat 4.0 but not 3.3.
    If upgrading to 4.0 is not an option, there is no elegant way to get what you need. There is no API call that returns all the active sessions so you must do it yourself. One way is to create a class that implements HttpSessionBindingListener to track your sessions. Instantiate it on start-up and add its reference as a session attribute when the session is first created. You can then update your custom session info in the valueBound and valueUnbound methods.

  • How to get all active session id's

    hai,
    i am new to servlet. i am tring to find out all active session id's for security perpose.
    and also i want to deactive a perticular session using that session id.
    but i don't know how to do. please help me.
    thanks in advance.

    Well to me.. I wud like to write a Listener class implementing HttpSessionListener in the following way....
    import javax.servlet.http.HttpSession;
    import javax.servlet.http.HttpSessionListener;
    import javax.servlet.http.HttpSessionEvent;
    import java.util.HashMap;
    public class SessionHandler implements HttpSessionListener{
    public static HashMap<String,HttpSession> SessionsMap = new HashMap<String,HttpSession>();
    public void sessionCreated(HttpSessionEvent se) {
    SessionsMap.put(se.getSession().getId(),se.getSession());
    public void sessionDestroyed(HttpSessionEvent se) {
    SessionMap.remove(se.getSession().getId());
    public static invalidateSession(String SessionId){
    HttpSession session =  SessionsMap.get(SessionId);
    SessionMap.remove(SessionId);
    session.invalidate();
    }Note:I'm assuming tht you are running the code on Jdk/jre 1.5+
    However, i think its more of core way of implementing this specially usage of static members howevr @ the given situation can very well cater your resources.added to it you add ActivationListener depending on your requirement.
    Hope this might help :)
    REGARDS,
    RaHuL

Maybe you are looking for

  • HR_Master Data to SRM

    Hello Gurus, I have the HR-Master Data for User to be replicated by using PFAL in R/3 to SRM. can any 1 assist in using this done.plz assist me. its Urgent. about the Plan Version, Object type,Object ID,Search Term, Object status. Thanks Arshad

  • Download accelerator for OSX10.4.1 ??

    Need to download files a lot faster from internet as it is taking forever. Found Speed Download for Mac but then saw it was for system OS X 10.4.6 or later, which presumably won't work. As I have OS X 10.4.1 is there a good download that you know abo

  • How do I vary the gap between songs?

    I would like to vary the gap between the songs I burn on a CD. This would be especially useful when recording certain classical pieces. The iTunes Preference for "Gap between Songs" will only let me choose a uniform gap between all tracks. Does anyon

  • A2Q process / program ?

    Hi - I am trying to help out a customer with an IPCC design and the customer wants to use a non-Cisco session border controller (SBC).    The customer is telling me that he might not be able to use a non-Cisco product in the IPCC design because this

  • Xperia z2 strange noise - from camera ?

    Hi all  I have a question is it me or some of you have notice : this little sound getting from i think camera ... When i am taping on screen around notification and fast settings i hear this sound like something is loose in upper right corner . Every