Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
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
Solved! Go to Solution.
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'
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: