cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

How to identify the server manager a web client is connected to?

ScottMorris
17-Peridot

How to identify the server manager a web client is connected to?

Curiosity question for today, is there a simple way to identify the method server a user is connected to? I haven't had a hung MS in a bit, but its always tricky to diagnose who's still connecting to a hung MS before its shutdown. 

We run 4 MS on the production server and it would be nice to display the MS ID next to the username in the WC header.

3 REPLIES 3

Hello,

 

I would use 

String methodServerName = ManagementFactory.getRuntimeMXBean().getName();

This method return PID@SERVERNAME  example: 6156@wch12020 

 

you can check PTC article CS146093  where is used a jsp page to retrieve that info. 

 

also you can add it to a "alert message"(begin_custom.jspf) which is the best way to present that information to a user. it is described in the article CS146093  .

HelesicPetr_0-1641478520601.png

 

Best Regards

 

PetrH

 

The Server Status page in Site, Utilities

Clicking on the method server in question will produce an MBeans dump which includes a list of the active users under Monitors, Active users.

I'm not sure whether the MBeans dumb will work when the Method Sever is hanging, if you can access the server then maybe view the MBean in your Java Monitoring and Management Console, like windchill wt.util.jmx.SMJconsole

The server status page also shows a star next to host, server manager and method server you are connected to at the time.

 

active users.png

 

HelesicPetr
22-Sapphire I
(To:rhart)

Hello, 

good point with the star on the status page 😄

That's true, but only site admin users have access to the status page.

If you need identify a normal user it is more complicated.

Best Regard

PetrH

Announcements


Top Tags