I am running an application which uses a SQL Server and is connected to it. Is there an API or some other way to obtain CPU & RAM usage of the SQL Server and show it in my application, without physically (manually) accessing the SQL Server. Please note, that the application is running on a machine different from the SQL Server.
Asked
Active
Viewed 154 times
0
-
How would you want obtain the details of memory/cpu utilisation *without* connecting to the host..? Of course you'll need to connect to it in some way. – Thom A Jan 31 '20 at 13:34
-
We are connected to a database in that SQL server. What I mean by not accessing manually, is to get that information via C# code and present it in our application. Thanks in advance. – Gevorg Jan 31 '20 at 13:42
-
Do you have the rights to access WMI on that server ? In this case : https://stackoverflow.com/questions/9777661/returning-cpu-usage-in-wmi-using-c-sharp – Cyril Rebreyend Jan 31 '20 at 15:15
-
Yes it helped me thank you, and in the same way, is it possible to get RAM usage? – Gevorg Feb 01 '20 at 08:07