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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

si locks - List member locks of all users

ASailer
5-Regular Member

si locks - List member locks of all users

Dear community,

I found the cmd line order "si locks" to list the locks of a user declared with "--locker=" in this order.

In the output it is possible to view the user name of the listed lock. So I wonder if it is possible to list the locks of multiple users via the cmd line.

I'm locking forward to any hint.

TIA

Alexander Sailer

ACCEPTED SOLUTION

Accepted Solutions

Hello Alexander,

There is no command to list all lock data for all users as I believe this was a potential performance concern with the amount of data the Integrity Server would need to load into memory. I see 2 options to accomplish what you want:

Option 1) Get a list of users and create a script to run 'si locks --locker=<username>' for each user, sending output to a single text file for parsing later.

Option 2) If you have access to the Integrity database, there is a view which can be used to get this information:

'SELECT * FROM CMARCHLOCK_V'

View solution in original post

2 REPLIES 2

Hello Alexander,

There is no command to list all lock data for all users as I believe this was a potential performance concern with the amount of data the Integrity Server would need to load into memory. I see 2 options to accomplish what you want:

Option 1) Get a list of users and create a script to run 'si locks --locker=<username>' for each user, sending output to a single text file for parsing later.

Option 2) If you have access to the Integrity database, there is a view which can be used to get this information:

'SELECT * FROM CMARCHLOCK_V'

Hi Alexander,

I'm not sure, the following command is helpful in your use case.

You can also list locked members with the command si rlog, if you set the option --filter=locked.

e.g.

si rlog --user=<username> --rfilter=locked --filter=locked --noHeaderFormat --noTrailerFormat --format="{membername}:{memberrev}:{lockrecord}\n" -R -P /<YourProject>/project.pj

An advantage of this command is, you can print quite a lot of information. Just configure via --format={fieldname} or --lockRecordFormat. See also CLI Reference Guide for Config Management.

But this command has also two disadvantages:

  1. The command works not on server level, but on project level. Similar to Josph's solution, you need to run si projects in order to get a list of all projects and run above mentioned command afterwards.
  2. The command lists only registered members, i.e. locked dropped members are not listed!
Announcements


Top Tags