PLCnext API Documentation  22.9.0.33
Public Types | Public Member Functions | Friends | List of all members
Arp::System::Commons::Diagnostics::TraceController Class Reference

The TraceController provides an Interface to manage and control the LTTng Tracing on the Control More...

#include <TraceController.hpp>

Inheritance diagram for Arp::System::Commons::Diagnostics::TraceController:
Inheritance graph

Public Types

typedef std::list< Arp::StringSessionList
 

Public Member Functions

bool IsSessionDaemonAlive (void) const
 Checks if the session daemon for tracing is alive. More...
 
void LoadTracepointLibrary (void)
 Loads the userspace Trace-Point-Library More...
 
void UnloadTracepointLibrary (void)
 Unoads the userspace Trace-Point-Library More...
 
bool LoadSessionConfiguration (const Arp::String &session, const Arp::String &config)
 Tries to loads a configuration file. More...
 
SessionList ListSessions (void)
 Queries a list of loaded LTTng Sessions More...
 
bool StartSession (const Arp::String &session)
 Starts an LTTnG Trace Session More...
 
bool StopSession (const Arp::String &session)
 Stops an LTTnG Trace Session More...
 
bool DestroySession (const Arp::String &session)
 Destroys/Unloads an LTTnG Trace Session More...
 
bool TriggerSavingTraceOutputs (const bool &stopTriggerSession)
 Records/Saves all outputs of a configured session after an internal timeout delay Session in Snapshotmode: - A session snapshot will be recorded and the snapshot will then moved to the recording output directory. More...
 
bool IsSessionInSnapshotMode (const Arp::String &session)
 Checks if a trace session is in Snapshot Mode More...
 
bool IsSessionEnabled (const Arp::String &session)
 Checks if a trace session is already enabled/started More...
 
bool IsSessionLoaded (const Arp::String &session)
 Checks if a trace session is already loaded More...
 
void SetTracesSavingConfigs (const Arp::String &triggerSession, const Arp::String &outPath, const Arp::uint32 &maxDirectorySize, const Arp::uint32 &savingDelayTimeout)
 Sets the configuration of the trigger saving function More...
 

Friends

class Singleton< TraceController >
 

Additional Inherited Members

- Static Public Member Functions inherited from Arp::Singleton< TraceController >
static Instance & CreateInstance (Args &&... args)
 Creates this singleton instance. More...
 
static bool IsCreated (void)
 Determines if this singleton instance is create yet. More...
 
static Instance & GetInstance (void)
 Gets a reference of the singleton instance. More...
 
static Instance * GetInstancePtr (void)
 Gets a pointer to the singleton instance. More...
 
static void DisposeInstance (void)
 Disposes this singleton instance. More...
 
- Protected Types inherited from Arp::Singleton< TraceController >
typedef Singleton< TraceController > SingletonBase
 Defines this type to be used from derived classes. More...
 
- Protected Member Functions inherited from Arp::Singleton< TraceController >
 Singleton (void)=default
 The protected default constructor. More...
 
 ~Singleton (void)=default
 The protected default destructor. More...
 
- Static Protected Member Functions inherited from Arp::Singleton< TraceController >
static void SetInstance (Instance *pOther)
 Sets the singleton instance. More...
 
static void AssignInstanceFrom (Instance &other)
 Assigns the singleton instance from another singleton instance of the same type. More...
 

Detailed Description

The TraceController provides an Interface to manage and control the LTTng Tracing on the Control

Member Function Documentation

◆ DestroySession()

bool Arp::System::Commons::Diagnostics::TraceController::DestroySession ( const Arp::String session)

Destroys/Unloads an LTTnG Trace Session

Parameters
sessionName of Session which will be destroyed/unloaded
Returns
True when the the Session is destroyed/unloaded successfull, otherwise false is returned

"VeException: when session does not exist or an lttng-error is occured."

◆ IsSessionDaemonAlive()

bool Arp::System::Commons::Diagnostics::TraceController::IsSessionDaemonAlive ( void  ) const

Checks if the session daemon for tracing is alive.

Returns
True if session daemon is running otherwise false is returned.

◆ IsSessionEnabled()

bool Arp::System::Commons::Diagnostics::TraceController::IsSessionEnabled ( const Arp::String session)

Checks if a trace session is already enabled/started

Parameters
sessionSession Name, which mode will be checked
Returns
True if the session is in enabled/started, otherwise false is returned

"VeException: when session does not exist or an lttng-error is occured."

◆ IsSessionInSnapshotMode()

bool Arp::System::Commons::Diagnostics::TraceController::IsSessionInSnapshotMode ( const Arp::String session)

Checks if a trace session is in Snapshot Mode

Parameters
sessionSession Name, which mode will be checked
Returns
True if the session is in Snapshot Mode, otherwise false is returned

"VeException: when session does not exist or an lttng-error is occured."

◆ IsSessionLoaded()

bool Arp::System::Commons::Diagnostics::TraceController::IsSessionLoaded ( const Arp::String session)

Checks if a trace session is already loaded

Parameters
sessionSession Name, which mode will be checked
Returns
True if the session is in loaded, otherwise false is returned

"VeException: when an lttng-error is occured."

◆ ListSessions()

SessionList Arp::System::Commons::Diagnostics::TraceController::ListSessions ( void  )

Queries a list of loaded LTTng Sessions

Returns
list with names of loaded LTTng Sessions

"VeException: when an lttng-error is occured."

◆ LoadSessionConfiguration()

bool Arp::System::Commons::Diagnostics::TraceController::LoadSessionConfiguration ( const Arp::String session,
const Arp::String config 
)

Tries to loads a configuration file.

Parameters
sessionSession Name, which much be identical with the trace name configured in the .lttng
pathpath to the .lttng configuration file of the session
Returns
True when the session is loaded successfull, otherwise false

"VeException: when session is already loaded or an lttng-error is occured."

◆ LoadTracepointLibrary()

void Arp::System::Commons::Diagnostics::TraceController::LoadTracepointLibrary ( void  )

Loads the userspace Trace-Point-Library

"InvalidConfigException: path to library does not exist." "InvalidOperationException: TracepointLib ist already loaded" "VeException: when an error occured during loading the shared library

◆ SetTracesSavingConfigs()

void Arp::System::Commons::Diagnostics::TraceController::SetTracesSavingConfigs ( const Arp::String triggerSession,
const Arp::String outPath,
const Arp::uint32 maxDirectorySize,
const Arp::uint32 savingDelayTimeout 
)

Sets the configuration of the trigger saving function

Parameters
triggerSessionSession Name, which will be user for the Saving Trigger
outPathOutput path for the Saving Trigger Function
maxDirectorySizeMax Directory Size of the Saving Trigger Output Directory
savingDelayTimeoutTrigger Saving Delay Timeout

◆ StartSession()

bool Arp::System::Commons::Diagnostics::TraceController::StartSession ( const Arp::String session)

Starts an LTTnG Trace Session

Parameters
sessionName of Session which will be started
Returns
True when the the Session is started successfull, otherwise false is returned

"VeException: when session is already started, does not exist or an lttng-error is occured."

◆ StopSession()

bool Arp::System::Commons::Diagnostics::TraceController::StopSession ( const Arp::String session)

Stops an LTTnG Trace Session

Parameters
sessionName of Session which will be stopped
Returns
True when the the Session is stopped successfull, otherwise false is returned

"VeException: when session is already stopped, does not exist or an lttng-error is occured."

◆ TriggerSavingTraceOutputs()

bool Arp::System::Commons::Diagnostics::TraceController::TriggerSavingTraceOutputs ( const bool &  stopTriggerSession)

Records/Saves all outputs of a configured session after an internal timeout delay Session in Snapshotmode: - A session snapshot will be recorded and the snapshot will then moved to the recording output directory.

  • All old outputs will be deleted Session not in Snapshotmode: The Trace session output will be copied to the recording output directory
Returns
True when the recording was successfull, otherwise false is returned

◆ UnloadTracepointLibrary()

void Arp::System::Commons::Diagnostics::TraceController::UnloadTracepointLibrary ( void  )

Unoads the userspace Trace-Point-Library

"VeException: error occured during unloading the lib." "InvalidConfigException: when path to the TracepointLib cannot be resolved" "InvalidOperationException: when a lttng session still running" /exception>


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