Skip to content
no0p edited this page Oct 15, 2014 · 10 revisions

pgsampler will log data to files when output_mode is set to 'csv'.

Example entries in postgresql conf to log to /tmp follow:

shared_preload_libraries = 'pgsampler'

pgsampler.output_mode = 'csv'
pgsampler.output_csv_dir = '/tmp/'

Data Files

The csv files contain timeseries data for various metrics representing the state of a cluster.

File Description Metric Source
heartbeats.csv Heartbeats are a timestampted result of txid_current(). heartbeat.c
stat_class.csv Selected information from pg_class. relation_info.c
databases.csv Basic information about databases in the cluster. database_list.c
columns.csv Selected information from pg_attribute. column_info.c
indexes.csv Selected information from pg_class relating to indexes. index_info.c
stat_column.csv Selected information from pg_stats column_stats.c
stat_database.csv Selected information from pg_stat_database db_stats.c
stat_system.csv Selected information from sysconf() system_info.c
stat_filesystem.csv Selected information from statvfs and /etc/mtab. fs_info.c
stat_activity.csv Selected info from pg_stat_activity and pg_locks activity_stats.c
stat_replication.csv Selected info from pg_stat_replication replication_stats.c
stat_bgwriter.csv Selected info from pg_stat_bgwriter. bgwriter_stats.c
stat_statements.csv Selected information from pg_stat_statements, when the module is loaded. stat_statements.c
stat_table.csv Selected information from pg_stat_user_tables table_stats.c
stat_index.csv Selected information from pg_stat_user_indexes index_stats.c
statio_user_indexes.csv Selected information from pg_statio_user_indexes index_io_stats.c
statio_user_tables.csv Selected info from statio_user_tables. table_io_stats.c
stat_function.csv Selected info from pg_stat_function function_stats.c
transient_gucs.csv A grab bag of gucs which can be set at times other than restart. transient_gucs.c
restart_gucs.csv A grab bag of gucs which can only be set at server startup. restart_gucs.c