Track CPU and Memory Usage Per Process

Using Gazer, you can track:
  • CPU usage;
  • Memory usage;
  • Count of GDI objects;
  • Count of Threads;
  • and many others parameters ...
  • To organize monitoring of resource usage, you need to do the following:
  • Install GazerNode
  • Add a Process Unit to the configuration
  • Watch the metrics of the specified process
  • Adding Process Monitoring Unit - Scheme

    Process filtering

    Format of Process Name field: ProcessName#ProcessID
    In order to monitor a process with a specific name, you need to specify its full name (e.g. "notepad.exe").
    In this case, the unit looks for the first process with the specified name.
    If you specify the process identifier along with the name (e.g. "notepad.exe#1154"), then the unit will also search by identifier.
    Also, you can specify only the process ID ((e.g. "#1154")), in which case the unit will hard-follow the process with this ID.
    CPU Usage Chart - Process Monitoring

    Finding memory and resource leaks

    Resource usage graphs will not tell you the real cause of the leaks. But they can help you understand at what time this leak occurs and compare it with other parameters.
    For example, you have some memory leak and you can see in the graph that it correlates with the increase in the number of threads in the process. Preliminary conclusion: the required memory is allocated in dynamically created threads. This is a very simple example, but it gives you an idea of what to do in situations like this.
    Process - Group Of Metrics

    Long Term Monitoring

    GazerNode can also be useful for long-term software testing, collecting metrics for CPU usage or operating system resources.

    List Of Metrics

    MetricUsing APIUOM
    Main/Working Set SizeGetProcessMemoryInfoKB
    Main/Thread CountCreateToolhelp32Snapshot
    Main/Handle CountGetProcessHandleCount
    Main/GDI ObjectsGetGuiResources
    Main/GDI Objects PeakGetGuiResources
    Main/User ObjectsGetGuiResources
    Main/User Objects PeakGetGuiResources
    Operations/Read Operation CountGetProcessIoCounters
    Operations/Read Transfer CountGetProcessIoCounters
    Operations/Write Operation CountGetProcessIoCounters
    Operations/Write Transfer CountGetProcessIoCounters
    Operations/Other Operation CountGetProcessIoCounters
    Operations/Other Transfer CountGetProcessIoCounters
    CPU/Kernel Mode TimeGetProcessTimesms
    CPU/User Mode TimeGetProcessTimesms
    CPU/Usage KernelGetProcessTimes%
    CPU/Usage UserGetProcessTimes%
    Memory/Page FaultsGetProcessMemoryInfo
    Memory/Peak Working SetSizeGetProcessMemoryInfoKB
    Memory/Private UsageGetProcessMemoryInfoKB
    Screenshot of Unit Process / DataItems

    Using Win32 API

    To obtain information about the process, GazerNode uses the following API calls:
  • CreateToolhelp32Snapshot
  • Process32First
  • Process32Next
  • OpenProcess
  • GetProcessMemoryInfo
  • GetProcessHandleCount
  • GetProcessIoCounters
  • GetGuiResources