### MetricsHub
MetricsHub 1.0.00

Home

Connectors directory[1] Full listing of connectors[2]

## Linux - Processes (ps)

### Description

Monitors performance metrics (CPU, memory, etc.) of the processes that match the specified criteria in `matchName`, `matchCommand`, and `matchUser`.

community[3] linux[4] system[5]

Source[6]

### Target

Typical platform: Linux[7]

Operating system: Linux

### Prerequisites

Leverages: Linux ps command

Technology and protocols: Commands

Variables:

- `matchCommand`: Regular expression pattern to match process command lines for monitoring. (default: `.*`)
- `matchName`: Regular expression pattern to match process names for monitoring. (default: `.*`)
- `matchUser`: Regular expression pattern to match process users for inclusion. (default: `.*`)

### Examples

#### CLI

    metricshub HOSTNAME -t linux -c +LinuxProcess --ssh -u USER

#### metricshub.yaml

    resourceGroups:
      <RESOURCE_GROUP>:
        resources:
          <HOSTNAME-ID>:
            attributes:
              host.name: <HOSTNAME> # Change with actual host name
              host.type: linux
            connectors: [ +LinuxProcess ] # Optional, to load only this connector
            protocols:
              ssh:
                username: <USERNAME> # Change with actual credentials
                password: <PASSWORD> # Encrypted using metricshub-encrypt
            additionalConnectors:
              LinuxProcess: # Unique ID. Use 'uses' if different from the original connector ID
                uses: LinuxProcess # Optional - Original ID if not in key
                force: true # Optional (default: true); false for auto-detection only
                variables:
                  matchCommand: <VALUE> # Replace with desired value.
                  matchName: <VALUE> # Replace with desired value.
                  matchUser: <VALUE> # Replace with desired value.

### Connector Activation Criteria

The Linux - Processes (ps) connector must be selected manually, and its status will be reported as OK if all the below criteria are met:

- The command below succeeds on the monitored host
  - Command: `/usr/bin/which ps || /bin/which ps`
  - Output contains: `/bin/ps` (regex)

### Metrics

Type | Collected Metrics | Specific Attributes
--- | --- | ---
process | `process.cpu.time` `process.cpu.utilization` `process.memory.usage` `process.memory.utilization` `process.memory.virtual` `process.thread.count` `process.time` | `id` `process.id` `process.match.command` `process.match.name` `process.match.user` `process.name` `process.parent.id`

monitoring observability opentelemetry otel
Links:

- [1] ../metricshub-connectors-directory.html
- [2] ../metricshub-connectors-full-listing.html
- [3] tags/community.html
- [4] tags/linux.html
- [5] tags/system.html
- [6] https://github.com/sentrysoftware/metricshub-community-connectors/tree/main/src/main/connector/system/LinuxProcess/LinuxProcess.yaml
- [7] platforms/linux.html

## Search Results for {{siteSearch | truncate:'50'}}

{{resultArray.length}}
{{parent.title}} {{parent.title}}

{{result.title}}

{{result.body | truncate:'400'}}

{{parent.title}}
{{result.title}}
{{result.body | truncate:'100'}}

No results.