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 import *
from import BlissDialog
......@@ -11,6 +12,8 @@ from import *
from 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 {} sy {} sz {} yrot {setup_globals.yrot.position}')
def start_synchro_lbs():
os.system("ssh lbs191 sudo /root/")
def stop_synchro_lbs():
os.system("ssh lbs191 sudo /root/")
def lbs_free_space():
process = os.popen('df -h /lbsram')
result = process.readlines()
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"
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