Quick update to a post I did a while back regarding Orleans Dashboard — additional reporting metrics for your cluster! As a refresher, Orleans is a virtual actor model framework — a framework that can be used to build new, distributed “primitives”. These primitives’ work can be farmed out to a cluster of nodes as a means of getting “work” done faster than what would be possible if working constrained to a single piece of hardware. In a previous post: [**How to set up Microsoft Orleans’ Reporting Dashboard** _Orleans is an easy to use actor framework, but how can you monitor your deployment? Luckily, there’s something simple…_medium.freecodecamp.org](https://medium.freecodecamp.org/microsoft-orleans-reporting-dashboard-16465d255199 "https://medium.freecodecamp.org/microsoft-orleans-reporting-dashboard-16465d255199")[](https://medium.freecodecamp.org/microsoft-orleans-reporting-dashboard-16465d255199) I had pointed out: > Currently CPU/Memory usage is not visible from the .net core implementation of Orleans. Hopefully something will be done to remedy that in the future? Perhaps it’s a limitation of the API available in netstandard? This \*\*\*seems\*\*\* to have been true at a point in time, but it is no longer! (At least if you’re running in a windows runtime.) The additional CPU and memory metrics are completely dependant on a registered `IHostEnvironmentStatistics` implementation. By default, a “NoImplementation” implementation is registered, and you would see something like this in your Orleans log:  Orleans log showing an issue that prevents LoadShedding from working And this on your dashboard:  Sad Orleans Dashboard w/o CPU/Memory metrics :( The whole reason I stumbled across getting these CPU/Memory metrics working on the dashboard, was I was pursuing getting the feature `LoadShedding` to work — which was apparently dependant on these metrics. Through some back and forth on the [Orleans Gitter](https://gitter.im/dotnet/orleans) I found out about the needed registered implementation of an `IHostEnvironmentStatistics` class. One of these classes does exist in the Orleans code, though it’s in a separate package, and an internal only class to that package: [**dotnet/orleans** _Orleans - Distributed Virtual Actor Model. Contribute to dotnet/orleans development by creating an account on GitHub._github.com](https://github.com/dotnet/orleans/blob/e2b25a695767ae5746ffe47218c1331427997894/src/TelemetryConsumers/Orleans.TelemetryConsumers.Counters/Statistics/PerfCounterEnvironmentStatistics.cs "https://github.com/dotnet/orleans/blob/e2b25a695767ae5746ffe47218c1331427997894/src/TelemetryConsumers/Orleans.TelemetryConsumers.Counters/Statistics/PerfCounterEnvironmentStatistics.cs")[](https://github.com/dotnet/orleans/blob/e2b25a695767ae5746ffe47218c1331427997894/src/TelemetryConsumers/Orleans.TelemetryConsumers.Counters/Statistics/PerfCounterEnvironmentStatistics.cs) Luckily, there is a SiloHost extension method that registers this implementation of `IHostEnvironmentStatistics` for use — albeit from a Windows only runtime environment (at least at the time of writing). To get the CPU/Memory metrics work on our dashboard (and putting us in a position to work in `LoadShedding`) we need to do a few things: * Install a new NuGet package * Register an implementation of `IHostEnvironmentStatistics` — like the one provided in the NuGet package itself. #### Install the NuGet Package The `IHostEnvironmentStatistics` implementation exists within the `Microsoft.Orleans.OrleansTelemetryConsumers.Counters` package, install it via the GUI, CLI, etc. The csproj file from the SiloHost project should look something like this when done:  csproj after installing the NuGet package Microsoft.Orleans.OrleansTelemetryConsumers.Counters #### Registering the implementation of IHostEnvironmentStatistics As previously mentioned, the new NuGet package has a Windows specific implementation of `IHostEnvironmentStatistics` contained within it, although it is an internal class. There is however, an extension method that can be used to register that internal class. Let’s update our SiloHostBuilder: Original var builder = new SiloHostBuilder() .ConfigureClustering( ServiceProvider.GetService<IOptions<OrleansConfig>>(), Startup.HostingEnvironment.EnvironmentName ) .Configure<ClusterOptions>(options => { options.ClusterId = "dev"; options.ServiceId = "HelloWorldApp"; }) .Configure<EndpointOptions>(options => options.AdvertisedIPAddress = IPAddress.Loopback) .AddMemoryGrainStorage(Constants.OrleansMemoryProvider) .ConfigureApplicationParts(parts => { parts.AddApplicationPart(typeof(IGrainMarker).Assembly).WithReferences(); }) .ConfigureServices(DependencyInjectionHelper.IocContainerRegistration) .UseDashboard(options => { }) .UseInMemoryReminderService() .ConfigureLogging(logging => logging.AddConsole()); And we just need to add `.UsePerfCounterEnvironmentStatistics()`. Updated var builder = new SiloHostBuilder() .ConfigureClustering( ServiceProvider.GetService<IOptions<OrleansConfig>>(), Startup.HostingEnvironment.EnvironmentName ) .Configure<ClusterOptions>(options => { options.ClusterId = "dev"; options.ServiceId = "HelloWorldApp"; }) .Configure<EndpointOptions>(options => options.AdvertisedIPAddress = IPAddress.Loopback) .AddMemoryGrainStorage(Constants.OrleansMemoryProvider) .ConfigureApplicationParts(parts => { parts.AddApplicationPart(typeof(IGrainMarker).Assembly).WithReferences(); }) .ConfigureServices(DependencyInjectionHelper.IocContainerRegistration) .UsePerfCounterEnvironmentStatistics() // <- this guy .UseDashboard(options => { }) .UseInMemoryReminderService() .ConfigureLogging(logging => logging.AddConsole()); That’s all there is to it! Now, we should get our CPU/Memory utilization reported on the Orleans Dashboard, and be in a better position to work in `LoadShedding` — perhaps for the next post! Now, looking at our dashboard, we can see:  CPU/Memory utilization! Now, we have even more insight into how our cluster is operating, and additional features such as `LoadShedding` are made available to us! #### Related: [**How to set up Microsoft Orleans’ Reporting Dashboard** _Orleans is an easy to use actor framework, but how can you monitor your deployment? Luckily, there’s something simple…_medium.freecodecamp.org](https://medium.freecodecamp.org/microsoft-orleans-reporting-dashboard-16465d255199 "https://medium.freecodecamp.org/microsoft-orleans-reporting-dashboard-16465d255199")[](https://medium.freecodecamp.org/microsoft-orleans-reporting-dashboard-16465d255199) [**Info on enabling CPU/Memory metrics. by Kritner · Pull Request #212 ·…** _Updated the readme to expand on enabling CPU/Memory metrics on the dashboard. These metrics (at the time of writing)…_github.com](https://github.com/OrleansContrib/OrleansDashboard/pull/212 "https://github.com/OrleansContrib/OrleansDashboard/pull/212")[](https://github.com/OrleansContrib/OrleansDashboard/pull/212) * Code as of post — [https://github.com/Kritner-Blogs/OrleansGettingStarted/releases/tag/v0.57](https://github.com/Kritner-Blogs/OrleansGettingStarted/releases/tag/v0.57) * [Getting Started with Microsoft Orleans](https://medium.com/@kritner/getting-started-with-microsoft-orleans-882cdac4307f?source=friends_link&sk=1fc3451d71a19dcb49f2c8bbeb6b079e) * [Microsoft Orleans — Reusing Grains and Grain State](https://medium.com/@kritner/microsoft-orleans-reusing-grains-and-grain-state-136977facd42?source=friends_link&sk=f19cfa3f17665c3d700bfe0df56e27a9) * [Microsoft Orleans — Reporting Dashboard](https://medium.com/@kritner/microsoft-orleans-reporting-dashboard-16465d255199) * [Using polymorphism to update Orleans Project to be ready for new Orleans Examples!](https://medium.com/@kritner/updating-orleans-project-to-be-more-ready-for-new-orleans-examples-2105b29a46fd?source=friends_link&sk=61d1f591e5b5c498688439db50ad310e) * [Microsoft Orleans — Dependency Injection](https://medium.com/@kritner/microsoft-orleans-dependency-injection-6379d52a7169?source=friends_link&sk=6c3883a5213d65eb251b56c717e0e4f2) * [Microsoft Orleans — Easily switching between “development” and “production” configurations.](https://medium.com/@kritner/microsoft-orleans-easily-switching-between-development-and-production-configurations-20e109be6458?source=friends_link&sk=1e8fc6aa072a5b293d029c00012165b3) * [.net core console application IOptions<T> configuration](https://medium.com/@kritner/net-core-console-application-ioptions-t-configuration-ae74bfafe1c5?source=friends_link&sk=c5bcab4f7f10c97175ad68fc12cb9cc6) * [Microsoft Orleans — Observers](https://medium.com/@kritner/microsoft-orleans-observables-5e0040c949cd?source=friends_link&sk=bcb921fdf593bdc97b9c5909b2730f2d)