Giter Site home page Giter Site logo

karlheinzkurt / zock-zilla Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 1.0 218 KB

Daemon to monitor runtime of processes and to terminate related processes when limits exceed (Games - Do you know that? Your son is trying to play all day long...)

License: GNU General Public License v3.0

CMake 5.58% C++ 92.79% Shell 1.63%
cpp cpp14 cmake conan

zock-zilla's Introduction

build

ZockZilla

Daemon to monitor runtime of processes. When limits get exceeded, processes and matching child processes will be terminated. They are terminated again when they are restarted in the configured amount of time.

Collected information can be written into InfluxDB via cpprestsdk to be able to use Grafana to create nice dashboards and to send notification e.g.

ToDo

  • Port of the system interaction for Windows. In general, the system interactions are cleanly separated from the business logic by interfaces, but there is no time to implement it right now.

Configure

It's possible to configure processes to be observed and their limits and implications. Observed processes can be matched with whitelist and blacklist patterns. See some defaults as an example here: gsc.config.xml

vim /usr/share/gsc/gsc.config.xml
...

Enable and run the daemon

sudo systemctl --system daemon-reload
sudo systemctl enable gsc
sudo systemctl start gsc

Build it locally

When the prebuild debian package is not sufficiant only.

Requirements

(boost, cpprestsdk, gtest gets installed via conan)

apt-get -y install gcc cmake make liblog4cxx-dev python3-pip python3-setuptools python3-wheel ... maybe something more
pip3 install conan

Build Instructions

mkdir build
pushd build

# Install dependencies
#
conan install --build missing ../
#
# OR maybe when you get linker errors and you are using gcc
conan install --build=missing ../ -s compiler.libcxx=libstdc++11

# Build lib, executable and tests
#
cmake -DCMAKE_BUILD_TYPE=Release ../source
cmake --build . --config Release -- -j

# Run tests
#
bin/gsclib.test

popd

Create a package for Debian like systems, check and install it

pushd build

cpack
dpkg --contents gsc*.deb

# Install package when satisfied
#
sudo dpkg -i gsc*.deb

popd

zock-zilla's People

Contributors

karlheinzkurt avatar

Watchers

 avatar  avatar  avatar

Forkers

sunyv

zock-zilla's Issues

Replace log4cxx by log4cplus

Since log4cxx is not available as a conan package and last changes are several years ago, it should be replaced by a framework actively developed and integrated into modern tooling world.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.