GitLab will be upgraded on June 23rd evening. During the upgrade the service will be unavailable, sorry for the inconvenience.

Commit 0126e3e0 authored by bliss administrator's avatar bliss administrator

Add functions to start/stop synchronization and check free space on lbs pc

parent e988671c
import os
from bliss.setup_globals import *
from bliss.shell.cli.user_dialog import *
from bliss.shell.cli.pt_widgets import BlissDialog
......@@ -11,6 +12,8 @@ from bliss.shell.cli.user_dialog import *
from bliss.shell.cli.pt_widgets import BlissDialog
from bliss.config.static import get_config
from bliss import setup_globals
from bliss.common.logtools import *
_TOMO = None
def init_tomo(tomo):
......@@ -106,3 +109,22 @@ def feclose():
def psp():
print(f'sx {setup_globals.sx.position} sy {setup_globals.sy.position} sz {setup_globals.sz.position} yrot {setup_globals.yrot.position}')
def start_synchro_lbs():
os.system("ssh lbs191 sudo /root/dockerStart.sh")
def stop_synchro_lbs():
os.system("ssh lbs191 sudo /root/dockerStop.sh")
def lbs_free_space():
process = os.popen('df -h /lbsram')
result = process.readlines()
process.close()
mem_use = [item[:-1] for item in result[1].split(' ') if '%' in item]
mem_use = int(mem_use[0])
mem_available = 100 - mem_use
msg = f"\n\033[1mIt remains {mem_available}% of free space on lbs\033[0m\n"
print(msg)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment