Procstat Monitoring

Use This InfluxDB Integration for Free

Procstat is a Linux utility that displays detailed information about processes as identified by their pid arguments.

Why use the Procstat Telegraf Input Plugin?

The Procstat Telegraf Plugin monitors the resource usage of one or more processes. This data can help you figure out when processes are running, and for how long. Procstat data can also show how your system allocates resources and provides intelligence for optimizing processes. You can also use this data to set thresholds and alerts so you can proactively address processes that are using too many resources before causing performance degradation.

How to monitor procstat using the Telegraf plugin

Processes can be specified either by pid file, by executable name, by command line pattern matching, by username, by systemd unit name, or by cgroup name/path (in this order or priority). This plugin uses pgrep when an executable name is provided to obtain the pid. The Procstat Telegraf Plugin transmits IO, memory, cpu, file descriptor-related measurements for every process specified. A prefix can be set to isolate individual process specific measurements.

The Procstat input plugin will tag processes according to how they are specified in the configuration. If a pid file is used, a "pidfile" tag will be generated. On the other hand, if an executable is used, an "exe" tag will be generated.

The Procstat plugin can use several different methods to collect process data. These include:

  • pidfile
  • exe
  • pattern
  • user
  • systemd_unit
  • cgroup
  • win_service

Key procstat monitoring metrics

Procstat can monitor a wide variety of metrics, including:

  • procstat
    • tags:
      • pid (when pid_tag is true)
      • cmdline (when 'cmdline_tag' is true)
      • process_name
      • pidfile (when defined)
      • exe (when defined)
      • pattern (when defined)
      • user (when selected)
      • systemd_unit (when defined)
      • cgroup (when defined)
      • win_service (when defined)
    • fields:
      • child_major_faults (int)
      • child_minor_faults (int)
      • cpu_time (int)
      • cpu_time_guest (float)
      • cpu_time_guest_nice (float)
      • cpu_time_idle (float)
      • cpu_time_iowait (float)
      • cpu_time_irq (float)
      • cpu_time_nice (float)
      • cpu_time_soft_irq (float)
      • cpu_time_steal (float)
      • cpu_time_system (float)
      • cpu_time_user (float)
      • cpu_usage (float)
      • involuntary_context_switches (int)
      • major_faults (int)
      • memory_data (int)
      • memory_locked (int)
      • memory_rss (int)
      • memory_stack (int)
      • memory_swap (int)
      • memory_usage (float)
      • memory_vms (int)
      • minor_faults (int)
      • nice_priority (int)
      • num_fds (int, telegraf may need to be ran as root)
      • num_threads (int)
      • pid (int)
      • read_bytes (int, telegraf may need to be ran as root)
      • read_count (int, telegraf may need to be ran as root)
      • realtime_priority (int)
      • rlimit_cpu_time_hard (int)
      • rlimit_cpu_time_soft (int)
      • rlimit_file_locks_hard (int)
      • rlimit_file_locks_soft (int)
      • rlimit_memory_data_hard (int)
      • rlimit_memory_data_soft (int)
      • rlimit_memory_locked_hard (int)
      • rlimit_memory_locked_soft (int)
      • rlimit_memory_rss_hard (int)
      • rlimit_memory_rss_soft (int)
      • rlimit_memory_stack_hard (int)
      • rlimit_memory_stack_soft (int)
      • rlimit_memory_vms_hard (int)
      • rlimit_memory_vms_soft (int)
      • rlimit_nice_priority_hard (int)
      • rlimit_nice_priority_soft (int)
      • rlimit_num_fds_hard (int)
      • rlimit_num_fds_soft (int)
      • rlimit_realtime_priority_hard (int)
      • rlimit_realtime_priority_soft (int)
      • rlimit_signals_pending_hard (int)
      • rlimit_signals_pending_soft (int)
      • signals_pending (int)
      • voluntary_context_switches (int)
      • write_bytes (int, telegraf may need to be ran as root)
      • write_count (int, telegraf may need to be ran as root)
  • procstat_lookup
    • tags:
      • exe
      • pid_finder
      • pid_file
      • pattern
      • prefix
      • user
      • systemd_unit
      • cgroup
      • win_service
      • result
    • fields:
      • pid_count (int)
      • running (int)
      • result_code (int, success = 0, lookup_error = 1)
For more information, please check out the documentation.

Project URL   Documentation

Related resources

InfluxDb-cloud-logo

The most powerful time series
database as a service

Get Started for Free
Influxdbu

Developer Education

Training for time series app developers.

View All Education