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

dmidecode is not easily parseable... Possible option to allow for JSON output? #4

Open
colton22 opened this issue Dec 13, 2018 · 3 comments

Comments

@colton22
Copy link

Hello! I am wondering how hard it would be to write this so it can output JSON if triggered by a --json option? Has this been tried before? Any insight?

Thanks!

CR

@IAXES
Copy link

IAXES commented Jan 13, 2020

Hello! I am wondering how hard it would be to write this so it can output JSON if triggered by a --json option? Has this been tried before? Any insight?

Thanks!

CR

I've brought this up recently in the mailing list on nongnu.org.

https://lists.gnu.org/archive/html/dmidecode-devel/2020-01/msg00000.html

It should be straightforward to implement, but I'll need to hear back from the maintainers first to make sure they're on board with either an additional flag or an additional binary (since the tool would now rely on additional external libraries). Worst case scenario, I could fork the project via Github and make the change, but I really would like to avoid that route.

@dszidi
Copy link

dszidi commented Apr 1, 2021

I have a WIP branch that creates a json flag. It is ugly but it's a start. It also doesn't require additional libraries. I'd be happy to fix it up as long as the project is interested in this feature. I'll happily make whatever adjustments the project devs require to get dmidecode to output JSON and XML. Hopefully they'll respond in here.

image

@jrgerber
Copy link

jrgerber commented May 8, 2021

We are actively working on a cross-platform version of dmidecode in Rust and a JSON switch was added today:
https://github.com/jrgerber/dmidecode-rs

In the Unix realm it is tested on Linux and FreeBSD, beyond those two we need help and feedback for other Unix flavors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants