DotNet Memory Management _Global_

CMK version:

2.1.0p15

OS version:

Ubuntu Server

Error message:

DotNet Memory Management Global

Hello everyone, Does Someone know about the alert above?

What kind of investigation do we need to perform when this alert happens?.

We noticed this alert in a server that has been used only with the DHCP server. Doesn’t have any application running.

Why this alert is important to the environment?

someone can help me?

Hi Allan
I have this same issue with this service and do not know if “simply disable” for any notification.
Have you any progress from your message?

I found this script on Checkmk server

**cat /opt/omd/versions/2.2.0p17.cre/share/check_mk/checks/dotnet_clrmemory**
#!/usr/bin/env python3
# Copyright (C) 2019 Checkmk GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.
# NOTE: Careful when replacing the *-import below with a more specific import. This can cause
# problems because it might remove variables needed for accessing discovery rulesets.
from cmk.base.check_legacy_includes.wmi import *  # pylint: disable=wildcard-import,unused-wildcard-import
dotnet_clrmemory_defaultlevels = {
    "upper": (10.0, 15.0)  # 10.0 percent specified by customer,
    # various sources (including MS) give
    # around 5-10% as healthy values
}
def check_dotnet_clrmemory(item, params, parsed):
    yield from wmi_yield_raw_fraction(
        **parsed[""], item, "PercentTimeinGC", infoname="Time in GC", perfvar="percent", levels=params**
    )
check_info["dotnet_clrmemory"] = {
    "parse_function": parse_wmi_table,
    "inventory_function": lambda parsed: inventory_wmi_table_instances(
        parsed, filt=wmi_filter_global_only, levels="dotnet_clrmemory_defaultlevels"
    ),
    "check_function": check_dotnet_clrmemory,
    "has_perfdata": True,
    "service_description": "DotNet Memory Management %s",
    "group": "clr_memory",
}
root@ubuntu:/opt/omd/sites/check_mk/local/share/check_mk/agents/plugins#

Then I used this script to check which process are using the garbage collection:


`# Define parameters`
`$counterPath = "\.NET CLR Memory(*)\% Time in GC"`
`$sampleInterval = 5  # Interval between samples in seconds`
`$maxSamples = 12     # Maximum number of samples to collect` `# Function to collect and display performance counter data`
`function Get-PerformanceData {`
`    param (`
`        [string]$counterPath,`
`        [int]$sampleInterval,`
`        [int]$maxSamples`
`    )` `    Write-Host "Collecting performance data for '$counterPath' every $sampleInterval seconds, for $maxSamples samples..."` `    for ($i = 0; $i -lt $maxSamples; $i++) {`
`        $timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"`
`        $counterSample = Get-Counter -Counter $counterPath -ErrorAction SilentlyContinue`
`        `
`        if ($counterSample.CounterSamples) {`
`            foreach ($sample in $counterSample.CounterSamples) {`
`                $instanceName = $sample.InstanceName`
`                $value = $sample.CookedValue`
`                Write-Host "[$timestamp] Instance: $instanceName, Percent Time in GC: $value%"`
`            }`
`        } else {`
`            Write-Host "[$timestamp] No data available for the specified counter."`
`        }` `        Start-Sleep -Seconds $sampleInterval`
`    }`
`}` `# Run the function`
`Get-PerformanceData -counterPath $counterPath -sampleInterval $sampleInterval -maxSamples $maxSamples`

In the end, we decided disable this trigger because we doesn’t face any problem or lagging on server.

This Tigger makes sense if you have Ms Exchange or some application that use the dotnet.

I hope that I could help you.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.