Skip to content

API · fair::mq::shmem

Monitorclass

#include <Monitor.h>fairmq/shmem/Monitor.h:61GitHub ↗

No comment in the header yet.

Nested types

Functions

Monitor(
    std::string shmId,
    bool selfDestruct,
    bool interactive,
    bool viewOnly,
    unsigned int timeoutInMS,
    unsigned int intervalInMS,
    bool runAsDaemon,
    bool cleanOnExit
)

No comment in the header yet.

Static functions

static std::vector<std::pair<std::string, bool>> Cleanup(
    const ShmId& shmId,
    bool verbose = true
)

Cleanup all shared memory artifacts created by devices.

shmId
shared memory id
verbose
output cleanup results to stdout
static std::vector<std::pair<std::string, bool>> Cleanup(
    const SessionId& sessionId,
    bool verbose = true
)

Cleanup all shared memory artifacts created by devices.

sessionId
session id
verbose
output cleanup results to stdout
static std::vector<std::pair<std::string, bool>> CleanupFull(
    const ShmId& shmId,
    bool verbose = true
)

Cleanup all shared memory artifacts created by devices and monitors.

shmId
shared memory id
verbose
output cleanup results to stdout
static std::vector<std::pair<std::string, bool>> CleanupFull(
    const SessionId& sessionId,
    bool verbose = true
)

Cleanup all shared memory artifacts created by devices and monitors.

sessionId
session id
verbose
output cleanup results to stdout
static void ResetContent(const ShmId& shmId, bool verbose = true)

[EXPERIMENTAL] cleanup the content of the shem segment, without recreating it

shmId
shared memory id Only call this when segment is not in use
static void ResetContent(const SessionId& sessionId, bool verbose = true)

[EXPERIMENTAL] cleanup the content of the shem segment, without recreating it

sessionId
session id Only call this when segment is not in use
static void ResetContent(
    const ShmId& shmId,
    const std::vector<SegmentConfig>& segmentCfgs,
    const std::vector<RegionConfig>& regionCfgs,
    bool verbose = true
)

[EXPERIMENTAL] cleanup the content of the shem segment, without recreating it

shmId
shared memory id Only call this when segment is not in use
static void ResetContent(
    const SessionId& sessionId,
    const std::vector<SegmentConfig>& segmentCfgs,
    const std::vector<RegionConfig>& regionCfgs,
    bool verbose = true
)

[EXPERIMENTAL] cleanup the content of the shem segment, without recreating it

sessionId
session id Only call this when segment is not in use
static void PrintDebugInfo(const ShmId& shmId)

Outputs list of messages in shmem (if compiled with FAIRMQ_DEBUG_MODE=ON)

shmId
shmem id
static unsigned long GetFreeMemory(const ShmId& shmId, uint16_t segmentId)

Returns the amount of free memory in the specified segment.

shmId
shmem id
segmentId
segment id
MonitorError throws
static unsigned long GetFreeMemory(
    const SessionId& sessionId,
    uint16_t segmentId
)

Returns the amount of free memory in the specified segment.

sessionId
session id
segmentId
segment id
MonitorError throws
static bool SegmentIsPresent(const ShmId& shmId, uint16_t segmentId)

Checks if a given segment can be opened.

shmId
shmem id
segmentId
segment id
static bool RegionIsPresent(const ShmId& shmId, uint16_t regionId)

Checks if a given region can be opened.

shmId
shmem id
regionId
region id