-
Notifications
You must be signed in to change notification settings - Fork 45
/
ChangeLog
1595 lines (1458 loc) · 80 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2024-03-06 - Version 4.0
This release is a major release that fixes issues reported since
the past six months and adds several new features.
New features:
* Add report of devices /sys/block/queue informations (scheduler,
rotational, rq_affinity and add_random) to the System report.
* Add report of PGDATA files to be able to detect symlinks and
unwanted files in this directory.
* Add reports for Wait Event when the pg_wait_sampling extension is use.
First report show the distribution by Wait Event Type and second report
show the distribution by Wait Events.
* Add report for Global subtransactions counters if extension
pg_subxact_counters is installed in the connection database.
Subtransactions can lead to performance issue, report Counters
to monitor the subtransactions (generation rate, overflow, state).
* Add collect of /sys/kernel/debug/sched/migration_cost_ns with kernel >= 5.19
collect start-end metrics only twice (start and end)
* Add a chapter in documentation about additional statistics
collected from extensions pg_stat_statements, pg_wait_sampling
and pg_subxact_counters.
* Add option --no-pg_stats-dump to pgcluu_collectd to avoid collecting such
statistics for performances reasons. Thanks for the patch to Frederic Yhuel.
* Make SIGINT interrupts gracefully pgcluu_collectd like SIGHUP. Thanks to
Frederic Yhuel for the patch.
* Add ddump of the pg_stats view to pgcluu_collectd. The point is for the
DBA to study the statistics, and nothing else. Thanks for the patch to
Frederic Yhuel.
It is useful to dump the pg_stats views. The dump can be imported in a table
created like this:
CREATE TABLE my_client_pgstats (
export_time TEXT,
dbname TEXT,
schemaname TEXT,
tablename TEXT,
attname TEXT,
inherited BOOLEAN,
null_frac REAL,
avg_width INT,
n_distinct REAL,
most_common_vals TEXT[],
most_common_freqs REAL[],
histogram_bounds TEXT[],
correlation REAL
);
Note that the columns most_common_vals and histogram_bounds have
the type TEXT[] instead of anyarray.
Compatibility:
There is not compatibility issues but a change of behavior with default
to dump the pg_stats view. Following the number of table/indexes in the
databases it could take more time collecting the statistic so in this case
the interval of polling should be increase. There is an new option to disable
the pg_stats dump, --no-pg_stats-dump, if you want to get back to the previous
behavior.
Here is the full list of fixes since previous release.
- Fix graph labels for TCPv4 errors. Thanks to Christophe Courtois for
the report.
- Avoid reporting redundant index if they are not using the same type of
index. Thanks to Christophe Courtois for the report.
- Fix file not exists error message when looking at block devices information.
- Fix broken report when /sys/kernel/debug/sched/migration_cost_ns is not
readable by the user running pgcluu_colletd
- Fix devices info (sar -d) for sar >= 12.4.0. Thanks to Christophe Courtois
for the patch.
- Fix legend of locks reports.
- Fix report of locks per database.
- Fix disable menu for buffercache use
- Fix mount report that was not reporting NFS mount points.
- Fix wait_all_childs() function.
2023-07-11 - Version 3.5
This release is a maintenance release that fixes issues reported since
the past six months and adds support to PostgreSQL 16.
- Fix pgcluu for PG16 changes on pg_stat_user_indexes.
- Fix live/dead tuples statistics. Thanks to Frederic Yhuel for the patch.
- Add e as expression for kind of extended statistics.
- Add --disable-pidstat option to disable the collect of metrics from the
pidstat command. This can be useful with old versions of pidstat that do
not support the -U option. Thanks to Guillaume Lelarge for the report.
- If on a secondary server, don't execute pg_current_wal_lsn(). Thanks to
Guillaume Lelarge for the patch.
Use relispartition only for PG version 10 and upper. Thanks to Guillaume
Lelarge for the patch.
2022-12-26 - Version 3.4
This release is a maintenance release that fixes issues reported since
the past six months.
- Fix unwanted report of missing index from partition. Thanks to
Christophe Courtois for the report.
- Fix cases where detection of redundant indexes was depending on the
creation order.Thanks to Guillaume Lelarge for the report.
Move Cancelled queries report from Replication sub menu to upper level.
Thanks to Guillaume Lelarge for the report.
- Allow -k option to make pgcluu_collectd exit gracefully. Previous
behavior was to exit immediately, it now calls the HUP signal (-1).
This change is done to not interrupt the running execution of the
metrics collect, the process will die only if all SQL queries are
executed. For an immediate interrupt use the TERM (-15) signal.
- Remove all ORDER BY clause in the metrics collect queries to improve
the performances. Ordering is done when reports are generated.
- Fix collect of the pg_stat_user_indexes, pg_stat_user_tables and
corresponding io stats.
- Fix --rotate-daily spill directory. Thanks to Chistophe Courtois for
the patch.
- Fix potential use of uninitialized value when sar and pidstat files are
not present. Thanks to geostart123 for the report.
- [CGI] verify that pidstat statistics exists before trying to load them.
Thanks to geostar123 foir the report.
- [CGI] Fix wrong error message when attempt to read binary files and remove
useless code. Thanks to geostar123 for the report.
- Remove newline from indexes definition to avoid data import error when
building reports.
2022-06-02 - Version 3.3
This release is a maintenance release that fixes issues reported since
previous release. It also adds new reports and features.
- Add TCP utilization and TCP errors reports, from sar -nTCP,ETCP.
- Add a comment in the suggested index if it could be redundant
with existing ones.
- Add support to run pgcluu_collect as user with the pg_monitor role.
Here is the full list of changes since previous release.
- Add support to run pgcluu_collect as user with the pg_monitor role.
Thanks to Nicolas Gollet for the report.
- Fix redundant index query to work with PG < 10, regexp_match() must be
replaced by regexp_matches() with some additional rewrite.
- Replace call to pg_ls_dir by pg_ls_waldir to be able to use pg_monitor
privilege starting from PG10. Thanks to Nicolas Gollet for the report.
- Fix impossibility to use --lock-timeout. Thanks to Christophe Courtois
for the report.
- Remove lock_timeout from internally set of PGOPTIONS when querying
pgbouncer, the old value is restored after. Thanks to Christophe Courtois
for the report.
- Fix empty pgbouncer statistics file when running in interactive mode.
Thanks to Christophe Courtois for the report.
- Add a comment in the CREATE INDEX when the suggested index may be redundant
with existing ones. Thanks to Christophe Courtois for the patch.
- Fix false report of redundant index when the WHERE clause is different.
Thanks to Guillaume Lelarge for the report.
- Fix in pgcluu for OUTPUT_DIR always be quoted, especially if their value
may contain a white space or separator character. Thanks to Nicolas Gollet
for the patch.
- Fix network errors disabled. Thanks to Christophe Courtois for the patch.
- Add TCP utilization and TCP errors reports, from sar -nTCP,ETCP. Thanks to
Christophe Courtois for the patch.
- Fix pgbouncer command. Thanks to Nicolas Gollet for the patch.
- Modification of the query on pg_stat_statement so that under PostgreSQL 13
and higher total_time = total_plan_time + total_execution_time. Thanks to
Nicolas Gollet for the patch.
- Fix STATS_REPORT_RETENTION directory in config file. Don't prepend DESTDIR
to paths in config file. Thanks to Christoph Berg for the patch.
2021-09-30 - Version 3.2
This release is a maintenance release that fixes issues reported since
previous release. It also adds new reports and features.
* Add STATS_REPORT_OUTDIR configuration directive to pgcluu.conf to set
the directory where the pgCluu reports will be saved. Default to
/var/lib/pgcluu/report/.
* Add command line option -t | --lock-timeout with default to 3 seconds
to self terminate a SQL query that could be lock by the activity of
an other session like a drop table for example.
* Add collect and report of unused trigger functions.
* Add system statistics dedicated to PostgreSQL process through stats
reported by pidstat.
* Add report of CPU scaling_governor to check if it set to powersave,
setting it to performances can improve performances up to 20% following
the PostgreSQL load. For more information on this kernel parameter see
https://wiki.archlinux.org/index.php/CPU_frequency_scaling#Scaling_governors
Backward compatibility:
- Change default retention time to 30 days instead of no storage limit
to avoid possible out of memory on uncontrolled installation. Thanks
to Jean Pierre Huart for the report.
Here is the full list of changes since previous release.
- Remove service time report as per sysstat v12.1.2 it has been removed.
- Add STATS_REPORT_OUTDIR configuration directive to pgcluu.conf to set
the directory where the pgCluu reports will be saved. Default to
/var/lib/pgcluu/report/. Thanks to Jean Pierre Huart for the feature
request.
- Fix error "Use of uninitialized value $pidstat_file in -e at ..." when
generating report for sar file only.
- Fix possible bad format issue in pidstat parsing du to command with a
space character. Thanks to Christophe Courtois for the report.
- Subtract the lock_timeout setting when looking at pg_settings to have
the right values outside pgcluu.
- Fix README typo ; releases come from Github. Thanks to Christophe
Courtois for the patch.
- Add BEGIN_STAT/END_STAT variables dedicated to sar data on their
timezone, to avoid filtering on the wrong hours.
- Add command line option -t | --lock-timeout with default to 3 seconds
to self terminate a SQL query that could be lock by the activity of
an other session like a drop table for example. Thanks to Christophe
Courtois for the feature request.
- Limit output length of usage to 80 characters.
- Fix for begin/end date filtering for sar data. Thanks to Christophe
Courtois for the patch.
- Fix failure of pidstat through ssh. Thanks to Christophe Courtois for
the patch.
- Verify that same statistic report is not built twice.
- Remove fork for collect of PostgreSQL metrics and add autodetection of
the main process pid when pid file is not found.
- Remove copyright from html footer.
- Split per database report in several HTML pages to avoid too large files.
Thanks to Andreas Schrafl for the report.
- Add collect of wait event if extension pg_wait_sampling is available
in a database. This collect can be disabled with new command line
option -w, --no-waitevent.
- Set hamburger dropdown menu background from transparent to grey. Thansk
to Andreas Schrafl for the patch.
- Fix missing report of tables and indexes statistics.
- Fix lookup at database list.
- Add collect of unused trigger functions. Thanks to Adrien Neyrat for
the feature request.
- Fix load of database list from binary files in CGI mode.
- Fix pidstat reports about CPU wait and iodelay with old systat version
where these information was not available. iodelay < sysstat v10.2.1
and wait < sysstat v11.5.5
- Add CGI reports for pidstat statistics.
- Add pidstat data caching.
- Fix link to page cluster-archive.html. Thanks to cyberioio for the
report.
- Fix view of configurations reports that was hidden. Thanks to Lionel for
the report.
- Fix formatting of README file for command line option.
- Add collect of PostgreSQL only system metrics through pidstat.
- Fix pgcluu error on reading compressed data files. Thanks to Damien
Clochard for the report.
- Fix wrong detection of --output option.
- Fix previous commit that was breaking GetOptions behaviors
- Do not take care of the STATS_REPORT_CACHING value in config file if
pgcluu is run in interactive mode with an ouptut directory (-o) and
not caching enabled (-c).
- Update year in copyright
- Fix Storable.pm error when reading empty file. Thanks to Christian Roux
for the report.
- Make update of system information stat file sysinfo.txt atomic to
prevent zero file size.
- Fix a bgwriter URL. Thanks to Guillaume Lelarge for the patch.
- Fix parsing of sar v12 header. Thanks to Christoph Berg for the report.
- Fix INPUT_DIR in generated pgcluu.conf. The path here must not have
DESTDIR prepended. Thanks to Christoph Berg for the patch.
- Prevent look at pg_statistic_ext if major version is bellow 10.0. Thanks
to Devrim Gunduz for the report.
- Fix use of DESTDIR vs PREFIX installation process. Thanks to Christoph
Berg for the report.
2019-10-29 - Version 3.1 released
This release is a maintenance release that adds support to PostgreSQL
v12.0. It also add a new report:
* Add report of extended statistics in report Table Statistics per
database. Example:
Table | Extended Statistic
public.cities | CREATE STATISTICS sch1.t1_stat (dependencies)
ON city,country FROM public.cities;
It also fixes some issues reported by users since last month:
- Fix some typos in documentation. Thanks to Justin Pryzby for the
report.
- Replace obsolete pg_constraint.consrc in PostgreSQL v12 by a call
to function pg_get_constraintdef(). Thanks to seadba and Devrim
Gunduz for the report.
2019-09-18 - Version 3.0 released
This release is a major release that adds lot of improvement and
new reports. It also improve performances and fully support a CGI
mode with dynamic content for realtime reports.
New or enhanced reports/features:
* The CGI mode to provide dynamic reports on time selection is now
production ready and has left the beta stage. See documentation
on how to enable it. Debian packaging enable this mode by default.
* Installation and configuration is fully managed from Makefile.PL
script. This will help distribution packaging with additional
configuration directives to control the behavior of pgcluu scripts
with generic systemd service and timer files.
* Add incremental mode to pgcluu. That mean that you don't have to
remove the content of the report directory anymore before running
pgcluu again and when pgcluu detect that you are running in this
mode. The incremental mode is detected from statistic directory
when you have used the --rotate-daily or --rotate-hourly option
to pgcluu_collectd.
* Rewrite Stats I/O reports to display read/hit per table or indexes
during the audit period reported.
* Move Xlog (Wal bytes written) report under replication menu as
data comes from pg_stat_replication.
* Explode System and Cluster reports into several reports dedicated
files to limit the size of the HTML files in incremental mode.
* Add collect and report of vm.nr_overcommit_hugepages.
* Add report on pages scanned to report number of pages scanned by
the kswapd daemon and number of pages scanned directly per second
(pgscank/s and pgscand/s). It also reports the number of pages
the system has reclaimed from cache (pagecache and swapcache) per
second to satisfy its memory demands (pgsteal/s). On a second
axis %vmeffto reports the the efficiency of page reclaim.
* All pages reports have been moved as sub menu of the Page menu and
pgfree has been removed from the page fault report.
* Limit system cache statistics report to pgpgin/s and pgpgout/s and
a new report is dedicated to Page fault statistics with majflt/s,
minflt/s and pgfree/s dataset. Dataset minflt/s is calculated from
sar output as result of "fault/s - majflt/s".
* All statistics about pg_stat_user_* and pg_stat_xact_user_* views
are now stored as a snapshot at start and at end of the audit
period and each hour if you are running in incremental mode. The
old behavior was to append the snapshot at each running interval
to the data file but this is not necessary and this can use huge
disk space if you have lot of table and indexes in your database.
Backward compatibility is preserved.
* New report of json versus jsonb columns in each database.
* Add keepalive kernel configuration in SysInfo report.
* Separate bgwriter "allocated" buffers in a dedicated report for
better reading.
* Add new report about estimated memory workload based on the value
of Committed_AS from /proc/meminfo. Committed_AS is the total
amount of memory estimated to complete the workload. This value
represents the worst case scenario value, and also includes swap
memory. The report show the memory workload aver the time.
New command line options:
- Add option -x, --external-menu to pgcluu to save the common menu
in menu.html and load it into each report using w3-include-html
attribute from w3.js. This will only work if access to HTML report
is through a Web server, not using the file:// protocol.
- Add new option --retention to pgcluu to set number of rolling days
to keep in report directory. Default is to store indefinitely.
- Add option --retention NDAYS to pgcluu_collectd to set the number
of rolling days to keep in data directory in incremental mode.
Default is to store indefinitely.
New configuration directives :
* Add configuration directive STATS_REPORT_CACHING to pgcluu.conf
file. This directive must be enabled in CGI mode. In this case the
pgcluu script must be run periodically at least each 5 minutes to
build and update cached statistics. In cache mode pgcluu generate
binary file in the statistics directory and nothing in the report
directory. The pgcluu.service and pgcluu.timer can be use, pgcluu
will read the configuration file and switch automatically to cache
mode if STATS_REPORT_CACHING is enabled.
* Add MAX_RENDERED_DAYS configuration directive to set the maximum
number of days in a graph. Using default pgcluu_collectd 1 minute
interval each, daily graph will have 1440 points. Having too much
data to render is not a good point for performances with the
current code. The user can set is own graph period, default is to
limit to the first seven days of the selected period. This mean a
maximum of 10080 points for one week, this seems a safe limit.
It also fixes some issues reported by users since last five months:
- New report on memory workload based on values of Committed_AS from
/proc/meminfo. Thanks to Jehan-Guillaume de Rorthais for the
feature request.
- Separate bgwriter "allocated" buffers in a dedicated report.
Thanks to Guillaume Lelarge for the report.
- Use MASK to 0022 for directory and file creation and add a note
about securing the stats repository in the source code.
It can be changed to 0027 if you want to secure the data directory
Note that in CGI mode the www-data user or group need read access
to all files in the stat directory. The systemd service files take
care of setting the privilege for the postgres and www-data users.
- Make perlcritic more happy.
- Try to handle automatically systemd RPM specific path in install
process (/lib/systemd/system/).
- Update resources files minimization.
- Fix declaration of config file.
- Change Perl installation paths to be vendor paths by default and
adapt path replacement by DESTDIR.
- Keep pgcluu.conf after a make clean to be able to see the content.
- Update documentation about new installation behavior.
- Fix perl replacement issues on service file
- Update MANIFEST and META.yml files
- Update path to man page in documentation.
- Replace DATADIR by STATDIR and HTMLDIR by RSCDIR in Makefile.PL.
Add missing REPORTDIR variable, default /var/lib/pgcluu/report.
- Change default PIDDIR to /var/run/postgresql.
- Replace path in services files following environment variables
defined with Makefile.PL.
- The configuration file pgcluu.conf is now auto-generated by script
Makefile.PL
- Add support to some new environment variables to fully customize
the installation paths (HTMLDIR,CGIDIR,CONFDIR,PIDDIR,DATADIR,
APACHECONF,MANDIR,DOCDIR,SYSTEMDDIR,RETENTION). Default are:
DESTDIR => /usr/local
INSTALLDIRS => site
CONFDIR => DESTDIR/etc
PIDDIR => /var/run
DATADIR => /var/lib/pgcluu/data
HTMLDIR => DESTDIR/share/pgcluu
CGIDIR => /usr/lib/cgi-bin
APACHECONF => /etc/apache2/conf-available
MANDIR => DESTDIR/share/man
DOCDIR => DESTDIR/share/doc
SYSTEMDIR => DESTDIR/lib/systemd/system
RETENTION => 0
If INSTALLDIRS is set to 'vendor':
CONFDIR => /etc
DESTDIR => /usr
The configuration file is auto-generated by the Makefile.PL script
and saved into CONFDIR/pgcluu.conf. If the destination file exists
it is not overridden. The file is saved as example in directory
DOCDIR/pgcluu/examples/pgcluu.conf.dist
The man page is saved as DESTDIR/share/man/pgcluu.1p.gz and a
symbolic link pgcluu_collectd.1p.gz is created to this file. The
documentation, README, changelog.gz, LICENSE files are saved under
DESTDIR/share/doc/.
For the CGI mode, resources (css & js files from the cgi-bin/rsc)
are saved under the DESTDIR/share/pgcluu/rsc directory. The CGI
script is saved under /usr/lib/cgi-bin/pgcluu.cgi. The Apache
configuration file under /etc/apache2/conf-available/pgcluu.conf
with a symbolic link /etc/apache2/conf-enabled/pgcluu.conf created
to this file. Its content:
Alias /pgcluu HTMLDIR/
<Directory HTMLDIR/>
Options FollowSymLinks MultiViews
AllowOverride None
Require local
#Require ip 192.1.168.0/24
</Directory>
The systemd files (pgcluu_collectd.service, pgcluu.service and
pgcluu.timer) are saved as examples into DOCDIR/pgcluu/examples/
and into the systemd directory SYSTEMDDIR/
The right path to the configuration file is set into all scripts
pgcluu, pgcluu_collectd and pgcluu.cgi. The path where the pid
file must be saved is replaced into pgcluu_collectd with the value
of PIDFILE variable.
- Enable configuration reading to pgcluu_collectd. The configuration
directive supported by this script is STATS_COLLECTD_RETENTION. It
is used to set the retention limit in the statistics directory
expressed in number of days. This directive is only used by script
pgcluu_collectd in incremental mode. Only the last number of days
will be preserved, obsolete directories will be removed. It can be
used to preserved disk space. Default store indefinitely.
- Enable configuration reading to script pgcluu. The configuration
directive supported by this script is STATS_REPORT_RETENTION. It
is used to set the retention limit in static html report directory
expressed in number of days. This directive is only used by pgcluu
in incremental mode. Only last number of days will be preserved,
obsolete directories will be removed. It can be used to preserved
disk space. Default store indefinitely.
- Fix some uninitialized variables during report generation of
pg_stat_user_tables and pg_stat_user_indexes.
- Set default configuration file path to /etc/pgcluu.conf and no
more /usr/local/etc/pgcluu.conf
- Change $CONFIG_FILE declaration in CGI script.
- Update copyright year.
- Limit number of days to process for a single time period
controlled by configuration directive MAX_RENDERED_DAYS.
- Disable Year and Month time selector for the moment, this is too
much data to render with the actual implementation of pgcluu.cgi
- Separate cluster / database actions.
- Only display latest information in CGI mode for all database
table and index reports that reports a list of statistics.
These informations can not be cumulated over time selection.
- Add map between actions and binary file to only load relevant
files
- Improve report generation by reading only required data.
- Prevent reading sar stat from data file when already read from
binary file.
- Fix multiple call to set_device_list() and compute_sarfile_stats()
- Only display latest information in CGI mode for menu Home, SysInfo
and Database.
- Fix offset caching for incremental mode.
- Fix missing call to dump_sar_binary() when build cache from hourly
rotation.
- Fix missing System menu on some condition.
- Submit immediately the time selector when day/week/month/year is
selected.
- Add more information on incremental mode to documentation.
- Fix CGI Time selector behavior.
- Fix calendar output for days that have already been processed.
- Fix issue in CPU parsing from sar output since addition of Softnet
stats in version 11.7.2.
- Update minified javascript files and add file w3.js to the list
of resources files.
- Add resources/w3.js Javascript library to be able to include a
HTML file into an other. Used to not include the menu in each HTML
file from menu.html.
- Explode cluster.html output into per report dedicated files to
limit the size of a HTML file in incremental mode. This should
be applied to other huge files (system.html and database-DB.html).
- Fix some HTML tags.
- Add documentation about Dynamic Reports generation using the CGI
mode. Thanks to Maiken Saveljev for most part of the installation
guide.
- Add information about incremental mode and --retention option at
end of pgcluu help.
- Add example for incremental mode at end of help message.
- Add a warning about storing indefinitely statistics with script
pgcluu_collectd that can fill disk space in the short or medium
term. Obsolete statistics can be removed using new command line
option '--retention ndays' with pgcluu_collectd.
- Update documentation about pgcluu_collectd --retention option.
Thanks to Christoph Courtois for the feature request.
- Document sorttable license. The license is called X11 in the
file, but MIT on the website. Stick with MIT because that's what
the other js files are using. Thanks to Christoph Berg for the
patch.
- Add pages reports changes to CGI.
- Add report on pages scanned to report number of pages scanned by
the kswapd daemon and number of pages scanned directly per second
(pgscank/s and pgscand/s). Thanks to Jehan-Guillaume de Rorthais
for the feature request.
- Additional fixes and improvements on CGI devices detection to
display system menu.
- Fix unwanted "no dataset" in table stats.
- Modifiy pgcluu to support new changes in pgcluu_collected about
pg_stat_(user|all)_* statistics storage. This patch also remove
use of global variable %all_vacuum_stats that was duplicating
storage with %all_stat_user_tables that already contain vacumm
and analyze statistics.
- Add description of %vmeff to reports.
- Fix missing wait of compression child process resulting in zombi
process. Thanks to Jehan Guillaume de Rorthais for the report.
- Suppress which command error in some distribution. Thanks to
Michael Vitale for the report.
2018-12-13 - Version 2.9 released
This release is a minor release that fix a major issue in the
interval detection. This This led to a bad scale in bg_writter,
replication and most database statistics reports. Everybody must
upgrade immediately.
It also fixes some issues reported by users since last release:
- Improve devices list retrieving and fix several menu issues.
- Fix checkpoint counter legend.
- Move query in pg_stat_statements at the right of the table for
better readability.
- Fix report of disk use, mounted devices, running processes,
crontab and installed package to avoid duplicate entries.
- Empty SysInfo arrays before reading sysinfo file, this prevent
duplicate data.
- Improve parsing of sar file.
- Fix interval that was set in milliseconds instead of second.
This conduct to wrong scale (ex: Kb instead of Gb) in bg_writter,
replication and database statistics reports. Thanks to Guillaume
Lelarge for the report.
2018-11-28 - Version 2.8 released
This release is a minor release that fix some issues reported by
users over past months, it also adds some new reports:
- Add disk space utilization report over time using df command
for sysstat version older than 11.1.4.
- Add report of percentage of disk space and inode used on each
file system. The information is available in sar output since
11.1.4 version. Thanks to Guillaume Lelarge for the feature
report.
- Add PageTables information in SysInfo memory report.
- Show database information about table/indexes in capture mode.
- Add report of number of tasks currently blocked, waiting for I/O
to complete "Run queue" report.
- Add new report about system dirty memory that need to be written
to disk as well as amount of active/inactive memory.
- Show highest dirty memory to write and highest number of processes
blocked in overall stats page.
- Add report of crontab entries for the user running pgcluu.
- Add report of installed PostgreSQL packages in main page.
New pgcluu_collectd command line option:
- Add command line option --package-list to be able to set a custom
command to list PostgreSQL packages. Default is to auto-detect
package type between rpm and dpkg, using command 'rpm -qa' or
'dpkg -l'. If you have an other system you can use this option to
set a custom command. A filter on keyword 'postgres' is appended
to the command: ' | grep postgres'.
Here are the complete list of bug fixes in this release:
- Change the way sysstat version is checked and save the version
into to sysinfo.txt file for use in pgcluu script.
- Remove extra new line at end of data file generated by the
patch on search_path securing.
- Add collect of disk space and inode used over time stored in file
fs_stat_use.csv. Need more work to avoid duplicate data with new
versions of sar that already report fs space use.
- Replace all call to Perl ternary operator with usual if-then-else
statement. In some condition this operator do not works and makes
pgcluu return negative values in overall stats. This was happening
only when pgcluu encounter a stat reset in the data files. Thanks
to Guillaume Lelarge for the report.
- Remove /dev/loop from devices statistics report.
- Add PageTables information in SysInfo memoryb report. Thanks to
Adrien Neyrat for the patch.
- Remove some unwanted metrics displayed in capture mode.
- Show database information about table/indexes in capture mode.
- Exclude /dev/loop from result of "df" command and squashfs from
"mount -l" command.
- Prevent pgcluu_collectd to stop before that all metrics collected
from the current loop have been written to disk. When it receives
the terminate signal (-k option) it previously stops immediately,
the problem was that this can conduct to empty or incomplete data
file. Now it waits until the loop is terminated before exiting.
- Fix compression of hourly directory when -R | --rotate-hourly and
-z | --compress options are enabled. The compression was called
each loop and not at each hour rotation.
- Add warning about mandatory use of -d option when pg_buffercache
reports are enabled (-B) but pg_buffercache extention is not found
in the connection database.
- Fix missing buffercache statistics since secure path has been
included in commit b61bf44. This required that pg_buffercache
table call was prefixed by the public schema. Thanks to
lobojohnson for the report.
- Fix unwanted print of tablespace path in cluster reports.
- Remove not useful information in buffercache graph legends.
- CSS: Increase size of the sysinfo panel.
- Adapt automatically pgCluu to changes in sar sysstat tool since
version 11.5.7. As per sysstat commit 8d635e0: Replace "rd_sec/s"
and "wr_sec/s" fields with "rkB/s" and "wkB/s". These fields are
now expressed in kilobytes instead of sectors. Replace "avgrq-sz"
field with "areq-sz". This field is now expressed in kilobytes
instead of sectors. Rename "avgqu-sz" field to "aqu-sz" to make
it consistent with iostat's output.
- Add report of number of tasks currently blocked, waiting for I/O
to complete to "Run queue" report. This information is available
with sysstat >= 9.1.7
- Show also highest dirty memory to write and highest number of
processes blocked in main page.
- Add new report about system dirty memory that need to be written
to disk as well as amount of active/inactive memory. These metrics
are available in recent sar/sysstat versions.
- Add report of crontab entries.
- Change icon for packages report.
- Add report of PostgreSQL installed package in main page.
- Add storage information about PostgreSQL packages installed on
the system.
- Add command line option --package-list to be able to set a custom
command to list PostgreSQL packages. Default is to auto-detect
package type between rpm and dpkg, using command 'rpm -qa' or
'dpkg -l'. If you have an other system you can use this option to
set a custom command. A filter on keyword 'postgres' is appended
to the command: ' | grep postgres'.
2018-07-09 - Version 2.7 released
This release is a minor release that fix some issues reported by
users over past year, it also adds some new reports:
- Add reports of pgbouncer wait for server statistics.
- Make pgCluu more compatible with PG10 and pgBouncer 1.8
- Add kernel vm.overcommit_kbytes configuration to report.
Here are the complete list of bug fixes in this release:
- Fix Prepared Transaction menu not disabled with no stat data.
- Fix typos and use proper measure in the graph. Thanks to Fabio Porta for the patch
- Add vm.overcommit_kbytes to kernel report. Thanks to Adrien Neyrat for the patch.
- Since version 1.8 of pgbouncer, the command "show stats" changed output. Make pgcluu compatible. Thanks to Fabio Pardi for the report and the mapping of changes.
- Fix issue in partitionning lookup.
- Secure search_path before executing SQL queries.
- Fix several use of unintialized variable case.
- Add missing function IsLeapYear. Thanks to Emmanuel Boucle for the patch.
- Fix report for network and disk devices in incremental mode.
- Fix unwanted Network menu when no network device are found.
- Fetch devices informations. Thanks to Adrien Neyrat for the patch.
- Dockerise pgcluu, the container helps run both the collection and the report generator. Thanks to Roy Golan for the patch.
- Disable System submenu when the corresponding report is not available.
- Append %idle to cpu report.
- Fix list of resources files. Thanks to Bosstek Consulting for the report.
- Change fetch_version() to be closer with the new versioning politic in 10.0 and above. Thanks to Julien Rouhaud for the patch.
- Makes pgcluu compatible with PostgreSQL 10.0.
2017-07-09 - Version 2.6 released
This release is a minor release that fix some issues reported by
users over past year but it also adds some new interesting reports:
* Add report on prepared transaction and oldest one in seconde
per database.
* Detect partitions and summarize information in a dedicated
report.
* Add kernel scheduler configuration for sched_autogroup_enabled
and sched_migration_cost_ns to sysinfo report.
* Add report of configuration files changes in incremental mode.
* Report on cancelled queries due to conflicts is now a time
based graph instead of a pie chart.
* bgwritter buffer clean, checkpoint and backend statistics are
now reported as bytes using size of 8192 per buffer.
* Add report of allocated buffers with bgwritter buffer statistics.
* Add report of transaction throughput per second.
* Show data checksum status.
* Add report of unlogged tables. Database with unlogged tables
will be listed in cluster view.
* Add hourly index when --rotate-hourly is enabled.
and useful features:
* Compatibility with PostgreSQL 10.0
* Add static index on main directory with incremental report
to link to the different days.
* Use bootstrap modal dialog windows to download graph as png.
* Autodetect interval between collected data to support interval
change during stats collect.
* Replace javascript call to dateToDisplay.toGMTString() with
dateToDisplay.toString(). Please note that this could not be
backward compatible with your previous timezone settings. See
pgcluu.js to revert the function call.
* Create DDL of missing index concurrently.
Here are the complete list of bug fixes in this release:
- Finalize systemd unit files. pgcluu_collectd.service is used to
start pgcluu_collectd in daemon mode. Other files, pgcluu.service
and pgcluu.timer to execute pgcluu periodically to generate reports.
- Add import of missing jqplot.canvasAxisLabelRenderer.min.js file used
to render axis labels in graphs.
- Set logo and icon on a single line in an url attribute as chrome
complain that it will be obsolete in M60.
- Add partitioning report and partition information into cache.
- Add hourly index when --rotate-hourly is enabled.
- Add support of partition information to cache mode.
- Fix unwanted exit in cache mode
- Cosmetic change in tooltip and download button. Main menu font size have also been improved.
- Update generated html to use Bootstrap 3 glyphicons.
- Add javascript and CSS sources, licences and download information for
packaging. Add a tool to minified and embedded the script and css into
pgcluu Perl script and copy the minified files into cgi-bin/rsc/
- Add minified resources file for CGI into cgi-bin/rsc
- Fix redundant index query. Thanks to Julien Rouhaud for the patch.
- Detect partitions and summarize information in a dedicated report.
Thanks to Julien Rouhaud for the patch.
- Refactor pidfile unlink handling. Thanks to Julien Rouhaud for
the patch.
- Limit call to pg_relation_size() when we are in capture mode.
Thanks to Guillaume Lelarge for the report.
- Add information about recheck of redundant index with primary key
and index on a column referencing a foreign key.
- Fix exclusion of UNIQUE index in redudant indexes report.
- Fix incremental global index on resize.
- Update year in copyright.
- Add index on main directory with incremental report to link to
the different days. Thanks to Heath Yob for the feature request.
- Add verification that pg_stat_statement is loaded from
shared_preload_libraries.
- Fix incomplete per-database-statistics. Thanks to Markus Braunig
for the report.
- Add kernel scheduler configuration for sched_autogroup_enabled
and sched_migration_cost_ns to sysinfo report. Thanks to Adrien
Nayrat for the patch.
- Fix broken main menu when no disk devices was present in sar
report.
- Allow to set label for y2axis in create_linegraph() parameters
- Change parameters and return of the get_diff() method to support
incremental mode.
- Create function get_diff() and shows_diff() to report
configuration file change.
- Append new color for line graph.
- Set missing database list with sysinfo and about menu.
- Fix Not a HASH reference in function reporting information about
indexes.
- Rename diff storage variables and stores them in binary file.
Initialyze storage variables for statistics that must be read
from file each time.
- Fix detection of working directories with dates over two months.
- Fix runqueue size report. Thanks to Thomas Reiss for the report.
- Create function to reuse the look for sysinfo file.
- pgcluu CGI now append new csv statistic to cached binary files.
- The menu is now built at end to avoid reading csv files first to
look for database, disk device and network interface.
- The CGI home page is now just built from the binary files to
speed up the first screen. As we do not append last data collected
from the csv files we indicate at which time the cache was last
built. This is to give a quick snapshot of the dashboard. When
looking at the statistics binary and csv files are both read.
If the cache have not been run yet, pgcluu will read dashboard
statistics from data fileis which takes longer to display.
- Allow incremental cache. When running in cache mode pgcluu will
append new csv statistics to old cached binary files. Then when
building reports, pgcluu will first load statistics from binary
files and complete statistics with data from csv file collected
after the last cache mode run. This mean that if cache mode is
run each minute on an incremental statistics collect (see option
-r or -R of pgcluu_collectd), pgcluu is able to create report very
quickly at any time. This is especially useful with CGI mode where
a full day statistics report can be displayed in few seconds.
- Fix diff of configuration files, old and new files was inversed.
Thanks to Adrien Nayrat for the report.
- Fix display of message no dataset on empty graphs.
- Update description of temporary files report and statistics
on checkpoints.
- Rewrite use of interval between collected data to support change
during collecting. Interval is now always calculated from the
difference between the current line end the previous line. This
mean that the first line is never present in reports with per
second statistics.
- Fix formatting of bytes in pretty number.
- Improve storage of database list with huge number of database.
- Fix timezone on all reports and remove graph per tablespace and
replace them with a list of tablespace and their location.
- Fix timezone on start and end timestamp of collect. Remove graph
per tablespace and replace them with a list of tablespace and
their location.
- Clear Start/End input box at startup in CGI.
- Comment and include REVERT_DATE toogle about sar date format
in CGI configuration file.
- Fix timezone and time selector in javascript menu.
- Fix use of timezone and date detection in sa file.
- Fix date parsing from sa text file.
- Fix some warning about use of undefined variables.
- Add link to last known statistics in CGI front page when no
data are found.
- Fix a call to timegm_nocheck()
- Split set_overall_stat_from_binary() in two function, one for
database orverall statistics and the other for system statistics.
- Fix parsing of sa file.
- Do not load statistic from the last day when hour:min is 00:00.
- Fix some bugs when there is just sar cached binary files.
- Fix two digit in date parts on start/end date.
- Fix cache mode when there is just sar file in entry.
- Add INCLUDE_DEV configuration directive to be able to filter
disk device. Allow comma as list separator in configuration file.
- Add information about how to parse sysstat sa binary and text file.
- Fix remove of unlogged tables following pg version.
- Fix colspan on unlogged table report.
- Add report of transaction throughput per second.
- Use psql -X option so .psqlrc doesn't get in the way. If .psqlrc
contains for example \timing, pgcluu_collectd will get confused.
Thanks to Christoph Berg for the patch.
- Separate svctm/await dataset on two different axes.
- Remove unwanted bgwriter stats prior pg 9.1
- Add data checksum status to CGI report.
- Fix autodetection of timezone and set default timezone for sar
statistics to the result of
perl -MPOSIX -e "print substr(strftime(\"%z\", localtime()), 0, 3);".
- Replace javascript call to dateToDisplay.toGMTString() with
dateToDisplay.toString(). Please note that this could not be
backward compatible with your previous timezone settings. See
pgcluu.js to revert the function call.
- Fix an issue with --from-sa-file where date was still incremented.
Thanks to Flavie Perette for the report.
- Replace sadf -D option by -d to obtain a compatible output.
- Separate svctm/await dataset on two different axes to be able to
see both dataset.
- Fix kernel parameter hugepage report when not available.
- Fix all call of psql that use both -f - and -c that doe not have
the same behavior in pg 9.6. Previous version does not care of
the -f stdin input when a command was provided with -c. This not
compatible anymore. Thanks to Vincent Laborie for the report.
- Fix collect of lock in pg_stat_activity with PostgreSQL 9.6.
Thanks to Vincent Laborie for the report.
2016-04-27 - Version 2.5 released
This release is a major release that fix some issues reported by
users over past year and a full replacement of the flotr2 javascript
chart library with jqplot.
There's also some new interesting reports:
* Add report for hash indexes.
* Keep track of pg_settings and database/roles settings changes and
show diff in the the reports.
* Add report of pending restart in pg settings view.
* Add information about percentage of timed against requested
checkpoints.
* Split database menu in submenu per set of 10 databases.
* Add report of tables without indexes and tables with more than
five indexes.
* Add report about invalid index after concurrency build.
* Add report of system and PostgreSQL uptime.
* Add report of last statistics reset per database and report of
last autovacuum and autoanalyze.
* Add report of bgwriter last statistics reset in Home/Cluster view.
* Add a non default configuration settings report.
and useful features:
* Autodetect timezone from csv data files and automatic adjustment
of chart axis.
* Add systemd start script.
* Add collect of crontab information.
* Add support to daylight saving.
* Add compatibility with PostgreSQL 9.5
* Add ablity to export plots data as csv
* Set legend table outside the graph.
* Display specific titles and description for overall graphs.
Note that a CGI script have been added to be able to perform temporal
lookup in incremental pgCluu statistics, with predefined year, month,
day and hour views. This is a work in progress, it will be available
in next major release.
Upgrade: you can safely override previous installation, backward
compatibility with 2.4 version is preserved.
Here are the complete list of bug fixes in this release:
- Add report for hash indexes. Thanks to Adrien Neyrat for the
patch.
- Fix detection of non official release like EnterpriseDB or devel.
Thanks to Piotr Gbyliczek for the patch.
- Add use of IO::File, some system was complaining about that.
Thanks to microtodd for the report.
- Only collect stored procedures count instead of name list.
- Refresh sysinfo.txt at each loop and order output per database
name.
- Fix capture mode with PostgreSQL version 8.4
- Fix some bug in capture report.
- Fix use of timezone in cluster/database related charts.
- Autodetect timezone from csv data files.
- Fix some documentation typo about systemd use and apply change to
pgcluu.pod.
- Fix systemd unit files. Thanks to gabx for the patch.
- Update README with systemd unit files usage
- Add collect of crontab information. It uses the current logged
username or postgres as default and it can be overriden with the
--cron-user command line.
- Do not collect metrics if previous time is upper than current time
This is to prevent storing statistics twice when hour change
during daylight saving. Thanks to brownbh3 for the report.
- Keep track of pg_settings and database/roles settings changes and
show diff in the the reports.
- Update comment on pg_settings columns.
- Add report of pending restart in pg settings view.
- Exclude from non default settings collect case where setting equal
boot_val.
- Add collect of pending_restart column from pg_settings (pg 9.5).
- Remove obsolete css file, it is replaced by font-awesome.min.css
- Keep track of configuration files changes by storing diff to files
Changes are sorted by date at bottom of the configuration reports.
- Fix range of icons in embedded fontawesome css.
- Fix report of number of xlog data written per second. Thanks to
Ronan Dunklau for the report.
- Add ablity to export plots data as csv. Thanks to Julien Rouhaud
for the patch.
- Fix/change some fontawesome icons.
- Fix menu height in pgcluu css.
- Add ablity to export plots data as csv
- Fix scale on yaxis sticks in javascript graphs.
- Report percentage between checkpoint timed and requested in legend
- Add information about percentage of timed against requested
checkpoints.
- Update with resources directory move.
- Move resources directory into cgi-bin/ to be less confusing.
- Update list of file in MANIFEST for pgcluu package.
- Fix top menu height and color in start/end date input box of CGI.
- Update html header with new .min.css and .min.js files
- Use minimalist version of CSS and Javascript and remove call to
sourceMappingURL
- Replace external font file fontawesome-webfont.ttf by the base64
embeded version.
- Removed by their optimised min files.
- Fix unparsed section in sysinfo.txt when file is generated from
a Windows server.
- When system information are missing, display a message.
- Remove Deadlocks end Temporary files menu when PostgreSQL version
id lower that 9.2.
- Fix y2axis on hit ratio and commit vs rollback reports. Thanks to
Guillaume Lelarge for the report.
- Fix report of huge page information.
- Fix an additional series 4 in background writer clean stats report
Thanks to Guillaume Lelarge for the report.
- Disable mouse click on disabled menu.
- Do not display empty deadlocks and temporary files informations if
PostgreSQL version is lower than 9.2. Thanks to Guillaume Lelarge
for the report.
- Prevent display of SysInfo menu when there is no such information.