caproto.server.stats.BasicStatusHelper

Inheritance diagram of BasicStatusHelper
class caproto.server.stats.BasicStatusHelper(*args, **kwargs)[source]
BasicStatusHelper pvproperties

Attribute

Suffix

Docs

Type

Notes

Alarm Group

application_directory

APP_DIR

Startup directory (__main__)

str (waveform)

Read-only Length(255)

cpu_count

CPU_CNT

Number of CPUs

int (longin)

Read-only

engineer

ENGINEER

Who is responsible for this abomination

str (stringin)

Read-only Length(40)

hostname

HOSTNAME

str (stringin)

Read-only Length(255)

kernel_version

KERNEL_VERS

OS/Kernel Version

str (stringin)

Read-only

location

LOCATION

str (stringin)

Read-only Length(40)

parent_pid

PARENT_ID

Parent Process ID

int (ai)

Read-only

process_id

PROCESS_ID

int (ai)

Read-only Startup

source_filename

SOURCE_FILE

Top-level PVGroup source filename

str (waveform)

Read-only Length(255)

sysreset

SYSRESET

IOC exit / restart (if using procServ)

int (sub)

Put

version

EPICS_VERSION

EPICS (caproto) version

str (stringin)

Read-only

Methods

group_read(instance)

Generic read called for channels without get defined

group_write(instance, value)

Generic write called for channels without put defined

Attributes

default_values

type_map

type_map_read_only

pvdb

attr_pvdb

attr_to_pvname

groups

pvproperty methods

process_id.startup(self, instance, async_lib)
Source code: process_id.startup
146    @process_id.startup
147    async def process_id(self, instance, async_lib):
148        await self.process_id.write(value=os.getpid())
149        await self.parent_pid.write(value=os.getppid())
150        await self.location.write(value=os.environ.get('LOCATION', ''))
151        await self.engineer.write(value=os.environ.get('ENGINEER', ''))
152
153        try:
154            root_source = get_source_file(type(self._root_pvgroup))
155            await self.source_filename.write(value=str(root_source))
156        except Exception:
157            self.log.exception('Unable to determine source path')
158
159        try:
160            main_path = get_source_file(sys.modules['__main__'])
161            await self.application_directory.write(value=str(main_path.parent))
162        except TypeError:
163            # Built-in is OK
164            ...
165        except Exception:
166            self.log.exception('Unable to determine startup directory')
167
168        if psutil is not None:
169            await self.cpu_count.write(value=psutil.cpu_count())