summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2012-08-25 21:24:17 +0400
committerMichael Raskin <7c6f434c@mail.ru>2012-08-25 21:24:17 +0400
commit2ab159451230b2a41502ef2a08497a8f37d09875 (patch)
treeaa817263f69272f23f417b8a8b71d68bc803545b
parentca3f140e9b16905005f5ad0121bab1d5db511259 (diff)
downloadnixlib-2ab159451230b2a41502ef2a08497a8f37d09875.tar
nixlib-2ab159451230b2a41502ef2a08497a8f37d09875.tar.gz
nixlib-2ab159451230b2a41502ef2a08497a8f37d09875.tar.bz2
nixlib-2ab159451230b2a41502ef2a08497a8f37d09875.tar.lz
nixlib-2ab159451230b2a41502ef2a08497a8f37d09875.tar.xz
nixlib-2ab159451230b2a41502ef2a08497a8f37d09875.tar.zst
nixlib-2ab159451230b2a41502ef2a08497a8f37d09875.zip
Atop: add package (atop is one more load monitor)
-rw-r--r--pkgs/os-specific/linux/atop/default.nix39
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/atop/default.nix b/pkgs/os-specific/linux/atop/default.nix
new file mode 100644
index 000000000000..0e2df1e25fb0
--- /dev/null
+++ b/pkgs/os-specific/linux/atop/default.nix
@@ -0,0 +1,39 @@
+{stdenv, fetchurl, zlib, ncurses}:
+
+stdenv.mkDerivation rec {
+  version = "1.27-3";
+  name = "atop-${version}";
+
+  src = fetchurl {
+    url = "http://www.atoptool.nl/download/atop-${version}.tar.gz";
+    sha256 = "bce36e0b50f0e03995d86d25dbc9ab4a289f6755ce3558844f96d41b0bba563f";
+  };
+
+  buildInputs = [zlib ncurses];
+
+  makeFlags = [
+    ''SCRPATH=$out/etc/atop''
+    ''LOGPATH=/var/log/atop''
+    ''INIPATH=$out/etc/rc.d/init.d''
+    ''CRNPATH=$out/etc/cron.d''
+    ''ROTPATH=$out/etc/logrotate.d''
+  ];
+
+  preConfigure = ''
+    sed -e "s@/usr/@$out/@g" -i $(find . -type f )
+    sed -e "/mkdir.*LOGPATH/s@mkdir@echo missing dir @" -i Makefile
+    sed -e "/touch.*LOGPATH/s@touch@echo should have created @" -i Makefile
+    sed -e 's/chown/true/g' -i Makefile
+    sed -e '/chkconfig/d' -i Makefile
+  '';
+
+  meta = {
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = with stdenv.lib.maintainers; [raskin];
+    description = ''Console system performance monitor'';
+
+    longDescription = ''
+      Atop is an ASCII full-screen performance monitor that is capable of reporting the activity of all processes (even if processes have finished during the interval), daily logging of system and process activity for long-term analysis, highlighting overloaded system resources by using colors, etc. At regular intervals, it shows system-level activity related to the CPU, memory, swap, disks and network layers, and for every active process it shows the CPU utilization, memory growth, disk utilization, priority, username, state, and exit code.
+    '';
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 0987fcfae24b..aa88a26c7a73 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -5475,6 +5475,8 @@ let
     inherit (perlPackages) LocaleGettext TermReadKey RpcXML;
   };
 
+  atop = callPackage ../os-specific/linux/atop { };
+
   b43Firmware_5_1_138 = callPackage ../os-specific/linux/firmware/b43-firmware/5.1.138.nix { };
 
   b43FirmwareCutter = callPackage ../os-specific/linux/firmware/b43-firmware-cutter { };