Pgsi
pgsi
COVID-19 Vaccine Safety. Tested, safe and effective, COVID-19 vaccines will help us gain control of our lives and get back to the people and places we love.Learn more from the CDC about the COVID-19 vaccine and understand how the COVID-19 vaccine was developed. Repeatable Rip Cuts from Your Track Saw Everyone who has wrangled a full sheet of plywood around a table saw immediately recognizes the advantages of track saws for breaking down sheet goods. Keeping the unwieldy sheet stationary and moving the saw down a precision-made rail makes a lot of sense, but how do you get two (or more) pieces to come out exactly the same width? Just like the rip.
pgsi is the Postgres System Impact report, a script that analyzes Postgres log files and reports on which queries have the highest overall impact on the server. The impact is computed by looking at not only how long each query takes to complete, but how many times it is run, and the time period between subsequent runs. The report show the queries with the highest system impact, grouped by the type of query (SELECT, UPDATE, etc.)
Download
The latest version of pgsi, 1.7.1, can be downloaded at:
Basic Usage
To use pgsi, you must run it against a Postgres logfile that has full logging enabled. Then run:
perl pgsi.pl --file=logfile > pgsi.html
Postgres Logging Options
Make sure the following options are set in your postgresql.conf, or otherwise enabled for the traffic you want pgsi to analyze:
log_duration = on
` log_statement = ‘all’`
If you’re using the stderr log log destination (the default) you’ll also need something like the following line prefix at minimum:
log_line_prefix = '%t %p '
Pgsix
However pgsi will support additional information following that on the line. For example remote host (%h), user name (%u), and database name (%d) are often useful for filtering the log before analysis, and can be helpful if you need to manually read or track activity through the log itself.
Command Line Options
- –version
- Returns the version number
- –verbose
- Increases the level of verbosity
- –help
- Gives some basic help
- –file=x
- The log file to parse. If not given, will read stdin. This can be used more than once to read in multiple files at one time.
- –format=X
- Indicates the format of the output file. Current options are html and mediawiki
- –mode=X
- Indicates the log file mode. Current options are pid, csv, bare, and syslog
- –color
- Adds syntax highlighting to the queries in html format. On by default, can be turned off with –no-color
Bugs and Feature Requests
Bugs should be reported through the Github Issues page. Feature requests are welcome there as well, or send us an email.
Pga Golf
Development
Everyone is encouraged to look over and make improvements to the code. The latest development version can be obtained from GitHub by running:
Logo Pgsi
git clone git@github.com:bucardo/pgsi.git