summary refs log tree commit diff
path: root/pkgs/tools/filesystems/ioztat/default.nix
blob: e87b96482c69d967e8eee88b8daa23b6821fc296 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{ lib
, stdenv
, fetchFromGitHub
, installShellFiles
, python3
}:

stdenv.mkDerivation rec {
  pname = "ioztat";
  version = "1.1.0";

  src = fetchFromGitHub {
    owner = "jimsalterjrs";
    repo = "ioztat";
    rev = "v${version}";
    sha256 = "wDRcFlXmXTc1J9MQZqILfPp5jUhX6wW4nOnqspIWVjQ=";
  };

  nativeBuildInputs = [ installShellFiles ];
  buildInputs = [ python3 ];

  prePatch = ''
    patchShebangs .
  '';

  installPhase = ''
    mkdir -p $out/bin
    cp ioztat $out/bin

    if [ -f ioztat.8 ]; then
      installManPage ioztat.8
    fi
  '';

  meta = with lib; {
    inherit version;
    inherit (src.meta) homepage;
    description = "A storage load analysis tool for OpenZFS";
    longDescription = ''
      ioztat is a storage load analysis tool for OpenZFS. It provides
      iostat-like statistics at an individual dataset/zvol level.

      The statistics offered are read and write operations per second, read and
      write throughput per second, and the average size of read and write
      operations issued in the current reporting interval. Viewing these
      statistics at the individual dataset level allows system administrators
      to identify storage "hot spots" in larger multi-tenant
      systems -- particularly those with many VMs or containers operating
      essentially independent workloads.
    '';
    license = licenses.bsd2;
    platforms = with platforms; linux ++ freebsd;
    maintainers = with maintainers; [ numinit ];
  };
}