114 telem_args = self.log.name +
'.' + dev,
'/opt/MagAOX/telem', (self.
config.logdump_exe,
'--ext=.bintel'), dev, self.
telem_queuetelem_queue, Telem
115 telem_thread = threading.Thread(target=_run_logdump_thread, args=telem_args, daemon=
True)
117 self.log.debug(f
"Watching {dev} for incoming telem")
120 if dev ==
"observers":
122 user_log_thread = threading.Thread(target=_run_logdump_thread, args= ULog_args, daemon=
True)
123 user_log_thread.start()
124 self.log.debug(f
"Watching {dev} for incoming user logs")
138 last_update = properties.NumberVector(name=
"last_update", perm=constants.PropertyPerm.READ_ONLY)
139 last_update.add_element(DefNumber(
142 min=0.0, max=1e200, format=
'%f',
145 self.add_property(last_update)
147 records = properties.NumberVector(name=
"records", perm=constants.PropertyPerm.READ_ONLY)
148 records.add_element(DefNumber(
151 min=0.0, max=1e200, format=
'%f',
154 records.add_element(DefNumber(
155 name=
"since_startup",
157 min=0, max=1_000_000_000, format=
'%i',
160 self.add_property(records)
162 role = os.environ.get(
'MAGAOX_ROLE',
'')
163 proclist = pathlib.Path(self.
config.proclist.replace(
'%s', role))
164 if not proclist.exists():
165 raise RuntimeError(f
"No process list at {proclist}")
169 with proclist.open()
as fh:
173 if line.strip()[0] ==
'#':
175 parts = line.split(
None, 1)
177 raise RuntimeError(f
"Got malformed proclist line: {repr(line)}")
178 device_names.add(parts[0])
185 for dev
in device_names:
199 for dirname
in self.
config.data_dirs:
200 dirpath = self.
config.common_path_prefix / dirname
201 if not dirpath.exists():
202 self.log.debug(f
"No {dirpath} to watch")
205 self.log.info(f
"Watching {dirpath} for changes")