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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

[External] List of Users logged into Windchill.

jessh
12-Amethyst

[External] List of Users logged into Windchill.

Oh, as for ServletSessions I should have said "from the method server"
/in 10.0 and higher and from the Tomcat JVM in R9.x./

6 REPLIES 6
rjessen
2-Explorer
(To:jessh)

From the GUI just select: Site, Utilities, Security Audit Reporting and set the filter to limit the events to "Login" and select Preview.
You can configure it further from there if you like and save it so you can just run it when needed in the future.
jessh
12-Amethyst
(To:jessh)

This is all based on the same underlying data tracked by the ActiveUsers
MBean.

Security Audit Reporting will show you /historical /information about
active / logged-in users.

If you want the /current/ list, then you /can /use the ActiveUsers
MBean. For all I know Security Audit Reporting allows you some means to
produce the same information as well.

--
Jess Holle

Hi All,

I've attached a Java source file that I wrote to programmatically have a look at the ActiveUsers MBean. Fee free to use it but it may need to be tweaked a bit for your environment.

I find it quite useful to know what users are connected to which method server, especially in a cluster environment.

Jim

Jim Van Dragt
PLM Architect
Information Technology

hermanmiller.com
ddemay
7-Bedrock
(To:jessh)

Thanks Jim. This kind of for has been on my radar for some time with no time to allocate to it.




Sent from my Verizon Wireless 4G LTE Smartphone
rkobs
2-Explorer
(To:jessh)

In PDMLink 10.x you can go to the server status page from the UI and click the link for the specific server process to get a full MBean dump including the active users info from the server manager… a lot of information but saves going to jconsole or similar for a quick look.
jessh
12-Amethyst
(To:jessh)

Jim, if you're going to run the Java program from the server to get a list of current active users, it's less code to use:



java wt.util.jmx.RunScript -smjmx <somedirpath>/activeUsers.js



from a Windchill shell, where <somedirpath> is the path to wherever you place activeUsers.js and the contents of activeUsers.js are simply as follows below. Note that this does require 10.0 or higher.







importClass( Packages.javax.management.ObjectName );

// mbeanServerConnection provided by RunScript when -smjmx option is used
var users = mbeanServerConnection.getAttribute(
new ObjectName( "com.ptc:wt.subsystem=Monitors,Name=ActiveUsers" ), // name of MBean of interest
"TotalActiveUsers" ); // name of MBean attribute of interest

println( "ACTIVE USERS:" );
println( "=============" );
if ( users != null )
for ( var i = 0; i < users.length; ++i )
println( users[i] );

Announcements


Top Tags