2022-02-21 08:47:16 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ioztat";
|
2022-03-10 19:12:11 +00:00
|
|
|
version = "2.0.1";
|
2022-02-21 08:47:16 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jimsalterjrs";
|
|
|
|
repo = "ioztat";
|
|
|
|
rev = "v${version}";
|
2022-03-10 19:12:11 +00:00
|
|
|
sha256 = "sha256-8svMijgVxSuquPFO2Q2HeqGLdMkwhiujS1DSxC/LRRk=";
|
2022-02-21 08:47:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
buildInputs = [ python3 ];
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-03-10 19:12:11 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -vDt $out/bin -m 0555 ioztat
|
2022-02-21 08:47:16 +00:00
|
|
|
|
|
|
|
if [ -f ioztat.8 ]; then
|
|
|
|
installManPage ioztat.8
|
|
|
|
fi
|
2022-03-10 19:12:11 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2022-02-21 08:47:16 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "ioztat";
|
2022-02-21 08:47:16 +00:00
|
|
|
};
|
|
|
|
}
|