Code Monkey home page Code Monkey logo

Comments (7)

Jinjinov avatar Jinjinov commented on June 29, 2024

I only tested it on Debian and Ubuntu. There are a lot of system calls to get the hardware info on Linux. Perhaps those calls don't work on Arch.

Take a look at: https://github.com/Jinjinov/Hardware.Info/blob/master/Hardware.Info/Linux/HardwareInfoRetrieval.cs#L271

Does lshw -class disk work in your terminal?

from hardware.info.

misaka00251 avatar misaka00251 commented on June 29, 2024

Yes, it works:

WARNING: you should run this program as super-user.
  *-namespace:0             
       description: NVMe disk
       physical id: 0
       logical name: hwmon2
  *-namespace:1
       description: NVMe disk
       physical id: 2
       logical name: /dev/ng0n1
  *-namespace:2
       description: NVMe disk
       physical id: 1
       bus info: nvme@0:1
       logical name: /dev/nvme0n1
       configuration: wwid=eui.0025388501d2d353
  *-namespace:0
       description: NVMe disk
       physical id: 0
       logical name: hwmon1
  *-namespace:1
       description: NVMe disk
       physical id: 2
       logical name: /dev/ng1n1
  *-namespace:2
       description: NVMe disk
       physical id: 1
       bus info: nvme@1:1
       logical name: /dev/nvme1n1
       configuration: wwid=eui.a428b700a6610041
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.

from hardware.info.

Jinjinov avatar Jinjinov commented on June 29, 2024

well, actually, it doesn't work as it should:
WARNING: you should run this program as super-user.
and
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.
mean that my library can't get the necessary info when running these commands.

did you try running my library as a super user?

from hardware.info.

misaka00251 avatar misaka00251 commented on June 29, 2024

Well I installed a fresh Ubuntu 20.04 and login as root.

The command works fine:

image

While hardwareInfo.DriveList don't:

image

from hardware.info.

Jinjinov avatar Jinjinov commented on June 29, 2024

I will take a look at this.

from hardware.info.

Jinjinov avatar Jinjinov commented on June 29, 2024

I made a new NuGet package version.

https://github.com/Jinjinov/Hardware.Info/releases/tag/v10.0.0.0

I tested it on Ubuntu 20.04 and every list had a Count > 0

from hardware.info.

misaka00251 avatar misaka00251 commented on June 29, 2024

Yeah, the new version works on Ubuntu, guess I just drop support for other distro now 🤣

from hardware.info.

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.