diff --git a/Makefile b/Makefile index 10073f7..274a883 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,15 @@ TARGET = diskgraph SRC = diskgraph.c OBJ = $(SRC:.c=.o) +DISTFILES=\ +Makefile \ +diskgraph.c \ +diskgraph.1 \ +README.md \ +LICENSE \ +images \ +debian + all: $(TARGET) $(TARGET): $(OBJ) @@ -17,3 +26,19 @@ $(TARGET): $(OBJ) clean: $(RM) *.o $(TARGET) @echo All clean + +install: diskgraph + install -d ${DESTDIR}/usr/bin + install -m 755 diskgraph ${DESTDIR}/usr/bin/ + +uninstall: + rm -f ${DESTDIR}/usr/bin/distgraph + +tarball: + tar cvzf ../diskgraph_1.0.orig.tar.gz $(DISTFILES) + +packageupload: + debuild -S + debsign ../diskgraph_1.0-1_source.changes + dput ppa:b-stolk/ppa ../diskgraph_1.0-1_source.changes + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..2a59a2a --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +diskgraph (1.0-1) kinetic; urgency=medium + + * Initial release. + + -- Bram Stolk Wed, 07 Sep 2022 17:24:00 -0700 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..2ed2f3c --- /dev/null +++ b/debian/control @@ -0,0 +1,15 @@ +Source: diskgraph +Section: contrib/utils +Priority: optional +Maintainer: Bram Stolk +Rules-Requires-Root: no +Build-Depends: + debhelper-compat (= 13) +Standards-Version: 4.6.1 +Homepage: https://github.com/stolk/diskgraph + +Package: diskgraph +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Graphs live view of R/W bandwidth of a disk drive. + Shows a live graph of the R/W bandwidth of a disk drive along with how many IO operations are in flight. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..a94eac7 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,31 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: diskgraph +Upstream-Contact: Bram Stolk +Source: https://github.com/stolk/diskgraph + +Files: * +Copyright: 2021-2022 Bram Stolk +License: MIT + +License: MIT + MIT License + . + Copyright (c) 2022 Bram Stolk + . + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. diff --git a/debian/diskgraph.manpages b/debian/diskgraph.manpages new file mode 100644 index 0000000..54b8f84 --- /dev/null +++ b/debian/diskgraph.manpages @@ -0,0 +1 @@ +diskgraph.1 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..6085d9a --- /dev/null +++ b/debian/rules @@ -0,0 +1,20 @@ +#!/usr/bin/make -f + +# Output every command that modifies files on the build system. +export DH_VERBOSE = 1 + + +# See FEATURE AREAS in dpkg-buildflags(1). +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# See ENVIRONMENT in dpkg-buildflags(1). +# Package maintainers to append CFLAGS. +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# Package maintainers to append LDFLAGS. +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + + +%: + dh $@ + + diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/diskgraph.1 b/diskgraph.1 new file mode 100644 index 0000000..701c952 --- /dev/null +++ b/diskgraph.1 @@ -0,0 +1,37 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" (C) Copyright 2022 Bram Stolk , +.\" +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH DISKGRAPH 1 "September 7 2022" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +diskgraph \- program to graph disk activity +.SH SYNOPSIS +.B diskgraph /dev/nvme0n1 +.SH DESCRIPTION +This manual page documents the +.B diskgraph +command. +.PP +\fBdiskgraph\fP is a program that that shows a live graph of disk activity. +.br +It shows the READ bandwidth, the WRITE bandwith and the number of operations that are in flight. +.br +.SH ARGUMENTS +The first and only parameter is a disk device like /dev/sda or /dev/nvme0n1 or similar. +.br +.SH SEE ALSO +.br