GithubHelp home page GithubHelp logo

ieee-vit / termiboard Goto Github PK

View Code? Open in Web Editor NEW
35.0 4.0 15.0 173 KB

A smart CLI Dashboard to fetch cpu, memory and network stats!

License: MIT License

Go 90.05% Makefile 9.95%
golang cli terminal cpu-monitoring memory-monitoring system cli-dashboard

termiboard's Introduction

Termiboard

Open Source Love svg1 GitHub license GitHub go.mod Go version of a Go module GitHub Workflow Build Passing GitHub Open Issues PRs Welcome

The cross platform CLI Dashboard which shows all your system stats and info in an instant.

Getting Started

  • Fork it.

  • Clone your forked repo and move inside it:

git clone https://github.com/<your-github-username>/termiboard.git && cd termiboard

  • Checkout to a new branch to work on an issue:

git checkout -b my-amazing-feature

  • Run termiboard
go run .
  • Build termiboard
go build
./termiboard
  • Once you're all done coding, it's time to open a PR :) Run the following commands from the root of the project directory:

git add .

git commit -m "A short description about the feature."

git push origin <my-amazing-feature>

Open your forked repo in your browser and then raise a PR to the master branch of this repository!

Usage

Once the executable file is created, the program can be executed as:

Without Flag Options

This will by default show all the parameters of the System.

./termiboard

Output:
Complete Output SS

With Flag Options

If the flag options are passed, then the specific parameters of the System will be displayed.

./termiboard --cpu-usage

Output:
CPU Info Output SS

All Available Options

./termiboard --help
Flag Function
--all Show all stats
--cpu-info Show CPU information
--cpu-usage Show CPU usage
--disk Show disk usage
--local-ip Show local IP address
--public-ip Show public IP address
--ram Show RAM usage
--top5-ram Show top 5 process that consume the most memory

Contributing

To start contributing, check out CONTRIBUTING.md. New contributors are always welcome to support this project. Kindly consider leaving a โญ if you like the project :)

License

This project is licensed under MIT.

termiboard's People

Contributors

0vj avatar arrwhidev avatar aryan9600 avatar darthbenro008 avatar mayankshah1607 avatar s-maciejewski avatar scanepa avatar sjchoure avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

termiboard's Issues

[Feature] Show top 5 process that consume the most memory at time of execution

Please describe the feature you want this project to offer
It would be nice if termiboard shows top 5 process that's consuming ram the most.

Describe the solution you'd like
Implementation of GetTopProcesses() function in memory.go file

Describe alternatives you've considered (Optional)
You can try achieving this using gopsutil library that this project is already dependent on.

[Feature] Moving all Flag Options to it's own new file

Please describe the feature you want this project to offer
All the flag options and variables are in main.go among other functions. Thus reducing the readability of the code inside the main.go.

In the light of separating the specification and implementation, we would like to create a new separate file for all the flag options and it's variable, making the main function more readable.

Describe the solution you'd like

  1. vim/nano flag.go
  2. Move all flag helper variables and functions to this new file
  3. :wq / (^x and then y)
  4. Call the new initflag function inside main.go

Additional context
Readability and Maintainability of code increases

[Feature] ls* family functions for peripherals

Please describe the feature you want this project to offer
The current scope of the program is limited to the CPU, the Memory, and the Network status.
If the developers are in agreement to widen up the scope of the program to check the status of peripheral devices like Devices connected to PCI Bus, or USB Port then we all can contribute to it.

Describe the solution you'd like
The ls* GNU/Linux equivalent type of functions for peripherals, such as:

lspci equivalent function in Golang for querying PCI Devices
GithubIssue2

or lsusb equivalent function in Golnag for querying USB Devices
Net

Additional context
If this issue is in line with the maintainers of this repository, then I will like other previous contributors to also participate and comment their suggestion in adding more functionality to the current program.

[Feature] Show taken ports

Please describe the feature you want this project to offer
The application should display the information about taken ports (and processes that occupy them , but perhaps this should be a separate issue)

Describe the solution you'd like
As written above, perhaps this functionality could be selected using flags for the app (separate issue for implementing commandline arguments handling?)

[Feature] Disk Usage Stats

Please describe the feature you want this project to offer
It would be nice to have disk stats show up in termiboard.

Describe the solution you'd like
Implement the GetDiskUsage() method in the memory.go file.

Describe alternatives you've considered (Optional)
You could use the gopsutil library to achieve this

[Feature] Flags to hide header and version

Please describe the feature you want this project to offer
PR's funtionality should base on 3 flags:

  • 1 to hide header
  • 1 to hide version
  • 1 to hide them both

Describe the solution you'd like
They should be implemented in the same way as other flags and conditions to show header and version should be updated from true.

Describe alternatives you've considered (Optional)
A clear and concise description of any alternative solutions or features you've considered.

Additional context (Optional)
Add any other context or screenshots about the feature request here.

Additional context
Add any other context or screenshots about the feature request here.

disclaimer: I don't want to be assigned for now

[Feature] Display local IP address

Please describe the feature you want this project to offer
It would be nice if termiboard can show the local IP address that the computer is currently connected to.

Describe the solution you'd like
You can implement the GetLocalIPAddress() function in the network.go file. Make sure to handle if the computer isn't connected to a network!

[Feature] Show cpu temperature

Please describe the feature you want this project to offer
Show CPU temperature of the computer.

Describe the solution you'd like
Implement GetCpuTemperature() of cpu.go file.

[BUG] Process with PID: 0 access denied as it is system idle process in Windows

Describe the bug
Since the PID of system processes in Windows and Unix differ, for example,
PID 0 and PID 1 in *nix are given to the Scheduler and the Init Process respectively. Note: Unix PID starts from 1
PID 0 and PID 4 in Windows are given to the System Idle Process and the Init Process respectively. Note: Windows PID starts from 4

So, the System Idle Process in Windows is generally not accessible by the userland programs not even by the administrative privileges.

To Reproduce
Steps to reproduce the behavior:

  1. Run the current program in Windows and the Output is as follows:
    Githubwin

Expected behavior

  1. Running the same program in *nix based OS gave the desired Output.
    GithubNewIssue

Additional context (Optional)
The solution is to slice off the PID = 0 if present in the Processes Slice inside the memory.go file. This result in the desired output without the error as follows:

Github Issue
Note: We still require to "Run as an Admin" to get the desired result

[BUG] GetTopProcesses does not work on Windows

Describe the bug
An error occurs when running termiboard on Windows, process finishes with exit code 2.
The error:

Could not retrieve memory usage details.
panic: The parameter is incorrect.

goroutine 1 [running]:
main.GetTopProcesses.func1(0x0, 0x24, 0xc0000926c0)
	memory.go:57 +0x1c5
sort.medianOfThree_func(0xc00010fe48, 0xc0000926c0, 0x0, 0x24, 0x48)
	go/current/src/sort/zfuncversion.go:53 +0x45
sort.doPivot_func(0xc00010fe48, 0xc0000926c0, 0x0, 0x121, 0x18, 0xc0000926a0)
	go/current/src/sort/zfuncversion.go:76 +0x4fc
sort.quickSort_func(0xc00010fe48, 0xc0000926c0, 0x0, 0x121, 0x12)
	go/current/src/sort/zfuncversion.go:143 +0xa6
sort.Slice(0x118dd60, 0xc0000926a0, 0xc00010fe48)
	go/current/src/sort/slice.go:17 +0xfa
main.GetTopProcesses()
	memory.go:53 +0xe7
main.main()
	main.go:59 +0x4e3

To Reproduce
Steps to reproduce the behavior:

  1. Run termiboard on Windows

Expected behavior
Program should finish with exit code 0 and top processes should be displayed

[Feature] To obtain the public IP address of the computer.

Please describe the feature you want this project to offer
To display the public IP address of the computer at time of termiboard execution.

Describe the solution you'd like
Implement the GetPublicIPAddress() function of the network.go file.

Describe alternatives you've considered (Optional)
You can make a small network call/ping that returns your public IP address as a response.

[Feature] Adding Network Interface Name along with the Local IPv4 Addresses

Please describe the feature you want this project to offer
The current output of the program for the Local IP Address is as:
GitHubIssue

Describe the solution you'd like

Along with the IP Address, we could Specify the Network Interface name as

  1. Ethernet: 192.168.30.1/24
  2. Wifi: 192.168.1.20/24

Additional context
This will make Identifying the IP of each interface simple

[Feature] Show CPU Usage

Please describe the feature you want this project to offer
Show CPU Usage at termiboard execution in percentage.

Describe the solution you'd like
Implementation of GetCpuUsage() in ``cpu.go``` file.

Describe alternatives you've considered (Optional)
You can leverage the gopsutil library.

[Feature] To check if common ports are free.

Please describe the feature you want this project to offer
To check if a set of ports are available and free at time of termiboard execution.

Eg: to check common ports such as 80,443,3000,5000,5432,27017,8080,8000 are available

Describe the solution you'd like
Implement the PortChecker() function in the network.go file.

[BUG] Ram Available actually showing used RAM

Describe the bug
The "Ram Available" displayed is the amount of currently used RAM

To Reproduce
Run termiboard and investigate the "Ram Available"

Expected behavior
"Ram Available" should instead display an actual amount of available RAM memory

[Feature] Add Makefile

Please describe the feature you want this project to offer
A makefile abstracting away all the commands associated with fiddling around with this project like building, testing, running, etc.

Describe the solution you'd like
Makefile added and corresponding documentation for it

[Feature] Updating README.md with the new section for flag options

Please describe the feature you want this project to offer
After adding the flag parsing functionality to the program, the README.md file does not reflect the usage of it, as was done in PR #17

Describe the solution you'd like
We can have a proper section for the usage of this program, such as an example block in the README.md file

[Feature] Better styling for "Top 5 processes by memory usage"

Please describe the feature you want this project to offer
Improve the visuals of "Top 5 processes by memory usage" by making their style consistent with the rest of application's output.

Describe the solution you'd like
I would add indentation to the list of processes. "PID:" could be bolded. '%' sign could be moved to the end of the line

Describe alternatives you've considered (Optional)
A clear and concise description of any alternative solutions or features you've considered.

Additional context (Optional)
Add any other context or screenshots about the feature request here.

Additional context
Add any other context or screenshots about the feature request here.
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.