Differences between revisions 2 and 11 (spanning 9 versions)
Revision 2 as of 2022-08-04 18:45:44
Size: 913
Comment:
Revision 11 as of 2022-08-04 19:15:25
Size: 3347
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#pragma section-numbers 2
Line 2: Line 3:
<<TableOfContents(4)>>
Line 7: Line 8:
 || '''''Name of script''''' || '''''Location''''' || '''''Arguments ''''' || '''''What it does ''''' || '''''Docker container name ''''' ||
 || [[https://git.ligo.org/40m/scripts/-/blob/main/MC/autolockMC.py| autolockMC.py]] || {{{ /opt/rtcds/caltech/c1/Git/40m/scripts/MC/ }}} || Uses configuration file [[https://git.ligo.org/40m/scripts/-/blob/main/MC/ALConfigMC.yml|ALConfigMC.yml]]|| Keeps IMC locked. || scripts_AL_MC_1 ||
 || [[https://git.ligo.org/40m/scripts/-/blob/main/PSL/PMC/autolockPMC.py| autolockPMC.py]] || {{{ /opt/rtcds/caltech/c1/Git/40m/scripts/PSL/PMC/ }}} || Uses configuration file [[https://git.ligo.org/40m/scripts/-/blob/main/PSL/PMC/ALConfigMC.yml|ALConfigMC.yml]]|| Keeps PMC locked. || scripts_AL_PMC_1 ||


|| ''''' Name ''''' || '''''Location''''' || ''''' Arguments ''''' || ''''' Description ''''' || ''''' Docker container name ''''' ||
|| [[https://git.ligo.org/40m/scripts/-/blob/main/MC/autolockMC.py| autolockMC.py]] || {{{ /opt/rtcds/caltech/c1/Git/40m/scripts/MC/ }}} || [[https://git.ligo.org/40m/scripts/-/blob/main/MC/ALConfigMC.yml|ALConfigMC.yml]]|| Keeps IMC locked. || scripts_AL_MC_1 ||
|| [[https://git.ligo.org/40m/scripts/-/blob/main/PSL/PMC/autolockPMC.py| autolockPMC.py]] || {{{ /opt/rtcds/caltech/c1/Git/40m/scripts/PSL/PMC/ }}} || [[https://git.ligo.org/40m/scripts/-/blob/main/PSL/PMC/ALConfigPMC.yml|ALConfigPMC.yml]]|| Keeps PMC locked. || scripts_AL_PMC_1 ||
|| [[https://git.ligo.org/40m/scripts/-/blob/main/PSL/FSS/PIDLocker.py| PIDLocker.py]] || {{{ /opt/rtcds/caltech/c1/Git/40m/scripts/PSL/FSS/ }}} || [[https://git.ligo.org/40m/scripts/-/blob/main/PSL/FSS/PIDConfigFSS.yml|PIDConfigFSS.yml]]|| Adjusts Main laser temperature to keep PZT actuation around 0. || scripts_PID_FSS_Slow_1 ||

=== Docker ===

==== Configuration ====

See [[https://git.ligo.org/40m/scripts/-/blob/main/docker-compose.yml| docker-compose.yml]] for how the scripts are configured to run on optimus.

==== Start all scripts ====
* To start all docker script containers, need to first start sot channel docker containers first. ssh to optimus:
{{{
> cd /opt/rtcds/caltech/c1/Git/40m/softchansmodbus
> sudo docker-compose up -d
}}}
Then start all docker script containers using:
{{{
> cd /opt/rtcds/caltech/c1/Git/40m/scripts
> sudo docker-compose up -d
}}}

==== Stop all scripts ====
To stop all the scripts on docker, cd to this directory and do:
{{{
> cd /opt/rtcds/caltech/c1/Git/40m/scripts
> sudo docker-compose down
}}}

==== Checking status of scripts ====
Running services container names and statuses can be checked by:

{{{
> sudo docker ps
}}}

To check the logs of a particular script (whatever they priont out to stdout)

{{{
sudo docker logs <container_name>
}}}
Example for IMC autolocker:
{{{
sudo docker logs scripts_AL_MC_1
}}}
Add {{{ | tail -10}}} to see the last 10 lines in the logs.

==== Restart a particular script ====
If you made a change to a script or its configuration files, to get changes
loaded, simply restart the container by:
{{{
sudo docker restart <container_name>
}}}
Example for IMC autolocker:
{{{
sudo docker restart scripts_AL_MC_1
}}}

==== Stop a particular script ====
To stop a container (should be done if debugging the code on another computer):

{{{
sudo docker stop <container_name>
}}}
Example for IMC autolocker:
{{{
sudo docker stop scripts_AL_MC_1
}}}

==== Start a particular script ====
To start the container from stoped state:
{{{
sudo docker start <container_name>
}}}
Example for IMC autolocker:
{{{
sudo docker start scripts_AL_MC_1
}}}

==== Check IP address of running containers ====
To check the IP addresses of running containers:
{{{
> sudo docker inspect -f '|| {{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}} || {{.Name}} ||' $(sudo docker ps -aq)
}}}

Always Running Scripts

1. On Optimus through docker

On the computer optimus mounted at 1X4, following scripts run inside docker containers perpetually:

Name

Location

Arguments

Description

Docker container name

autolockMC.py

 /opt/rtcds/caltech/c1/Git/40m/scripts/MC/ 

ALConfigMC.yml

Keeps IMC locked.

scripts_AL_MC_1

autolockPMC.py

 /opt/rtcds/caltech/c1/Git/40m/scripts/PSL/PMC/ 

ALConfigPMC.yml

Keeps PMC locked.

scripts_AL_PMC_1

PIDLocker.py

 /opt/rtcds/caltech/c1/Git/40m/scripts/PSL/FSS/ 

PIDConfigFSS.yml

Adjusts Main laser temperature to keep PZT actuation around 0.

scripts_PID_FSS_Slow_1

1.1. Docker

1.1.1. Configuration

See docker-compose.yml for how the scripts are configured to run on optimus.

1.1.2. Start all scripts

* To start all docker script containers, need to first start sot channel docker containers first. ssh to optimus:

> cd /opt/rtcds/caltech/c1/Git/40m/softchansmodbus
> sudo docker-compose up -d

Then start all docker script containers using:

> cd /opt/rtcds/caltech/c1/Git/40m/scripts
> sudo docker-compose up -d

1.1.3. Stop all scripts

To stop all the scripts on docker, cd to this directory and do:

> cd /opt/rtcds/caltech/c1/Git/40m/scripts
> sudo docker-compose down

1.1.4. Checking status of scripts

Running services container names and statuses can be checked by:

> sudo docker ps

To check the logs of a particular script (whatever they priont out to stdout)

sudo docker logs <container_name>

Example for IMC autolocker:

sudo docker logs scripts_AL_MC_1

Add  | tail -10 to see the last 10 lines in the logs.

1.1.5. Restart a particular script

If you made a change to a script or its configuration files, to get changes loaded, simply restart the container by:

sudo docker restart <container_name>

Example for IMC autolocker:

sudo docker restart scripts_AL_MC_1

1.1.6. Stop a particular script

To stop a container (should be done if debugging the code on another computer):

sudo docker stop <container_name>

Example for IMC autolocker:

sudo docker stop scripts_AL_MC_1

1.1.7. Start a particular script

To start the container from stoped state:

sudo docker start <container_name>

Example for IMC autolocker:

sudo docker start scripts_AL_MC_1

1.1.8. Check IP address of running containers

To check the IP addresses of running containers:

> sudo docker inspect -f '|| {{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}   ||   {{.Name}} ||' $(sudo docker ps -aq)

Computers_andScripts/AlwaysRunningScripts (last edited 2022-11-18 00:59:19 by AnchalguptaATligoDOTorg)