Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement PCI module on Windows #322

Open
fangdichan opened this issue May 27, 2022 · 6 comments
Open

implement PCI module on Windows #322

fangdichan opened this issue May 27, 2022 · 6 comments

Comments

@fangdichan
Copy link

I try this on win10, but it gives me that error: pciFillInfo not implemented on windows

@R4v3nl0
Copy link

R4v3nl0 commented Aug 30, 2022

Same on windows 11.

@ffromani
Copy link
Collaborator

Hi @fangdichan this is unfortunately not a bug but an implementation gap. We would need contribution to enable the PCI device lookup on windows, because none of active contributors is a windows user.

@allberson
Copy link

@fromanirh is there some prevision on when this functionality will be available? Is there a way to run ghw on windows whithout the implementation of pciFillInfo?

@ffromani
Copy link
Collaborator

@fromanirh is there some prevision on when this functionality will be available? Is there a way to run ghw on windows whithout the implementation of pciFillInfo?

AFAIK noone is working on this, but we'll gladly accept patches (cc @jaypipes ). You can totally use parts of ghw on windows, for some of them there is already support on windows, and what's supported will be kept.

@allberson
Copy link

@fromanirh sorry for the inconvenience, but how to I compile (make) ghw without specific modules, like pciFillInfo?

@ffromani
Copy link
Collaborator

ffromani commented Sep 29, 2022

@fromanirh sorry for the inconvenience, but how to I compile (make) ghw without specific modules, like pciFillInfo?

no problem at all :)
if you import the ghw packages in your project, you can just import the packages you need [1]
If you need to use the ghwc tool - https://github.com/jaypipes/ghw/tree/main/cmd/ghwc you can't compile out packages yet, but you can use some of the subcommands, for example cpu and they should work on windows.
Unfortunately I don't have a list handy of what works on windows, being myself a linux user.[2]

+++

[1] 
import (
	"github.com/jaypipes/ghw/pkg/cpu"
	"github.com/jaypipes/ghw/pkg/option"
)

[2]
$ go run cmd/ghwc/main.go  help

          __
 .-----. |  |--. .--.--.--.
 |  _  | |     | |  |  |  |
 |___  | |__|__| |________|
 |_____|

Discover hardware information.

https://github.com/jaypipes/ghw

Usage:
  ghwc [flags]
  ghwc [command]

Available Commands:
  baseboard   Show baseboard information for the host system
  bios        Show BIOS information for the host system
  block       Show block storage information for the host system
  chassis     Show chassis information for the host system
  cpu         Show CPU information for the host system
  gpu         Show graphics/GPU information for the host system
  help        Help about any command
  memory      Show memory information for the host system
  net         Show network information for the host system
  pci         Show information about PCI devices on the host system
  product     Show product information for the host system
  topology    Show topology information for the host system
  version     Display the version of gofile

Flags:
      --debug           Enable or disable debug mode
  -f, --format string   Output format.
                        Choices are 'json','yaml', and 'human'. (default "human")
  -h, --help            help for ghwc
      --pretty          When outputting JSON, use indentation

Use "ghwc [command] --help" for more information about a command.

@jaypipes jaypipes changed the title ghw.PCI throw an exception “pciFillInfo not implemented on windows” implement PCI module on Windows Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants