1

Windows 10 および Postgresql 11 で pgBadger を使用しようとしています。

インストールされたPerl

インストールされたMingw

perlとmingwの両方のWindowsで定義されたすべてのパス設定

コンパイルされた pgBadger (成功)

私のウィンドウですべて正常に動作しているように見えます

*** ログファイルからのいくつかの行

2019-07-11 14:41:05 +03 [6604]:[47] user=postgres, db=demo_test LOG:  duration: 0.349 ms  statement: SELECT * FROM corporations ORDER BY id 

2019-07-11 14:41:07 +03 [6604]:[48] user=postgres, db=demo_test LOG:  duration: 0.046 ms  statement: 

2019-07-11 14:41:07 +03 [6604]:[49] user=postgres, db=demo_test LOG:  duration: 0.012 ms  statement: 

2019-07-11 14:41:07 +03 [6604]:[50] user=postgres, db=demo_test LOG:  duration: 6.884 ms  statement: Select * From pg_available_extensions order  by NAME

2019-07-11 14:41:07 +03 [6604]:[51] user=postgres, db=demo_test LOG:  duration: 0.029 ms  statement: 

2019-07-11 14:41:07 +03 [6604]:[52] user=postgres, db=demo_test LOG:  duration: 0.077 ms  statement: SELECT 11651::regclass

2019-07-11 14:41:12 +03 [6604]:[53] user=postgres, db=demo_test LOG:  duration: 0.052 ms  statement: 

2019-07-11 14:41:12 +03 [6604]:[54] user=postgres, db=demo_test LOG:  duration: 0.040 ms  statement: 

2019-07-11 14:41:12 +03 [6604]:[55] user=postgres, db=demo_test LOG:  duration: 1.604 ms  statement: SELECT * FROM currency_stocks ORDER BY id DESC 

2019-07-11 14:41:16 +03 [6604]:[56] user=postgres, db=demo_test LOG:  duration: 0.020 ms  statement: 

2019-07-11 14:41:16 +03 [6604]:[57] user=postgres, db=demo_test LOG:  duration: 0.012 ms  statement: 

2019-07-11 14:41:16 +03 [6604]:[58] user=postgres, db=demo_test LOG:  duration: 314.062 ms  statement: SELECT * FROM (  SELECT uuid_generate_v4() FROM generate_series(1, 1000) ) AS x

2019-07-11 14:41:23 +03 [12348]:[15] user=postgres, db=demo_test LOG:  duration: 0.018 ms  statement: 

2019-07-11 14:41:23 +03 [11088]:[15] user=postgres, db=db_test2 LOG:  duration: 0.017 ms  statement: 

*** 現在のフォルダー (CMD) で次のコマンドを実行します: C:\PostgreSQL\pgBadger> および postgresql のログの宛先: C:\PostgreSQL\11\data\log

perl pgbadger -v -f stderr -p "%t [%p]:[%l] user=%u, db=%d " ../11/data/log/postgresql-2019-07-11_143954.log

*** スクリプトを実行すると、結果がコマンド ラインに表示されます。

C:\PostgreSQL\pgBadger>perl pgbadger -v -f stderr -p "%t [%p]:[%l] user=%u, db=%d " ../11/data/log/postgresql-2019 -07-11_143954.log

DEBUG: timezone not specified, using -10800 seconds

DEBUG: Output 'html' reports will be written to out.html

DEBUG: Autodetected log format 'stderr' from ../11/data/log/postgresql-2019-07-11_143954.log

DEBUG: pgBadger will use log format stderr to parse ../11/data/log/postgresql-2019-07-11_143954.log.

DEBUG: the log statistics gathering took: 0 wallclock secs ( 0.03 usr +  0.00 sys =  0.03 CPU)

DEBUG: Output 'html' reports will be written to out.html

DEBUG: Processing log file: ../11/data/log/postgresql-2019-07-11_143954.log

LOG: Ok, generating html report...

DEBUG: Starting reading file ../11/data/log/postgresql-2019-07-11_143954.log...ents: 0

DEBUG: Start parsing postgresql log at offset 0 of file ../11/data/log/postgresql-2019-07-11_143954.log to 23131

[=======================> ] Parsed 22911 bytes of 23131 (99.05%), queries: 191, events: 3

DEBUG: building reports took:  0 wallclock secs ( 0.01 usr +  0.01 sys =  0.03 CPU)

DEBUG: the total execution time took:  0 wallclock secs ( 0.05 usr +  0.01 sys =  0.06 CPU)

一部の設定は postgresql.conf 関連の pgBadger にあります。

log_checkpoints = on 

log_connections = on 

log_disconnections = on 

log_error_verbosity = default   

log_lock_waits = on 

log_line_prefix = '%t [%p]:[%l] user=%u, db=%d ' 

log_statement = none 

log_temp_files = 0  

log_autovacuum_min_duration = 0 

# log_statement = none ## same result enable this setting 

lc_messages =  'C' 

最後に、開いたときの結果はout.htmlです

データセットがありません

提案やヒントはありますか?

どんな助けでも大歓迎です

4

0 に答える 0