CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
Loading...
Searching...
No Matches
cmlabs::ProcessInfoStruct Struct Reference

One process (space) record in the shared process table. More...

#include <ProcessMemory.h>

Collaboration diagram for cmlabs::ProcessInfoStruct:
[legend]

Public Member Functions

std::string toXML ()
 Serialize this record (including stats) as a <space> XML element.

Public Attributes

uint32 id
 Process id; corresponds to the index in the table.
uint16 nodeID
 Id of the node this process belongs to.
uint64 createdTime
 Creation timestamp (µs).
uint64 lastseen
 Last heartbeat/status update (µs); staleness implies a crashed space.
uint8 status
 PSYPROC_* lifecycle status.
uint32 osID
 OS process id (pid).
uint8 type
 0: normal space process, 1: runs inside the node process.
char name [MAXKEYNAMELEN+1]
 Process (space) name.
char commandline [MAXCOMMANDLINELEN+1]
 Command line used to launch the process.
ProcessStats stats
 Throughput counters and recent-message rings.
AveragePerfStats perfStats
 Windowed performance averages.
uint16 cmdQID
 Queue index of this process's command queue.
uint16 msgQID
 Queue index of this process's data-message queue.
uint16 sigQID
 Queue index of this process's signal queue.
uint16 reqQID
 Queue index of this process's request queue.

Detailed Description

One process (space) record in the shared process table.

The four *QID fields index into ProcessMemoryStruct::qIndex to locate this process's command/message/signal/request queues within the segment.

Warning
Shared-memory layout; see MemoryManager.h for the ABI/rebuild warning.

Definition at line 113 of file ProcessMemory.h.

Member Function Documentation

◆ toXML()

std::string cmlabs::ProcessInfoStruct::toXML ( )
inline

Serialize this record (including stats) as a <space> XML element.

Returns
XML fragment.

Definition at line 132 of file ProcessMemory.h.

References commandline, createdTime, cmlabs::html::EncodeHTML(), lastseen, name, nodeID, osID, perfStats, stats, status, and cmlabs::utils::StringFormat().

Member Data Documentation

◆ cmdQID

uint16 cmlabs::ProcessInfoStruct::cmdQID

Queue index of this process's command queue.

Definition at line 126 of file ProcessMemory.h.

Referenced by cmlabs::ProcessMemory::create(), and cmlabs::ProcessMemory::createNewProcess().

◆ commandline

char cmlabs::ProcessInfoStruct::commandline[MAXCOMMANDLINELEN+1]

Command line used to launch the process.

Definition at line 123 of file ProcessMemory.h.

Referenced by toXML().

◆ createdTime

◆ id

uint32 cmlabs::ProcessInfoStruct::id

Process id; corresponds to the index in the table.

Definition at line 114 of file ProcessMemory.h.

Referenced by cmlabs::ProcessMemory::addLocalPerformanceStats(), and cmlabs::ProcessMemory::createNewProcess().

◆ lastseen

uint64 cmlabs::ProcessInfoStruct::lastseen

Last heartbeat/status update (µs); staleness implies a crashed space.

Definition at line 117 of file ProcessMemory.h.

Referenced by cmlabs::ProcessMemory::checkProcessHeartbeats(), cmlabs::ProcessMemory::create(), cmlabs::ProcessMemory::createNewProcess(), and toXML().

◆ msgQID

uint16 cmlabs::ProcessInfoStruct::msgQID

Queue index of this process's data-message queue.

Definition at line 127 of file ProcessMemory.h.

Referenced by cmlabs::ProcessMemory::create(), and cmlabs::ProcessMemory::createNewProcess().

◆ name

char cmlabs::ProcessInfoStruct::name[MAXKEYNAMELEN+1]

Process (space) name.

Definition at line 122 of file ProcessMemory.h.

Referenced by cmlabs::ProcessMemory::create(), cmlabs::ProcessMemory::createNewProcess(), and toXML().

◆ nodeID

◆ osID

uint32 cmlabs::ProcessInfoStruct::osID

OS process id (pid).

Definition at line 119 of file ProcessMemory.h.

Referenced by cmlabs::ProcessMemory::addLocalPerformanceStats(), and toXML().

◆ perfStats

AveragePerfStats cmlabs::ProcessInfoStruct::perfStats

Windowed performance averages.

Definition at line 125 of file ProcessMemory.h.

Referenced by cmlabs::ProcessMemory::getProcessPerfStats(), and toXML().

◆ reqQID

uint16 cmlabs::ProcessInfoStruct::reqQID

Queue index of this process's request queue.

Definition at line 129 of file ProcessMemory.h.

Referenced by cmlabs::ProcessMemory::create(), and cmlabs::ProcessMemory::createNewProcess().

◆ sigQID

uint16 cmlabs::ProcessInfoStruct::sigQID

Queue index of this process's signal queue.

Definition at line 128 of file ProcessMemory.h.

Referenced by cmlabs::ProcessMemory::create(), and cmlabs::ProcessMemory::createNewProcess().

◆ stats

ProcessStats cmlabs::ProcessInfoStruct::stats

Throughput counters and recent-message rings.

Definition at line 124 of file ProcessMemory.h.

Referenced by cmlabs::ProcessMemory::addLocalPerformanceStats(), cmlabs::ProcessMemory::addToProcessStats(), and toXML().

◆ status

uint8 cmlabs::ProcessInfoStruct::status

◆ type

uint8 cmlabs::ProcessInfoStruct::type

0: normal space process, 1: runs inside the node process.

Definition at line 120 of file ProcessMemory.h.

Referenced by cmlabs::ProcessMemory::addLocalPerformanceStats().


The documentation for this struct was generated from the following file: