Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

PerformanceCounter Layout Renderer

Rolf Kristensen edited this page Jul 2, 2025 · 28 revisions

Render value retrieved from Windows Performance Counter.

Platforms Supported: Limited - Windows only and requires nuget-package NLog.PerformanceCounter since NLog 5.0

Configuration Syntax

${performancecounter:Category=String:Counter=PerformanceCounterType:Instance=String
                    :IncrementValue=Integer:MachineName:string
                     format=String:culture=Culture}

Parameters

Performance Counter Options

  • Counter - Name of the performance counter. Required.
  • Category - Name of the counter category. Required.
  • Instance - Name of the performance counter instance. Optional.

    NLog 4.6 will automatically use current process as Instance-Id when Category = "Process" (Supports multi-instance)

  • MachineName The name of the machine to read the performance counter from. Optional.

Rendering Options

  • Format - Format string for conversion from float to string.

    Introduced with NLog v4.6

  • Culture - Culture used for rendering. Culture

    Introduced with NLog v4.6

Clone this wiki locally

Morty Proxy This is a proxified and sanitized view of the page, visit original site.