dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.25k stars 4.73k forks source link

Support System.Management on Linux using WMI system bus available in Linux kernel 4.13 #23918

Open 4creators opened 7 years ago

4creators commented 7 years ago

Effort to bring System.Management to .NET Core is bringing it's first results see PR dotnet/corefx#24719 and it could be a good opportunity to investigate possibility to support this library on Linux. This is becoming possible due to continuous work on implementing CIM and WMI infrastructure in Linux kernel see Windows Management Instrumentation Now A Formal Bus With Linux 4.13. The requests for hardware query APIs are not that uncommon see dotnet/runtime#22948

danmoseley commented 7 years ago

We would potentially be interested in contributions to add Linux support for the existing WMI surface area. We don't plan to modify the surface area though: this is quite an old API.

4creators commented 7 years ago

Linking issue to umbrella System.Managment porting issue dotnet/runtime#19785

jeff-powell commented 6 years ago

It would definitely be nice to have the ability to issue remote WQLs for performance monitoring, etc. from a Linux system. .Net really only provides a couple options, CimSession (in MS.Mgmt.Infrastructure) or ManagementScope here in System.Management.

I would be willing to jump in and help build this out; does anyone have an ideal of what level of involvement this will require?

tomfricker commented 5 years ago

Support for WMI in Linux would be extremely useful for a current project. Currently creating a console based app that scans a network looking for management information to investigate security flaws, such as out of date software. Linux was first choice due to lightweight server deployment with no need for front end.

KamranShahid commented 5 years ago

Some one know any third party module/nuget package which will help extracting hardware info of linux system?

danmoseley commented 5 years ago

I have seen two requests in this area

  1. Run WMI queries across a network from an app running on Linux
  2. Use WMI to interrogate Linux hardware /OS

Can someone more familiar with the various 3rd party libraries, kernel support etc tell me whether those should be tracked as separate issues?

tomfricker commented 5 years ago

I have seen two requests in this area

  1. Run WMI queries across a network from an app running on Linux
  2. Use WMI to interrogate Linux hardware /OS

Can someone more familiar with the various 3rd party libraries, kernel support etc tell me whether those should be tracked as separate issues?

Just to confirm my request is for no. 1 out of these two options.

jongleur1983 commented 5 years ago

I'd like to see no. 2.

KamranShahid commented 5 years ago

I would also like to see no. 2. Even if somebody point me to third party nuget package then it will also be helpful

gerwim commented 5 years ago

Same here. Having a platform independent package to query hardware information would be great.

M05pr1mty commented 5 years ago

I have seen two requests in this area

  1. Run WMI queries across a network from an app running on Linux
  2. Use WMI to interrogate Linux hardware /OS

Can someone more familiar with the various 3rd party libraries, kernel support etc tell me whether those should be tracked as separate issues?

Is there any movement on this please? Specifically interested in 1. Run WMI queries across a network from an app running on Linux, Thanks!

dpsenner commented 2 years ago

I'm bumping this issue because we would also like to query WMI of windows hosts from linux hosts.

johanwintgens-ls commented 1 year ago

Bump. My employer's hitting me with that "if it's possible in Python, it's possible in .NET". What am I supposed to say? "It's not, because .NET is fkn stupid and you're stupid for relying on it"? It's certainly starting to look that way, since this issue is MORE THAN 5 YEARS OLD FFS! GET OUT OF THE STONE AGE! God I'm so sick of Microsoft and .NET 🤮

milochen0418 commented 7 months ago

Hello everyone, I'm wondering if anyone knows whether WMI support on Linux has been fully implemented yet? Recently, I've been hoping to have the opportunity to use WMI across platforms through .NET Core development, not just for controlling Windows, but also for managing Linux.

If there are parts of the support that are incomplete, and I'd like to help realize it, are there any open-source projects I can contribute to?

walljm commented 1 month ago

Any movement on this? This is still something we'd very much like to have. Specifically, we need:

  1. Run WMI queries across a network from an app running on Linux