Giter Site home page Giter Site logo

Comments (3)

stellarpower avatar stellarpower commented on June 16, 2024

Looks related to #554, but not sure if that fixes both issues or not as it seemed a distinct problem.

from jc.

kellyjonbrazil avatar kellyjonbrazil commented on June 16, 2024

Hi there! It doesn't look like this output is supported by the lspci parser. The parser should be used with at least the -mmv arguments. The JSON output will be an array of objects with consistently named keys. The keys will not be named by the bus-id:

    $ lspci -nnmmv | jc --lspci -p
    [
      {
        "slot": "ff:02:05.0",
        "domain": "ff",
        "domain_int": 255,
        "bus": "02",
        "bus_int": 2,
        "dev": "05",
        "dev_int": 5,
        "function": "0",
        "function_int": 0,
        "class": "SATA controller",
        "class_id": "0106",
        "class_id_int": 262,
        "vendor": "VMware",
        "vendor_id": "15ad",
        "vendor_id_int": 5549,
        "device": "SATA AHCI controller",
        "device_id": "07e0",
        "device_id_int": 2016,
        "svendor": "VMware",
        "svendor_id": "15ad",
        "svendor_id_int": 5549,
        "sdevice": "SATA AHCI controller",
        "sdevice_id": "07e0",
        "sdevice_id_int": 2016,
        "physlot": "37",
        "progif": "01",
        "progif_int": 1
      },
      ...
    ]

Please see jc --help --lspci for mor information. Thanks!

from jc.

stellarpower avatar stellarpower commented on June 16, 2024

Ah okay, thanks. I did see that, but when I looked because I didn't put the grep in the middle or because this filtered out all the other information when using those flags, the slot numbers seemed wildly different from the entries under /sys/bus/pci/devices, and the vendor codes etc. weren't much use to me. So I figured the slot number must be something different form the logical address (these all start with 0 in the sysfs directory too, so I was looking for that). I must have misscanned them when looking through the output as there are obviously many devices it returns back.

Guess it'd be nice to support (or throw an exception if it's not really parseable), but this one's on me so feel free to close.

Thanks!

from jc.

Related Issues (20)

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.