From bb970db9124103b94a3553c9c8c26ba9c41c9ac9 Mon Sep 17 00:00:00 2001 From: rapha Date: Sun, 26 Apr 2020 23:35:42 -0300 Subject: [PATCH] add man --- .github/ISSUE_TEMPLATE/bug_report.md | 27 ---------- .github/ISSUE_TEMPLATE/feature_request.md | 20 ------- CHANGELOG.md | 33 ++++++++++++ CONTRIBUTING.md | 63 ++++++++++++++++++++++ Makefile | 20 +++++++ README.md | 28 +++++----- SECURITY.md | 9 ++++ Vagrantfile | 18 +++++++ bashtop => bin/bashtop | 0 doc/bashtop.1 | 62 +++++++++++++++++++++ logo-t.png => img/logo-t.png | Bin main.png => img/main.png | Bin menu.png => img/menu.png | Bin options.png => img/options.png | Bin 14 files changed, 217 insertions(+), 63 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100755 CHANGELOG.md create mode 100755 CONTRIBUTING.md create mode 100755 Makefile create mode 100755 SECURITY.md create mode 100755 Vagrantfile rename bashtop => bin/bashtop (100%) create mode 100644 doc/bashtop.1 rename logo-t.png => img/logo-t.png (100%) rename main.png => img/main.png (100%) rename menu.png => img/menu.png (100%) rename options.png => img/options.png (100%) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 2f8aeaa..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: "[BUG]" -labels: bug -assignees: aristocratos - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Info (please complete the following information):** - - Linux distribution and version - - Bash version (version 4.4 or above is required) - -**Additional context** -$HOME/.config/bashtop/error.log" (enable error-logging in "$HOME/.config/bashtop/bashtop.cfg" if missing) diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 93fb3ff..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: "[REQUEST]" -labels: enhancement -assignees: aristocratos - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100755 index 0000000..71f2b6e --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,33 @@ +# Change Log + +All notable changes to this project will be documented in this file. + +### [v0.8.14](https://github.com/raphaunix/bashtop/releases/tag/v0.8.14) (2020/04/26) +Fixed: runaway array, disks used reporting and increased memory and disks update frequency + +### [v0.8.13](https://github.com/raphaunix/bashtop/releases/tag/v0.8.13) (2020/04/26) +Fixes: get_value() regex, general cleanup and formatting Added: 2 new themes by Daniel Ruiz de Alegría, flat-remix and flat-remix-light + +### [v0.8.12](https://github.com/raphaunix/bashtop/releases/tag/v0.8.12) (2020/04/26) +Fixed: changed remaining ps thcount flags to nlwp + +### [v0.8.11](https://github.com/raphaunix/bashtop/releases/tag/v0.8.11) (2020/04/26) +Fixes: ps flag thcount changed to nlwp for greater compability, regex and float to int rounding fix in get_value() + +### [v0.8.10](https://github.com/raphaunix/bashtop/releases/tag/v0.8.10) (2020/04/25) +Fixes: erroneous regular expressions + +### [v0.8.9](https://github.com/raphaunix/bashtop/releases/tag/v0.8.9) (2020/04/25) +Added: functions is_int, is_flot, is_hex Fixes: error checking on internal functions + +### [v0.8.8](https://github.com/raphaunix/bashtop/releases/tag/v0.8.8) (2020/04/25) +fix: load average max length + +### [v0.8.7](https://github.com/raphaunix/bashtop/releases/tag/v0.8.7) (2020/04/25) +fix: load average clipping, cpu box calculations error + +### [v0.8.6](https://github.com/raphaunix/bashtop/releases/tag/v0.8.6) (2020/04/25) +Added: load average and uptime, Fixes: cohesive window size representation, unset LC_ALL to not override wanted locale, cpu box calculation errors + +### [v0.8.5](https://github.com/raphaunix/bashtop/releases/tag/v0.8.5) (2020/04/24) +fix: cpu frequency and /proc/stat error checks diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100755 index 0000000..8d0e0fc --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,63 @@ +# Contributing + +Ao contribuir com este repositório, por favor, primeiro discuta a mudança que você deseja fazer, seja por PM ou nos canais adequados no slack antes de fazer uma alteração. + +Por favor, note que temos um código de conduta, por favor, siga-o em todas as suas interações com o projeto. + +## Pull Request Process + +--- +name: Feature request +about: Suggest an idea for this project +title: "[REQUEST]" +labels: enhancement +assignees: aristocratos + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. + +## Bug report + +--- +name: Bug report +about: Create a report to help us improve +title: "[BUG]" +labels: bug +assignees: aristocratos + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Info (please complete the following information):** + - Linux distribution and version + - Bash version (version 4.4 or above is required) + +**Additional context** + +```bash +$HOME/.config/bashtop/error.log" (enable error-logging in "$HOME/.config/bashtop/bashtop.cfg" if missing) +``` + +Thanks diff --git a/Makefile b/Makefile new file mode 100755 index 0000000..e5817da --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +PRGM = bashtop +BINDIR ?= $(PREFIX)/bin +PREFIX ?= /usr +SHRDIR ?= $(PREFIX)/share + +install: + @install -Dm755 bin/* -t $(DESTDIR)$(BINDIR) + @install -Dm644 doc/bashtop.1 -t $(DESTDIR)$(SHRDIR)/man/man1 + +clean: + rm -rf /usr/bin/bashtop + rm -rf /usr/share/man/man1/bashtop.1 + clear + +all: install + +uninstall: clean + rm -rf /usr/bin/bashtop + rm -rf /usr/share/man/man1/bashtop.1 + clear \ No newline at end of file diff --git a/README.md b/README.md index eaa9ce5..1f7aec3 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# ![bashtop](logo-t.png) +# ![bashtop](img/logo-t.png) -**Usage:** Linux resource monitor -**Language:** Bash +**Usage:** Linux resource monitor +**Language:** Bash ## Description @@ -40,7 +40,7 @@ Should work on most modern linux distributions with a truecolor capable terminal ## Dependencies -**[bash](https://www.gnu.org/software/bash/)** (v4.4 or later) Script functionality will most probably break with earlier versions. +**[bash](https://www.gnu.org/software/bash/)** (v4.4 or later) Script functionality will most probably break with earlier versions. Bash version 5 is higly recommended to make use of $EPOCHREALTIME variable instead of alot of external date command calls. **[GNU Core Utilities](https://www.gnu.org/software/coreutils/)** @@ -59,14 +59,14 @@ Bash version 5 is higly recommended to make use of $EPOCHREALTIME variable inste ## Screenshots -Main UI showing details for a selected process. -![Screenshot 1](main.png) +Main UI showing details for a selected process. +![Screenshot 1](img/main.png) -Main menu. -![Screenshot 2](menu.png) +Main menu. +![Screenshot 2](img/menu.png) -Options menu. -![Screenshot 3](options.png) +Options menu. +![Screenshot 3](img/options.png) ## Installation @@ -119,22 +119,18 @@ error_logging="true" #### Command line options: (not yet implemented) -``` +```bash USAGE: bashtop - ``` - - ## TODO - - [x] TODO Add options to change colors for text, graphs and meters. - [ ] TODO Add options for resizing all boxes. - [ ] TODO Add command line argument parsing. - [ ] TODO Miscellaneous optimizations and code cleanup. - [ ] TODO Add more commenting where it's sparse. - ## LICENSE + [Apache License 2.0](LICENSE) diff --git a/SECURITY.md b/SECURITY.md new file mode 100755 index 0000000..3cbe1b4 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,9 @@ +# Security + +Our team takes security issues seriously. We appreciate your efforts to disseminate your findings responsibly and will make every effort to correct them. + +## Reporting Security Issues + +To report security problems create an [**issue**](https://github.com/aristocratos/bashtop/issues) add the tag **security** and detail to the maximum, of course. We don't have a badly written issues interpreter or just coherent titles. + +Thanks \ No newline at end of file diff --git a/Vagrantfile b/Vagrantfile new file mode 100755 index 0000000..2734d8f --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,18 @@ +Vagrant.configure("2") do |config| +# config.vm.define "centos" do |centos| +# centos.vm.box = "centos/7" +# centos.vm.network "private_network", ip:"192.168.77.10" +# centos.vm.hostname = "centos" +# end +# config.vm.define "fedora" do |fedora| +# fedora.vm.box = "bento/fedora-31" +# fedora.vm.network "private_network", ip:"192.168.77.11" +# fedora.vm.hostname = "fedora" +# end + config.vm.define "ubuntu" do |ubuntu| + ubuntu.vm.box = "ubuntu/trusty64" + ubuntu.vm.network "private_network", ip:"192.168.77.12" + ubuntu.vm.hostname = "ubuntu" + end + config.vm.provision "file", source: "../bashtop", destination: "/home/vagrant/" +end \ No newline at end of file diff --git a/bashtop b/bin/bashtop similarity index 100% rename from bashtop rename to bin/bashtop diff --git a/doc/bashtop.1 b/doc/bashtop.1 new file mode 100644 index 0000000..88446a6 --- /dev/null +++ b/doc/bashtop.1 @@ -0,0 +1,62 @@ +.\" Manpage for bashtop. +.\" Contact admin@qvantnet.com to correct errors or typos. +.TH man 8 "26 Apr 2020" "v0.8.14" "bashtop man page" +.SH bashtop +Linux resource monitor +.SH SYNOPSIS +bashtop +.SH DESCRIPTION +Resource monitor that shows usage and stats for processor, memory, disks, network and processes. +.SH OPTIONS +.TP +\fB\ Esc, M, m\fR +Shows main menu. +.TP +\fB\ F2, O, o\fR +Shows options. +.TP +\fB\ F1, H, h m\fR +Shows this window. +.TP +\fB\ Ctrl-C, Q, q m\fR +Quits program. +.TP +\fB\ (+, A, a) (-, S, s) m\fR +Add/Subtract 100ms to/from update timer. +.TP +\fB\ Up, Down m\fR +Select in process list. +.TP +\fB\ Enter m\fR +Show detailed information for selected process. +.TP +\fB\ Pg Up, Pg Down m\fR +Jump 1 page in process list. +.TP +\fB\ Home, End m\fR +Jump to first or last page in process list. +.TP +\fB\ Left, Right m\fR +Select previous/next sorting column. +.TP +\fB\ R, r m\fR +Reverse sorting order in processes box. +.TP +\fB\ F, f m\fR +Input a string to filter processes with. +.TP +\fB\ C, c m\fR +Clear any entered filter. +.TP +\fB\ T, t m\fR +Terminate selected process with SIGTERM - 15. +.TP +\fB\ K, k m\fR +Kill selected process with SIGKILL - 9. +.TP +\fB\ I, i m\fR +Interrupt selected process with SIGINT - 2. +.SH BUGS +There are always bugs :P +.SH AUTHOR +Aristocratos (admin@qvantnet.com) \ No newline at end of file diff --git a/logo-t.png b/img/logo-t.png similarity index 100% rename from logo-t.png rename to img/logo-t.png diff --git a/main.png b/img/main.png similarity index 100% rename from main.png rename to img/main.png diff --git a/menu.png b/img/menu.png similarity index 100% rename from menu.png rename to img/menu.png diff --git a/options.png b/img/options.png similarity index 100% rename from options.png rename to img/options.png