It's all about the answers!

Ask a question

RTC-SCM-CLI: lscm.bat launches second instance of scm.exe in case of error


0
1
Karthikeyan Baskaran (45813) | asked Oct 14 '13, 1:58 a.m.
retagged Dec 16 '13, 3:55 p.m. by David Lafreniere (4.3k7)
I'm using RTC CLI tool from the package: RTC-scmTools-Win-4.0.3

I executed below steps:

1. Opened command prompt and executed "help" command using lscm.bat
  • As this is the first time lscm.bat is called in my PC, it took some additional time and it launched scm.exe => fine
  • help information is displayed properly.
2. In the same command prompt, executed "load" command using lscm.bat (without any login)
  • load command failed with error: Failed to acquire locks on requested sandboxes in 60000ms

3. In the same command prompt,executed "login" command using lscm.bat (As I've not logged in before, I thought that was the reason why the previous "load" command failed)

  • It took additional time before giving the status as "login successful"
  • When I looked in Task Manager, another instance of scm.exe was running

4. When I executed "load" command again, it was successful this time. But I think this command was executed by the second instance of scm.exe and the first instance of scm.exe is sitting there idle. (But I'm not sure)

Quesion:
In step-3, why another instance of scm.exe is started in case of the "load" command failure ?
It affects the performance, as the user has to bear with the start up time of second instance of scm.exe and also more resource consumption as the first instance of scm.exe is still running in task manager.
Also, I'm not sure whether this behavior happens every time an error occurs in CLI. Could you please clarify ?

Thanks in advance.

Comments
Karthikeyan Baskaran commented Oct 14 '13, 2:05 a.m.

Additional Info:
Closing the command prompt automatically closes both instances of scm.exe's

Accepted answer


permanent link
Shashikant Padur (3.9k27) | answered Oct 29 '13, 12:40 a.m.
JAZZ DEVELOPER
Assuming you are starting clean, that is there is no sandbox, running a non-sandbox operation (such as lscm help, lscm version, lscm login, lscm list workspace etc) will launch a daemon. Note: This daemon is not registered with any sandbox. Sandbox is the location in the local filesystem where the repository workspace is loaded.

Next if you run a sandbox related operation such as lscm load, lscm status etc, the tool will look for an existing daemon that is not registered to a sandbox and if available will reuse the daemon and register the sandbox with that daemon. If not, it will start a new daemon and register the sandbox with the new daemon.

You can have two daemons running if you have run a sandbox operation and then run another non-sandbox operation from a non-sandbox location. Run 'scm list daemons' to list the number of daemons running. It will also list the sandboxes registered with each daemon. Only one sandbox will be registered under each daemon.
Karthikeyan Baskaran selected this answer as the correct answer

Comments
Karthikeyan Baskaran commented Oct 29 '13, 4:50 a.m.

Thanks for explanation. It is now clear to me why 2 scm.exe's were running.

If I have 'N' number of sandboxes, and when I'm switching between them, and  I have to perform sandbox operation on them, it will create 'N' number of scm.exe's right. In this case, how can I shut down scm.exe when switching to another sandbox ? [or] Is it possible to re-register that same scm.exe to another sandbox ?


Karthikeyan Baskaran commented Nov 06 '13, 7:18 a.m.

Accepting this as the answer as it clearly explains the internal workflows during which separate scm.exes will be launched.

One other answer



permanent link
Shashikant Padur (3.9k27) | answered Oct 29 '13, 5:47 a.m.
JAZZ DEVELOPER
edited Oct 29 '13, 5:48 a.m.
You can shutdown the daemon by running the 'scm daemon stop' command.
You can register the sandbox to a daemon by running the 'scm daemon register'. If you register more than one sandbox to a daemon, the daemon memory bloats up as it has to manage metadata of two sandboxes.

Is there an issue with running multiple daemons? What is the reason you want multiple sandboxes per daemon?

Your answer


Register or to post your answer.