pull/43/head
rapha 2020-04-26 23:35:42 -03:00
parent 38863bd607
commit bb970db912
14 changed files with 217 additions and 63 deletions

View File

@ -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)

View File

@ -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.

33
CHANGELOG.md Executable file
View File

@ -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

63
CONTRIBUTING.md Executable file
View File

@ -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

20
Makefile Executable file
View File

@ -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

View File

@ -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)

9
SECURITY.md Executable file
View File

@ -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

18
Vagrantfile vendored Executable file
View File

@ -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

62
doc/bashtop.1 Normal file
View File

@ -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)

View File

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

Before

Width:  |  Height:  |  Size: 147 KiB

After

Width:  |  Height:  |  Size: 147 KiB

View File

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 109 KiB

View File

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 119 KiB