IEEE-VIT / termiboard

A smart CLI Dashboard to fetch cpu, memory and network stats!
MIT License
35 stars 16 forks source link

[Feature] ls* family functions for peripherals #27

Open sjchoure opened 4 years ago

sjchoure commented 4 years ago

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.

DarthBenro008 commented 4 years ago

Sounds good to me @saviourcode , this can be an additional command, let us not show this in the default run, but with a flag command, but do you have any plans for Windows regarding the same? termiboard aims to be multiplatform

sjchoure commented 4 years ago

but do you have any plans for Windows regarding the same? termiboard aims to be multiplatform

Yes, it will support Windows as well. As the *nix has ample sets of command to display system info that's why I quoted those. Otherwise, it will be multiplatform based.

DarthBenro008 commented 4 years ago

@saviourcode you are good to proceed with this issue then. Best of luck :)

sjchoure commented 4 years ago

@DarthBenro008 I would like other contributors as well to help in resolving this issue, as we have got many *nix like commands to display system info.

DarthBenro008 commented 4 years ago

Sure! any interested contributor will be assigned and you can keep everyone updated on this thread

sjchoure commented 4 years ago

@DarthBenro008 Can you please review PR #38 in which it promises to list PCI Bus Devices.

sjchoure commented 4 years ago

@DarthBenro008 I found a way to list PCI devices on Windows Platform and provide the output as you mentioned in #38 PCI Query

The best part is it returns the Status of those devices as well.

sjchoure commented 4 years ago

@DarthBenro008 For reference: Win32_PnPEntity Shall I go ahead? and To Query it, I am using StackExchange/wmi

DarthBenro008 commented 4 years ago

@saviourcode this does look promising, you could do a GOOS check and run the wmi query. What i plan to do is, when termiboard is ran without any command flag, this won't be shown, however when the flag --all or the flag --show-pci is passed this output will be really nice, also do you think you can print similar table for Linux too? as it would be consistent across all OS

sjchoure commented 4 years ago

@DarthBenro008 Yes, for Linux it is more than easy I will say. Windows was a hard nut to crack, I had to go through whole Microsoft docs to check how exactly Windows manages hardware and found WMI for it.

DarthBenro008 commented 4 years ago

@saviourcode haha, a small tip of advice, Golang is a cross-platform language and was designed keeping that in mind, hence you will always find a support to interact with Windows API's from GoLang. eg: "golang.org/x/sys/windows" lets you directly talk to Windows API's by a dll interaction. What you could do is, create a PR when the base command is ready both for windows and Linux (wmi for win and lspci logic for linux) and then lets focus on making them robust. Do let me know if you would require any help!

sjchoure commented 4 years ago

@DarthBenro008 Yeah sure, Let's make the most robust CLI app for System Status. And thank you so much for your valuable advice, really found it helpful. 👍

sjchoure commented 4 years ago

@DarthBenro008 Check this out! List PCI Devices in:

./termiboard --pci-devices
  1. Linux Linux
  2. Windows windows

Will call it a day 👍 , Going back to sleep. Will soon create a PR after adding necessary comments.

P.S.: @aryan9600 It's Tabular now! 😄

sjchoure commented 4 years ago

@DarthBenro008 @aryan9600 When is the refactored code releasing? Many of us are eager to work on this project and have lots and lots of ideas to add new features :)

Also, I wanted to bring in notice that, there have been few updates to the rules of Hacktoberfest.

  1. The repository which is participating is needed to have a "hacktoberfest" as a topic to opt-in.
  2. Or else, the maintainers of the repo can add, "hacktoberfest-accepted" label to the submitted PRs.

Reference: newrules

DarthBenro008 commented 4 years ago

@saviourcode the refactored code will be released in a dev branch in few more days. Glad to know you are eager to work on this project!

This is the very same reason some PRs are put on hold.

Yes, we are aware of the update of rules regarding the Hactoberfest Challenge and will update the repo soon to abide by the rules.

aryan9600 commented 4 years ago

@saviourcode Thank you for your amazing contributions to this repository. We are looking forward to more of them! 💯

sjchoure commented 4 years ago

@DarthBenro008 Sounds Great! :+1: @aryan9600 Thanks a lot really appreciate it.