26 #include <RdkPluginBase.h>
38 OOMCrash(std::shared_ptr<rt_dobby_schema>& containerConfig,
39 const std::shared_ptr<DobbyRdkPluginUtils> &utils,
40 const std::string &rootfsPath);
43 inline std::string
name()
const override
63 const std::string mName;
64 std::shared_ptr<rt_dobby_schema> mContainerConfig;
65 const std::string mRootfsPath;
66 const std::shared_ptr<DobbyRdkPluginUtils> mUtils;
Dobby RDK OOMCrash Plugin.
Definition: OOMCrashPlugin.h:36
OOMCrash(std::shared_ptr< rt_dobby_schema > &containerConfig, const std::shared_ptr< DobbyRdkPluginUtils > &utils, const std::string &rootfsPath)
Constructor - called when plugin is loaded by PluginLauncher.
Definition: OOMCrashPlugin.cpp:35
bool readCgroup(unsigned long *val)
Read cgroup file.
Definition: OOMCrashPlugin.cpp:161
bool checkForOOM()
Check for Out of Memory by reading cgroup file.
Definition: OOMCrashPlugin.cpp:201
std::vector< std::string > getDependencies() const override
Should return the names of the plugins this plugin depends on.
Definition: OOMCrashPlugin.cpp:140
bool postInstallation() override
Dobby Hook - run in host namespace once when container bundle is downloaded.
Definition: OOMCrashPlugin.cpp:63
std::string name() const override
Should return the name of the plugin.
Definition: OOMCrashPlugin.h:43
unsigned hookHints() const override
Set the bit flags for which hooks we're going to use.
Definition: OOMCrashPlugin.cpp:53
void createFileForOOM()
Create OOM crash file named oom_crashed_<container_name>.txt on the configured path.
Definition: OOMCrashPlugin.cpp:223
bool postHalt() override
Dobby Hook - Run in host namespace when container terminates.
Definition: OOMCrashPlugin.cpp:96
Basic object that provides the default overrides for a plugin.
Definition: RdkPluginBase.h:34