Scroll to navigation

PG_ACTIVITY(1) Command line tool for PostgreSQL server activity monitoring. PG_ACTIVITY(1)

NAME

pg_activity - Realtime PostgreSQL database server monitoring tool

SYNOPSIS

pg_activity [option..]

DESCRIPTION

Command line tool for PostgreSQL server activity monitoring.

pg_activity must run on the same server than the instance and as the user running the instance (or root) to show CPU, MEM, READ or WRITE columns and other system information.

COMMAND-LINE OPTIONS

        Database user name (default: $USER).
    
        Database server port (default: "5432").
    
        Database server host or socket directory (default: "localhost").
    
    Database name to connect to (default: "postgres").
    
        Disable color usage.
    
        Filesystem blocksize (default: 4096).
    
        Enable support for AWS RDS.
    
        Store running queries as CSV.
    
        Skip total size of DB.
    
        Don't display queries with smaller than specified duration (in seconds).
    
        Queries display mode. Values: 1-TRUNCATED, 2-FULL(default), 3-INDENTED
    
        Duration mode. Values: 1-QUERY(default), 2-TRANSACTION, 3-BACKEND
    
        Show this help message and exit.
    
        Show program's version number and exit.
    

ENVIRONMENT VARIABLES

    PostgreSQL password.
    
        Database server port.
    
        Database user name.
    
        Database server host or socket directory.
    
    Path to .pgpass file (default is ~/.pgpass)
    

DISPLAY OPTIONS

        Disable DATABASE.
    
        Disable USER.
    
        Disable CLIENT.
    
        Disable CPU%.
    
        Disable MEM%.
    
        Disable READ/s.
    
        Disable WRITE/s.
    
        Disable TIME+.
    
        Disable W.
    
        Disable App.
    

INTERACTIVE COMMANDS

+ Increase refresh time. Maximum value : 3s

NAVIGATION MODE

EXAMPLES

PGPASSWORD='mypassword' pg_activity -U pgadmin -h 127.0.0.1 --no-client

pg_activity -h /var/run/postgresql

pg_activity -h myserver -p 5433 -d nagios -U nagios

2020-02-14 pg_activity 1.5.0