111 telem_args = self.log.name +
'.' + dev,
'/opt/MagAOX/telem', (self.
config.logdump_exe,
'--ext=.bintel'), dev, self.
telem_queuetelem_queue, Telem
112 telem_thread = threading.Thread(target=_run_logdump_thread, args=telem_args, daemon=
True)
114 self.log.debug(f
"Watching {dev} for incoming telem")
118 if dev ==
"observers":
120 user_log_thread = threading.Thread(target=_run_logdump_thread, args= ULog_args, daemon=
True)
121 user_log_thread.start()
122 self.log.debug(f
"Watching {dev} for incoming user logs")
136 last_update = properties.NumberVector(name=
"last_update", perm=constants.PropertyPerm.READ_ONLY)
137 last_update.add_element(DefNumber(
140 min=0.0, max=1e200, format=
'%f',
143 self.add_property(last_update)
145 records = properties.NumberVector(name=
"records", perm=constants.PropertyPerm.READ_ONLY)
146 records.add_element(DefNumber(
149 min=0.0, max=1e200, format=
'%f',
152 records.add_element(DefNumber(
153 name=
"since_startup",
155 min=0, max=1_000_000_000, format=
'%i',
158 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])
186 for dev
in device_names:
197 for dirname
in self.
config.data_dirs:
198 dirpath = self.
config.common_path_prefix / dirname
199 if not dirpath.exists():
200 self.log.debug(f
"No {dirpath} to watch")
203 self.log.info(f
"Watching {dirpath} for changes")