Differences between revisions 5 and 6
Revision 5 as of 2022-08-04 19:10:07
Size: 2591
Comment:
Revision 6 as of 2022-08-04 19:11:30
Size: 3988
Comment:
Deletions are marked like this. Additions are marked like this.
Line 65: Line 65:

The FSSSlow script was not properly documented and it was not working, so I had to use one that I knew worked from CTN. This scripts lives in

/opt/rtcds/caltech/c1/Git/40m/scripts/PSL/FSS/PIDLocker.py

and uses a configuration file

/opt/rtcds/caltech/c1/Git/40m/scripts/PSL/FSS/PIDConfigFSS.yml

The script runs all the time inside docker container which keeps it running. The heart-beat blinker shows if the script is active or not, but it only starts working when C1:IOO-MC_LOCK is 1 and C1:PSL-FSS_SLOWLOOP is 1. The second channel is a button on C1PSL_SLOW screen to engage autolocker. It has to be turned on for FSS to work.

 

docker instructions:

The following message is displayed on login in optimus:

-------------------------------------------------------------------------
This computer runs four services as of Feb 18, 2022 for 40m lab. To check
status of these services, type
> sudo docker ps
For restarting a particular service, type:
> sudo docker restart container_name
where container name can be found from ps command above.
Fimilarly, to check status of a service, type:
> sudo docker logs container_name

==== 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

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

Docker

* See 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

The FSSSlow script was not properly documented and it was not working, so I had to use one that I knew worked from CTN. This scripts lives in

/opt/rtcds/caltech/c1/Git/40m/scripts/PSL/FSS/PIDLocker.py

and uses a configuration file

/opt/rtcds/caltech/c1/Git/40m/scripts/PSL/FSS/PIDConfigFSS.yml

The script runs all the time inside docker container which keeps it running. The heart-beat blinker shows if the script is active or not, but it only starts working when C1:IOO-MC_LOCK is 1 and C1:PSL-FSS_SLOWLOOP is 1. The second channel is a button on C1PSL_SLOW screen to engage autolocker. It has to be turned on for FSS to work.

docker instructions:

The following message is displayed on login in optimus:


This computer runs four services as of Feb 18, 2022 for 40m lab. To check status of these services, type > sudo docker ps For restarting a particular service, type: > sudo docker restart container_name where container name can be found from ps command above. Fimilarly, to check status of a service, type: > sudo docker logs container_name

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)