mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 21:25:30 +03:00
Merge pull request #7987 from magnetophon/das_watchdog-master
add das_watchdog: a realtime watchdog
This commit is contained in:
commit
43690ae4ee
4 changed files with 69 additions and 0 deletions
|
@ -222,6 +222,7 @@
|
||||||
./services/monitoring/bosun.nix
|
./services/monitoring/bosun.nix
|
||||||
./services/monitoring/cadvisor.nix
|
./services/monitoring/cadvisor.nix
|
||||||
./services/monitoring/collectd.nix
|
./services/monitoring/collectd.nix
|
||||||
|
./services/monitoring/das_watchdog.nix
|
||||||
./services/monitoring/dd-agent.nix
|
./services/monitoring/dd-agent.nix
|
||||||
./services/monitoring/graphite.nix
|
./services/monitoring/graphite.nix
|
||||||
./services/monitoring/monit.nix
|
./services/monitoring/monit.nix
|
||||||
|
|
34
nixos/modules/services/monitoring/das_watchdog.nix
Normal file
34
nixos/modules/services/monitoring/das_watchdog.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# A general watchdog for the linux operating system that should run in the
|
||||||
|
# background at all times to ensure a realtime process won't hang the machine
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
inherit (pkgs) das_watchdog;
|
||||||
|
|
||||||
|
in {
|
||||||
|
###### interface
|
||||||
|
|
||||||
|
options = {
|
||||||
|
services.das_watchdog.enable = mkEnableOption "Whether to enable realtime watchdog";
|
||||||
|
};
|
||||||
|
|
||||||
|
###### implementation
|
||||||
|
|
||||||
|
config = mkIf config.services.das_watchdog.enable {
|
||||||
|
environment.systemPackages = [ das_watchdog ];
|
||||||
|
systemd.services.das_watchdog = {
|
||||||
|
description = "Watchdog to ensure a realtime process won't hang the machine";
|
||||||
|
after = [ "multi-user.target" "sound.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
User = "root";
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = "${das_watchdog}/bin/das_watchdog";
|
||||||
|
RemainAfterExit = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
32
pkgs/tools/system/das_watchdog/default.nix
Normal file
32
pkgs/tools/system/das_watchdog/default.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{ stdenv, fetchgit, libgtop, xmessage, which, pkgconfig }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "das_watchdog-${version}";
|
||||||
|
version = "git-2015-04-02";
|
||||||
|
|
||||||
|
src = fetchgit {
|
||||||
|
url = "https://github.com/kmatheussen/das_watchdog.git";
|
||||||
|
rev = "1c203d9a55455c4670c164f945ea2dd9fd197ba9";
|
||||||
|
sha256 = "c817491d67d31297dcd6177b9c33b5c3977c1c383eac588026631dd6961ba6bf";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ libgtop xmessage which pkgconfig ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin/
|
||||||
|
cp das_watchdog $out/bin/
|
||||||
|
cp test_rt $out/bin/
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = https://github.com/kmatheussen/das_watchdog;
|
||||||
|
description = "A general watchdog for the linux operating system";
|
||||||
|
longDescription = ''
|
||||||
|
It should run in the background at all times to ensure a realtime process
|
||||||
|
won't hang the machine.";
|
||||||
|
'';
|
||||||
|
license = licenses.free;
|
||||||
|
maintainers = [ maintainers.magnetophon ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
|
@ -10664,6 +10664,8 @@ let
|
||||||
inherit (gnome) GConf libglade;
|
inherit (gnome) GConf libglade;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
das_watchdog = callPackage ../tools/system/das_watchdog { };
|
||||||
|
|
||||||
dbvisualizer = callPackage ../applications/misc/dbvisualizer {};
|
dbvisualizer = callPackage ../applications/misc/dbvisualizer {};
|
||||||
|
|
||||||
dd-agent = callPackage ../tools/networking/dd-agent { inherit (pythonPackages) tornado; };
|
dd-agent = callPackage ../tools/networking/dd-agent { inherit (pythonPackages) tornado; };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue