pax_global_header00006660000000000000000000000064125501623760014521gustar00rootroot0000000000000052 comment=09472eaa18a3c717c067452f5474f246fcb62814 pgbadger-7.1/000077500000000000000000000000001255016237600131435ustar00rootroot00000000000000pgbadger-7.1/.gitignore000066400000000000000000000000231255016237600151260ustar00rootroot00000000000000# Swap files *.swp pgbadger-7.1/.perltidyrc000066400000000000000000000007421255016237600153300ustar00rootroot00000000000000--backup-and-modify-in-place --backup-file-extension=beforeTidy --block-brace-tightness=2 --brace-tightness=2 --closing-token-indentation=1 --continuation-indentation=4 --indent-columns=4 --maximum-line-length=134 --cuddled-else --opening-sub-brace-on-new-line --noopening-brace-on-new-line --nooutdent-labels --paren-tightness=2 --square-bracket-tightness=2 --vertical-tightness=0 --vertical-tightness-closing=0 --break-at-old-comma-breakpoints --entab-leading-whitespace=4 --tabs pgbadger-7.1/CONTRIBUTING.md000066400000000000000000000005331255016237600153750ustar00rootroot00000000000000# How to contribute # ##Before Submitting an issue## 1. Upgrade to the latest version of pgBadger and see if the problem remains 2. Look at the [closed issues](https://github.com/dalibo/pgbadger/issues?state=closed), we may have already answered a similar problem 3. [Read the doc](http://dalibo.github.com/pgbadger/). It is short and useful. pgbadger-7.1/ChangeLog000066400000000000000000002231361255016237600147240ustar00rootroot000000000000002015-07-11 version 7.1 This new release fixes some issues and adds a new report: * Distribution of sessions per application It also adds Json operators to SQL Beautifier. Here is the full list of changes/fixes: - Fix unwanted seek on old parsing position when log entry is stdin. Thanks to Olivier Schiavo for the report. - Try to fix a potential issue in log start/end date parsing. Thanks to gityerhubhere for the report. - Fix broken queries with multiline in bind parameters. Thank to Nicolas Thauvin for the report. - Add new report Sessions per application. Thanks to Keith Fiske for the feature request. - Add Json Operators to SQL Beautifier. Thanks to Tom Burnett and Hubert depesz Lubaczewski. - Makefile.PL: changed manpage section from '1' to '1p', fixes #237. Thanks to Cyril Bouthors for the patch. - Update Copyright date-range and installation instructions that was still refering to version 5. Thanks to Steve Crawford for the report. - Fix typo in changelog Note that new official releases must now be downloaded from GitHub and no more from SourceForge. Download at https://github.com/dalibo/pgbadger/releases 2015-05-08 version 7.0 This major release adds some more useful reports and features. * New report about events distribution per 5 minutes. * New per application details (total duration and times executed) for each query reported in Top Queries reports. The details are visible from a new button called "App(s) involved". * Add support to auto_explain extension. EXPLAIN plan will be added together with top slowest queries when available in log file. * Add a link to automatically open the explain plan on http://explain.depesz.com/ * New report on queries cumulated durations per user. * New report about the Number of cancelled queries (graph) * New report about Queries generating the most cancellation (N) * New report about Queries most cancelled. Here is the full list of changes/fixes: - Update documentation with last reports. - Fix number of event samples displayed in event reports. - Add new report about events distribution per x minutes. - Add app=%a default prefix to documentation. - Add reports of "App(s) involved" with top queries. Thanks to Antti Koivisto for the feature request. - Remove newline between a ) and , in the beautifier. - Add link to automatically open the explain plan on http://explain.depesz.com/ - Add support to auto_explain, EXPLAIN plan will be added together with top slowest queries when available in the log file. - Add a graph on distributed duration per user. Thanks to Korriliam for the patch. - Add tree new report: Number of cancelled queries (graph), Queries generating the most cancellation (N) and Queries most cancelled lists. Thanks to Thomas Reiss for the feature request. - Fix case where temporary file statement must be retrieved from the previous LOG statement and not in the following STATEMENT log entry. Thanks to Mael Rimbault for the report. - Add --enable-checksum to show a md5 hash of each reported queries. Thanks to Thomas Reiss for the feature request. 2015-04-13 version 6.4 This new release fixes a major bugs in SQL beautifier which removed operator and adds some useful improvement in anonymization of parameters values. pgBadger will also try to parse the full csvlog when a broken CSV line is encountered. - Make anonymization more useful. Thanks to Hubert depesz Lubaczewski for the patch. - Fix previous patch for csvlog generated with a PostgreSQL version before 9.0. - Try continue CSV parsing after broken CSV line. Thanks to Sergey Burladyan for the patch. - Fix bug in SQL beautifier which removed operator. Thanks to Thomas Reiss for the report. - Fix loop exit, check terminate quickly and correct comments indentation. Thanks to Sergey Burladyan for the patch Please upgrade. 2015-03-27 version 6.3 This new release fixes some bugs and adds some new reports: * A new per user details (total duration and times executed) for each query reported in Top Queries reports. The details are visible from a new button called "User(s) involved". * Add "Average queries per session" and "Average queries duration per session" in Sessions tab of the Global statistics. * Add connection time histogram. * Use bar graph for Histogram of query times and sessions times. There's also some cool new features and options: * Add -L | --logfile-list option to read a list of logfiles from an external file. * Add support to log_timezones with + and - signs for timestamp with milliseconds (%m). * Add --noreport option to instruct pgbadger to not build any HTML reports in incremental mode. pgBadger will only create binary files. * Add auto detection of client=%h or remote=%h from the log so that adding a prefix is not needed when it respect the default of pgbadger. * Redefine sessions duration histogram bound to be more accurate. * Add new option -M | --no-multiline to not collect multi-line statement and avoid storing and reporting garbage when needed. * Add --log-duration option to force pgbadger to associate log entries generated by both log_duration=on and log_statement=all. The pgbadger_tools script have also been improve with new features: * Add a new tool to pgbadger_tool to output top queries in CSV format for follow-up analysis. * Add --explain-time-consuming and --explain-normalized options to generate explain statement about top time consuming and top normalized slowest queries. Here is the full list of changes/fixes: - Update flotr2.min.js to latest github code. - Add per user detail information (total duration and times executed) for each query reported in "Time consuming queries", "Most frequent queries" "and Normalized slowest queries". The details are visible from a new button called "User(s) involved" near the "Examples" button. Thanks to Guillaume Le Bihan for the patch and tsn77130 for the feature request. - pgbadger_tool: add tool to output top queries to CSV format, for follow-up analysis. Thanks to briklen for the patch. - Add geometric operators to SQL beautifier. Thanks to Rodolphe Quiedeville for the report. - Fix non closing session when a process crash with message: "terminating connection because of crash of another server process". Thanks to Mael Rimbault for the report. - Add -L|--logfile-list command line option to read a list of logfiles from a file. Thanks to Hubert depesz Lubaczewski for the feature request. - Automatically remove %q from prefix. Thanks to mbecroft for report. - Do not store DEALLOCATE log entries anymore. - Fix queries histogram where range was not appears in the right order. Thanks to Grzegorz Garlewicz for the report. - Fix min yaxis in histogram graph. Thanks to grzeg1 for the patch. - Add --log-duration command line option to force pgbadger to associate log entries generated by both log_duration = on and log_statement=all. Thanks to grzeg1 for the feature request. - Small typographical corrections. Thanks to Jefferson Queiroz Venerando and Bill Mitchell the patches. - Reformat usage output and add explanation of the --noreport command line option. - Fix documentation about minimal pattern in custom log format. Thanks to Julien Rouhaud for the suggestion. - Add support to log_timezones with + and - signs to timestamp with milliseconds (%m). Thanks to jacksonfoz for the patch. pgbadger was not recognize log files with timezones like 'GMT+3'. - Add --noreport command line option to instruct pgbadger to not build any reports in incremental mode. pgBadger will only create binary files. Thanks to hubert Depesz Lubaczewski for the feature request. - Add time consuming information in tables of Queries per database... Thanks to Thomas for the feature request. - Add more details about the CSV parser error. It now prints the line number and the last parameter that generate the failure. This should allow to see the malformed log entry. - Change substitution markup in attempt to fix a new look-behind assertions error. Thanks to Paolo Cavallini for the report. - Use bar graph for Histogram of query times and sessions times. - Fix wrong count of min/max queries per second. Thanks to Guillaume Lelarge for the report. Add COPY statement to SELECT or INSERT statements statistics following the copy direction (stdin or stdout). - Fix Illegal division by zero at line 3832. Thanks to MarcoTrek for the report. - Add "Average queries per session" and "Average queries duration per session" in Sessions tab of the Global stat. Thanks to Guillaume Lelarge for the feature request. - Reformat numbers in pie graph tracker. Thanks to jirihlinka for the report. - pgbadger_tools: Add --explain-time-consuming and --explain-normalized to generate explain statement about top time consuming and top normalized slowest queries. Thanks to Josh Kupershmid fot the feature request. - Remove everything than error information from json output when -w | --watch-mode is enable. Thanks to jason. - Fix undefined subroutine encode_json when using -x json. Thanks to jason for the report. - Add auto detection of client=%h or remote=%h from the log so that adding a prefix is not needed when it respect the default of pgbadger. - Redefine sessions duration histogram bound to be more accurate. Thanks to Guillaume Lelarge for the report. - Add connection time histogram. Thanks to Guillaume Lelarge for the feature request. - Add new option -M | --no-multiline to not collect multi-line statement to avoid garbage especially on errors that generate a huge report. - Do not return SUCCESS error code 0 when aborted or something fails. Thanks to Bruno Almeida for the patch. 2014-10-07 version 6.2 This is a maintenance release to fix a regression in SQL traffic graphs and fix some other minor issues. The release also add a new option -D or --dns-resolv to map client ip addresses to FQDN without having log_hostname enabled on the postgresql's configuration - Do not display queries in Slowest individual, Time consuming and Normalized slowest queries reports when there is no duration in log file. Display NO DATASET instead. - Fix min/max queries in SQL traffic that was based on duration instead of query count. - Fix wrong unit to Synced files in Checkpoints files report. Thanks to Levente Birta for the report. - Enable allow_loose_quotes in Text::CSV_XS call to fix CSV parsing error when fields have quote inside an unquoted field. Thanks to Josh Berkus for the report. - Add -D | --dns-resolv command line option to replace ip addresses by their DNS name. Be warned that this can slow down pgBagder a lot. Thanks to Jiri Hlinka for the feature request. 2014-09-25 version 6.1 This release fix some issues and adds some new features. It adds a new option -B or --bar-graph to use bar instead of line in graphs. It will also keep tick formatting when zooming. The release also add a new program: pgbadger_tools to demonstrate how to works with pgBadger binary files to build your own new feature. The first tools 'explain-slowest' allow printing of top slowest queries as EXPLAIN statements. There's also additional options to execute automatically the statements with EXPLAIN ANALYZE and get the execution plan. See help of the program for more information or the README file in the tools directory. Some modifications will change certain behavior: - The -T | --title text value will now be displayed instead of the pgBadger label right after the logo. It was previously displayed on mouse over the pgBadger label. Here is the full list of changes/fixes: - Change -T | --title position on pgBadger report. Title now override the pgBadger label. Thanks to Julien Rouhauld for the patch. - Add --file-per-query and --format-query option to write each slowest query in separate file named qryXXX.sql and perform minimal formating of the queries. Thanks to Rodolphe Quiedeville for the patch. - Remove debug query from explain-slowest tool. - Fix surge in sessions number report when an exclusion or inclusion option (dbname, user, appname, etc.) is used. Thanks to suyah for the report. - Fix fatal error when remote log file is 0 size. Thanks to Julien Rouhaud for the report. - Allow pgbadger_tools --explain-slowest to automatically execute the EXPLAIN statements an report the plan. See pgbadger_tools --help for more explanation. - Add --analyze option to replace EXPLAIN statements by EXPLAIN (ANALYZE, VERBOSE, BUFFERS). - Move pgbadger_tools program and README.tools into the tools/ subdirectory with removing the extension. Add more comments and explanations. - Fix case where die with interrupt signal is received when using -e option. Thanks to Lloyd Albin for the report. - Add a new program pgbadger_tools to demonstrate how to deal with pgBadger binary files to build your own new feature. The first one 'explain-slowest' allow printing of top slowest queries as EXPLAIN statements. - Keep tick formatting when zooming. Thanks to Julien Rouhaud for the patch. - Fix automatic detection of rsyslogd logs. Thanks to David Day for the report. - Fix issue in calculating min/max/avg in "General Activity" report. It was build on the sum of queries duration per minutes instead of each duration. Thanks to Jayadevan M for the report. - The same issue remains with percentile that are build using the sum of duration per minutes and doesn't represent the real queries duration. - This commit also include a modification in convert_time() method to reports milliseconds. - Add -B or --bar-graph command line option to use bar instead of line in graph. Thanks to Bart Dopheide for the suggestion. - Fix Checkpoint Wal files usage graph title. 2014-08-08 version 6.0 This new major release adds some new features like automatic cleanup of binary files in incremental mode or maximum number of weeks for reports retention. It improve the incremental mode with allowing the use of multiprocessing with multiple log file. It also adds report of query latency percentile on the general activity table (percentiles are 90, 95, 99). There's also a new output format: JSON. This format is good for sharing data with other languages, which makes it easy to integrate pgBadger's result into other monitoring tools. You may want to expose your reports but not the data, using the --anonymize option pgBadger will be able to anonymize all literal values in the queries. Sometime select to copy a query from the report could be a pain. There's now a click-to-select button in front of each query that allow you to just use Ctrl+C to copy it on clipboard The use of the new -X option also allow pgBadger to write out extra files to the outdir when creating incremental reports. Those files are the CSS and Javascript code normally repeated in each HTLM files. Warning: the behavior of pgBadger in incremental mode has changed. It will now always cleanup the output directory of all the obsolete binary file. If you were using those files to build your own reports, you can prevent pgBadger to remove them by using the --noclean option. Note that if you use the retention feature, all those files in obsolete directories will be removed too. Here is the complete list of changes. - Javascript improvement to use only one call of sql_select and sql_format. Use jQuery selector instead of getElementById to avoid js errors when not found. Thanks to Julien Rouhaud for the patches. - Add -R | --retention command line option to set the maximum number of week reports to preserve in the output directory for incremental mode. Thanks to Kong Man for the feature request. - Session count is immediately decreased when a FATAL error is received in the current session to prevent overcount of simultaneous session number. Thanks to Josh Berkus for the report. - Fix issue in incremental mode when parsing is stopped after rotating log and rotated log has new lines. The new file was not parsed at all. Thanks to CZAirwolf for the report. - Fix revert to single thread when last_line_parsed exists. Thanks to Bruno Almeida for the report. - Fix issue in handling SIGTERM/SIGINT that cause pgbadger to continue. - Add autoclean feature to pgbadger in incremental mode. pgbadger will now removed automatically obsolete binary files unless you specify --noclean at command line. - Add new command line option --anonymize to obscure all literals in queries/errors to hide confidential data. Thanks to wmorancfi for the feature request. - Fix single "SELECT;" as a query in a report. Thanks to Marc Cousin for the report. - Add a copy icon in front of each query in the report to select the entire query. Thanks to Josh Berkus for the feature request. - Fix wrong move to beginning of a file if the file was modified after have been parsed a time. Thanks to Herve Werner for the report. - Allow pgBadger to write out extra files to outdir when creating incremental reports. Require the use of the -X or --extra-files option in incremental mode. Thanks to Matthew Musgrove for the feature request. - Fix incomplete handling of XZ compressed format. - Fix move to offset in incremental mode with multiprocess and incomplete condition when file is smaller than the last offset. Thanks to Herve Werner for the report. - Allow/improve incremental mode with multiple log file and multiprocess. - Fix incorrect location of temporary file storing last parsed line in multiprocess+incremental mode. Thanks to Herve Werner for the report. - Fix remote ssh command error sh: 2: Syntax error: "|" unexpected. Thanks to Herve Werner for the report. - Fix missing database name in samples of top queries reports. Thanks to Thomas Reiss for the report. - Add minimal documentation about JSON output format. - Add execute attribute to pgbadger in the source repository, some may find this more helpful when pgbadger is not installed and executed directly from this repository. - Fix issue with csv log format and incremental mode. Thanks to Suya for the report and the help to solve the issue. There also a fix to support autovacuum statistic with csv format. - Fix bad URL to documentation. Thanks to Rodolphe Quiedeville for the report. - Two minor change to made easier to use Tsung scenario: Remove the first empty line and replace probability by weight. Now it is possible to use the scenario as is with Tsung 1.5. - Fix incremental mode where weeks on index page start on sunday and week reports start on monday. Thanks to flopma and birkosan for the report. - Replace label "More CPU costly" by "Highest CPU-cost". Thanks to Marc Cousin for the suggestion. - Add query latency percentile to General Activity table (percentiles are 90, 95, 99). Thanks to Himanchali for the patch. - Fix typon pgbadger call. Thanks to Guilhem Rambal for the report. - Add JSON support for output format. JSON format is good for sharing data with other languages, which makes it easy to integrate pgBadger's result into other monitoring tools like Cacti or Graphite. Thanks to Shanzhang Lan for the patch. - Update documentation about remote mode feature. - Update documentation to inform that the xz utility should be at least in version 5.05 to support the --robot command line option. Thanks to Xavier Millies-Lacroix for the report. - Fix remote logfile parsing. Thanks to Herve Werner for the report. 2014-05-05 version 5.1-1 - Fix parsing of remote log file, forgot to apply some patches. Thank to Herve Werner for the report. 2014-05-04 version 5.1 This new release fixes several issues and adds several new features like: * Support to named PREPARE and EXECUTE queries. They are replaced by the real prepare statement and reported into top queries. * Add new --exclude-line command line option for excluding immediately log entries matching any regex. * Included remote and client information into the most frequent events. * pgBadger is now able to parse remote logfiles using a password less ssh connection and generate locally the reports. * Histogram granularity can be adjusted using the -A command line option. * Add new detail information on top queries to show when the query is a bind query. * Support to logfile compressed using the xz compression format. * Change week/day menu in incremental index, it is now represented as usual with a calendar view per month. * Fix various compatibility issue with Windows and Perl 5.8 Here is the full list of changes: - fixed calendar display and correct typo. Thanks to brunomgalmeida for the patch. - revert to single thread if file is small. Thanks to brunomgalmeida for the patch. - print calendars 4+4+4 instead of 3+4+4+1 when looking at full year. Thanks to brunomgalmeida for the patch. - Add --exclude-line option for excluding log entries with a regex based on the full log line. Thanks to ferfebles for the feature request. - Fix SQL keywords that was beautified twice. - Remove duplicate pg_keyword in SQL beautifier. - Fix increment of session when --disable-session is activated. - Fix missing unit in Checkpoints Activity report when time value is empty. Thanks to Herve Werner for the report. - Fix double information in histogram data when period is the hour. - Add support to named PREPARE and EXECUTE queries. Calls to EXECUTE statements are now replaced by the prepared query and show samples with parameters. Thanks to Brian DeRocher for the feature request. - Included Remote and Client information into the most frequent events examples. Thanks to brunomgalmeida for the patch. - Fix documentation about various awkward phrasings, grammar, and spelling. Consistently capitalize "pgBadger" as such, except for command examples which should stay all-lowercase. Thanks to Josh Kupershmidt for the patch. - Fix incremental mode on Windows by replacing %F and %u POSIX::strftime format to %Y-%m-%d and %w. Thanks to dthiery for the report. - Remove Examples button when there is no examples available. - Fix label on tips in histogram of errors reports. - Fix error details in incremental mode in Most Frequent Errors/Events report. Thanks to Herve Werner for the report. - Fix Sync time value in Checkpoints buffers report. Thanks to Herve Werner for the report. - Fix wrong connections per host count. Thanks to Herve Werner for the report. - Allow pgBadger to parse remote log file using a password less ssh connection. Thanks to Orange OLPS department for the feature request. - Histogram granularity can be adjusted using the -A command line option. By default they will report the mean of each top queries or errors occurring per hour. You can now specify the granularity down to the minute. Thanks to Orange OLPS department for the feature request. - Add new detail information on top queries to show when the query is a bind query. Thanks to Orange OLPS department for the feature request. - Fix queries that exceed the size of the container. - Add unit (seconds) to checkpoint write/sync time in the checkpoints activity report. Thanks to Orange OLPS department for the report. - Fix missing -J option in usage. - Fix incomplete lines in split logfile to rewind to the beginning of the line. Thanks to brunomgalmeida for the patch. - Fix tsung output and add tsung xml header sample to output file. - Make it possible to do --sample 0 (prior it was falling back to the default of 3). Thanks to William Moran for the patch. - Fix xz command to be script readable and always have size in bytes: xz --robot -l %f | grep totals | awk "{print $5}" - Add support to logfile compressed by the xz compression format. Thanks to Adrien Nayrat for the patch. - Do not increment queries duration histogram when prepare|parse|bind log are found, but only with execute log. Thanks to Josh Berkus for the report. - Fix normalization of error message about unique violation when creating intermediate dirs. Thanks to Tim Sampson for the report. - Allow use of Perl metacharacters like [..] in application name. Thanks to Magnus Persson for the report. - Fix dataset tip to be displayed above image control button. Thanks to Ronan Dunklau for the fix. - Renamed the Reset bouton to "To Chart" to avoid confusion with unzoom feature. - Fix writing of empty incremental last parsed file. - Fix several other graphs - Fix additional message at end of query or error when it was logged from application output. Thanks to Herve Werner for the report. - Fix checkpoint and vacuum graphs when all dataset does not have all values. Thanks to Herve Werner for the report. - Fix week numbered -1 in calendar view. - Change week/day menu in incremental index, it is now represented as usual with a calendar view per month. Thanks to Thom Brown for the feature request. - Load FileHandle to fix error: Can not locate object method "seek" via package "IO::Handle" with perl 5.8. Thanks to hkrizek for the report. - Fix count of queries in progress bar when there is compressed file and multiprocess is enabled. Thanks to Johnny Tan for the report. - Fix debug message "Start parsing at offset" - Add ordering in queries times histogram. Thanks to Ulf Renman for the report. - Fix various typos. Thanks to Thom Brown for the patch. - Fix Makefile error, "WriteMakefile: Need even number of args at Makefile.PL" with Perl 5.8. Thanks to Fangr Zhang for the report. - Fix some typo in Changelog 2014-02-05 version 5.0 This new major release adds some new features like incremental mode and SQL queries times histogram. There is also a hourly graphic representation of the count and average duration of top normalized queries. Same for errors or events, you will be able to see graphically at which hours they are occurring the most often. The incremental mode is an old request issued at PgCon Ottawa 2012 that concern the ability to construct incremental reports with successive runs of pgBadger. It is now possible to run pgbadger each days or even more, each hours, and have cumulative reports per day and per week. A top index page allow you to go directly to the weekly and daily reports. This mode have been build with simplicity in mind so running pgbadger by cron as follow: 0 23 * * * pgbadger -q -I -O /var/www/pgbadger/ /var/log/postgresql.log is enough to have daily and weekly reports viewable using your browser. You can take a look at a sample report at http://dalibo.github.io/pgbadger/demov5/index.html There's also a useful improvement to allow pgBadger to seek directly to the last position in the same log file after a successive execution. This feature is only available using the incremental mode or the -l option and parsing a single log file. Let's say you have a weekly rotated log file and want to run pgBadger each days. With 2GB of log per day, pgbadger was spending 5 minutes per block of 2 GB to reach the last position in the log, so at the end of the week this feature will save you 35 minutes. Now pgBadger will start parsing new log entries immediately. This feature is compatible with the multiprocess mode using -j option (n processes for one log file). Histogram of query times is a new report in top queries slide that shows the query times distribution during the analyzed period. For example: Range Count Percentage -------------------------------------------- 0-1ms 10,367,313 53.52% 1-5ms 799,883 4.13% 5-10ms 451,646 2.33% 10-25ms 2,965,883 15.31% 25-50ms 4,510,258 23.28% 50-100ms 180,975 0.93% 100-500ms 87,613 0.45% 500-1000ms 5,856 0.03% 1000-10000ms 2,697 0.01% > 10000ms 74 0.00% There is also some graphic and report improvements, like the mouse tracker formatting that have been reviewed. It now shows a vertical crosshair and all dataset values at a time when mouse pointer moves over series. Automatic queries formatting has also been changed, it is now done on double click event as simple click was painful when you want to copy some part of the queries. The report "Simultaneous Connections" has been relabeled into "Established Connections", it is less confusing as many people think that this is the number of simultaneous sessions, which is not the case. It only count the number of connections established at same time. Autovacuum reports now associate database name to the autovacuum and autoanalyze entries. Statistics now refer to "dbname.schema.table", previous versions was only showing the pair "schema.table". This release also adds Session peak information and a report about Simultaneous sessions. Parameters log_connections and log_disconnections must be enabled in postgresql.conf. Complete ChangeLog: - Fix size of SQL queries columns to prevent exceeding screen width. - Add new histogram reports on top normalized queries and top errors or event. It shows at what hours and in which quantity the queries or errors appears. - Add seeking to last parser position in log file in incremental mode. This prevent parsing all the file to find the last line parse from previous run. This only works when parsing a single flat file, -j option is permitted. Thanks to ioguix for the kick. - Rewrite reloading of last log time from binary files. - Fix missing statistics of last parsed queries in incremental mode. - Fix bug in incremental mode that prevent reindexing a previous day. Thanks to Martin Prochazka for the great help. - Fix missing label "Avg duration" on column header in details of Most frequent queries (N). - Add vertical crosshair on graph. - Fix case where queries and events was not updated when using -b and -e command line. Thanks to Nicolas Thauvin for the report. - Fix week sorting on incremental report main index page. Thanks to Martin Prochazka for the report. - Add "Histogram of query times" report to show statistics like 0-100ms : 80%, 100-500ms :14%, 500-1000ms : 3%, > 1000ms : 1%. Thanks to tmihail for the feature request. - Format mouse tracker on graphs to show all dataset value at a time. - Add control of -o vs -O option with incremental mode to prevent wrong use. - Change log level of missing LAST_PARSED.tmp file to WARNING and add a HINT. - Update copyright date to 2014 - Fix empty reports of connections. Thanks to Reeshna Ramakrishnan for the report. - Fix display of connections peak when no connection was reported. - Fix warning on META_MERGE for ExtUtils::MakeMaker < 6.46. Thanks to Julien Rouhaud for the patch. - Add documentation about automatic incremental mode. - Add incremental mode to pgBadger. This mode will build a report per day and a cumulative report per week. It also create an index interface to easiest access to the different report. Must be run, for example, as: pgbadger /var/log/postgresql.log.1 -I -O /var/www/pgbadger/ after a daily PostgreSQL log file rotation. - Add -O | --outdir path to specify the directory where out file must be saved. - Automatic queries formatting is now done on double click event, simple click was painful when you want to copy some part of the queries. Thanks to Guillaume Smet for the feature request. - Remove calls of binmode to force html file output to be utf8 as there is some bad side effect. Thanks to akorotkov for the report. - Remove use of Time::HiRes Perl module as some distributions does not include this module by default in core Perl install. - Fix "Wide character in print" Perl message by setting binmode to :utf8. Thanks to Casey Allen Shobe for the report. - Fix application name search regex to handle application name with space like "pgAdmin III - Query Tool". - Fix wrong timestamps saved with top queries. Thanks to Herve Werner for the report. - Fix missing logs types statitics when using binary mode. Thanks to Herve Werner for the report. - Fix Queries by application table column header: Database replaced by Application. Thanks to Herve Werner for the report. - Add "Max number of times the same event was reported" report in Global stats Events tab. - Replace "Number of errors" by "Number of ERROR entries" and add "Number of FATAL entries". - Replace "Number of errors" by "Number of events" and "Total errors found" by "Total events found" in Events reports. Thanks to Herve Werner for the report. - Fix title error in Sessions per database. - Fix clicking on the info link to not go back to the top of the page. Thanks to Guillaume Smet for the report and solution. - Fix incremental report from binary output where binary data was not loaded if no queries were present in log file. Thanks to Herve Werner for the report. - Fix parsing issue when log_error_verbosity = verbose. Thanks to vorko for the report. - Add Session peak information and a report about Simultaneous sessions. log_connections+log_disconnections must be enabled in postgresql.conf. - Fix wrong requests number in Queries by user and by host. Thanks to Jehan-Guillaume de Rorthais for the report. - Fix issue with rsyslog format failing to parse logs. Thanks to Tim Sampson for the report. - Associate autovacuum and autoanalyze log entry to the corresponding database name. Thanks to Herve Werner for the feature request. - Change "Simultaneous Connections" label into "Established Connections", it is less confusing as many people think that this is the number of simultaneous sessions, which is not the case. It only count the number of connections established at same time. Thanks to Ronan Dunklau for the report. 2013-11-08 version 4.1 This release fixes two major bugs and some others minor issues. There's also a new command line option --exclude-appname that allow exclusion from the report of queries generated by a specific program, like pg_dump. Documentation have been updated with a new chapter about building incremental reports. - Add log_autovacuum_min_duration into documentation in chapter about postgresql configuration directives. Thanks to Herve Werner for the report. - Add chapter about "Incremental reports" into documentation. - Fix reports with per minutes average where last time fraction was not reported. Thanks to Ludovic Levesque and Vincent Laborie for the report. - Fix unterminated comment in information popup. Thanks to Ronan Dunklau for the patch. - Add --exclude-appname command line option to eliminate unwanted traffic generated by a specific application. Thanks to Steve Crawford for the feature request. - Allow external links use into URL to go to a specific report. Thanks to Hubert depesz Lubaczewski for the feature request. - Fix empty reports when parsing compressed files with the -j option which is not allowed with compressed file. Thanks to Vincent Laborie for the report. - Prevent progress bar length to increase after 100% when real size is greater than estimated size (issue found with huge compressed file). - Correct some spelling and grammar in ChangeLog and pgbadger. Thanks to Thom Brown for the patch. - Fix major bug on SQL traffic reports with wrong min value and bad average value on select reports, add min/max for select queries. Thanks to Vincent Laborie for the report. 2013-10-31 - Version 4.0 This major release is the "Say goodbye to the fouine" release. With a full rewrite of the reports design, pgBadger has now turned the HTML reports into a more intuitive user experience and professional look. The report is now driven by a dynamic menu with the help of the embedded Bootstrap library. Every main menu corresponds to a hidden slide that is revealed when the menu or one of its submenus is activated. There's also the embedded font Font Awesome webfont to beautify the report. Every statistics report now includes a key value section that immediately shows you some of the relevant information. Pie charts have also been separated from their data tables using two tabs, one for the chart and the other one for the data. Tables reporting hourly statistics have been moved to a multiple tabs report following the data. This is used with General (queries, connections, sessions), Checkpoints (buffer, files, warnings), Temporary files and Vacuums activities. There's some new useful information shown in the key value sections. Peak information shows the number and datetime of the highest activity. Here is the list of those reports: - Queries peak - Read queries peak - Write queries peak - Connections peak - Checkpoints peak - WAL files usage Peak - Checkpoints warnings peak - Temporary file size peak - Temporary file number peak Reports about Checkpoints and Restartpoints have been merged into a single report. These are almost one in the same event, except that restartpoints occur on a slave cluster, so there was no need to distinguish between the two. Recent PostgreSQL versions add additional information about checkpoints, the number of synced files, the longest sync and the average of sync time per file. pgBadger collects and shows this information in the Checkpoint Activity report. There's also some new reports: - Prepared queries ratio (execute vs prepare) - Prepared over normal queries - Queries (select, insert, update, delete) per user/host/application - Pie charts for tables with the most tuples and pages removed during vacuum. The vacuum report will now highlight the costly tables during a vacuum or analyze of a database. The errors are now highlighted by a different color following the level. A LOG level will be green, HINT will be yellow, WARNING orange, ERROR red and FATAL dark red. Some changes in the binary format are not backward compatible and the option --client has been removed as it has been superseded by --dbclient for a long time now. If you are running a pg_dump or some batch process with very slow queries, your report analysis will be hindered by those queries having unwanted prominence in the report. Before this release it was a pain to exclude those queries from the report. Now you can use the --exclude-time command line option to exclude all traces matching the given time regexp from the report. For example, let's say you have a pg_dump at 13:00 each day during half an hour, you can use pgbadger as follows: pgbadger --exclude-time "2013-09-.* 13:.*" postgresql.log If you are also running a pg_dump at night, let's say 22:00, you can write it as follows: pgbadger --exclude-time '2013-09-\d+ 13:[0-3]' --exclude-time '2013-09-\d+ 22:[0-3]' postgresql.log or more shortly: pgbadger --exclude-time '2013-09-\d+ (13|22):[0-3]' postgresql.log Exclude time always requires the iso notation yyyy-mm-dd hh:mm:ss, even if log format is syslog. This is the same for all time-related options. Use this option with care as it has a high cost on the parser performance. 2013-09-17 - version 3.6 Still an other version in 3.x branch to fix two major bugs in vacuum and checkpoint graphs. Some other minors bugs has also been fixed. - Fix grammar in --quiet usage. Thanks to stephen-a-ingram for the report. - Fix reporting period to starts after the last --last-parsed value instead of the first log line. Thanks to Keith Fiske for the report. - Add --csv-separator command line usage to documentation. - Fix CSV log parser and add --csv-separator command line option to allow change of the default csv field separator, coma, in any other character. - Avoid "negative look behind not implemented" errors on perl 5.16/5.18. Thanks to Marco Baringer for the patch. - Support timestamps for begin/end with fractional seconds (so it'll handle postgresql's normal string representation of timestamps). - When using negative look behind set sub-regexp to -i (not case insensitive) to avoid issues where some upper case letter sequence, like SS or ST. - Change shebang from /usr/bin/perl to /usr/bin/env perl so that user-local (perlbrew) perls will get used. - Fix empty graph of autovacuum and autoanalyze. - Fix checkpoint graphs that was not displayed any more. 2013-07-11 - Version 3.5 Last release of the 3.x branch, this is a bug fix release that also adds some pretty print of Y axis number on graphs and a new graph that groups queries duration series that was shown as second Y axis on graphs, as well as a new graph with number of temporary file that was also used as second Y axis. - Split temporary files report into two graphs (files size and number of file) to no more used a second Y axis with flotr2 - mouse tracker is not working as expected. - Duration series representing the second Y axis in queries graph have been removed and are now drawn in a new "Average queries duration" independant graph. - Add pretty print of numbers in Y axis and mouse tracker output with PB, TB, GB, KB, B units, and seconds, microseconds. Number without unit are shown with P, T, M, K suffix for easiest very long number reading. - Remove Query type reports when log only contains duration. - Fix display of checkpoint hourly report with no entry. - Fix count in Query type report. - Fix minimal statistics output when nothing was load from log file. Thanks to Herve Werner for the report. - Fix several bug in log line parser. Thanks to Den Untevskiy for the report. - Fix bug in last parsed storage when log files was not provided in the right order. Thanks to Herve Werner for the report. - Fix orphan lines wrongly associated to previous queries instead of temporary file and lock logged statement. Thanks to Den Untevskiy for the report. - Fix number of different samples shown in events report. - Escape HTML tags on error messages examples. Thanks to Mael Rimbault for the report. - Remove some temporary debug informations used with some LOG messages reported as events. - Fix several issues with restartpoint and temporary files reports. Thanks to Guillaume Lelarge for the report. - Fix issue when an absolute path was given to the incremental file. Thanks to Herve Werner for the report. - Remove creation of incremental temp file $tmp_last_parsed when not running in multiprocess mode. Thanks to Herve Werner for the report. 2013-06-18 - Version 3.4 This release adds lot of graphic improvements and a better rendering with logs over few hours. There's also some bug fixes especially on report of queries that generate the most temporary files. - Update flotr2.min.js to latest github code. - Add mouse tracking over y2axis. - Add label/legend information to ticks displayed on mouseover graphs. - Fix documentation about log_statement and log_min_duration_statement. Thanks to Herve Werner for the report. - Fix missing top queries for locks and temporary files in multiprocess mode. - Cleanup code to remove storage of unused information about connection. - Divide the huge dump_as_html() method with one method per each report. - Checkpoints, restart points and temporary files are now drawn using a period of 5 minutes per default instead of one hour. Thanks to Josh Berkus for the feature request. - Change fixed increment of one hour to five minutes on queries graphs "SELECT queries" and "Write queries". Remove graph "All queries" as, with a five minutes increment, it duplicates the "Queries per second". Thanks to Josh Berkus for the feature request. - Fix typos. Thanks to Arsen Stasic for the patch. - Add default HTML charset to utf-8 and a command line option --charset to be able to change the default. Thanks to thomas hankeuhh for the feature request. - Fix missing temporary files query reports in some conditions. Thanks to Guillaume Lelarge and Thomas Reiss for the report. - Fix some parsing issue with log generated by pg 7.4. - Update documentation about missing new reports introduced in previous version 3.3. Note that it should be the last release of the 3.x branch unless there's major bug fixes, but next one will be a major release with a completely new design. 2013-05-01 - Version 3.3 This release adds four more useful reports about queries that generate locks and temporary files. An other new report about restart point on slaves and several bugs fix or cosmetic change. Support to parallel processing under Windows OS has been removed. - Remove parallel processing under Windows platform, the use of waitpid is freezing pgbadger. Thanks to Saurabh Agrawal for the report. I'm not comfortable with that OS this is why support have been removed, if someone know how to fix that, please submit a patch. - Fix Error in tempfile() under Windows. Thanks to Saurabh Agrawal for the report. - Fix wrong queries storage with lock and temporary file reports. Thanks to Thomas Reiss for the report. - Add samples queries to "Most frequent waiting queries" and "Queries generating the most temporary files" report. - Add two more reports about locks: 'Most frequent waiting queries (N)", and "Queries that waited the most". Thanks to Thomas Reiss for the patch. - Add two reports about temporary files: "Queries generating the most temporary files (N)" and "Queries generating the largest temporary files". Thanks to Thomas Reiss for the patch. - Cosmetic change to the Min/Max/Avg duration columns. - Fix report of samples error with csvlog format. Thanks to tpoindessous for the report. - Add --disable-autovacuum to the documentation. Thanks to tpoindessous for the report. - Fix unmatched ) in regex when using %s in prefix. - Fix bad average size of temporary file in Overall statistics report. Thanks to Jehan Guillaume de Rorthais for the report. - Add restartpoint reporting. Thanks to Guillaume Lelarge for the patch. - Made some minor change in CSS. - Replace %% in log line prefix internally by a single % so that it could be exactly the same than in log_line_prefix. Thanks to Cal Heldenbrand for the report. - Fix perl documentation header, thanks to Cyril Bouthors for the patch. 2013-04-07 - Version 3.2 This is mostly a bug fix release, it also adds escaping of HTML code inside queries and the adds Min/Max reports with Average duration in all queries reports. - In multiprocess mode, fix case where pgbadger does not update the last-parsed file and do not take care of the previous run. Thanks to Kong Man for the report. - Fix case where pgbadger does not update the last-parsed file. Thanks to Kong Man for the report. - Add CDATA to make validator happy. Thanks to Euler Taveira de Oliveira for the patch. - Some code review by Euler Taveira de Oliveira, thanks for the patch. - Fix case where stat were multiplied by N when -J was set to N. Thanks to thegnorf for the report. - Add a line in documentation about log_statement that disable log_min_duration_statement when it is set to all. - Add quick note on how to contribute, thanks to Damien Clochard for the patch. - Fix issue with logs read from stdin. Thanks to hubert depesz lubaczewski for the report. - Force pgbadger to not try to beautify queries bigger than 10kb, this will take too much time. This value can be reduce in the future if hang with long queries still happen. Thanks to John Rouillard for the report. - Fix an other issue in replacing bind param when the bind value is alone on a single line. Thanks to Kjeld Peters for the report. - Fix parsing of compressed files together with uncompressed files using the the -j option. Uncompressed files are now processed using split method and compressed ones are parsed per one dedicated process. - Replace zcat by gunzip -c to fix an issue on MacOsx. Thanks to Kjeld Peters for the report. - Escape HTML code inside queries. Thanks to denstark for the report. - Add Min/Max in addition to Average duration values in queries reports. Thanks to John Rouillard fot the feature request. - Fix top slowest array size with binary format. - Fix an other case with bind parameters with value in next line and the top N slowest queries that was repeated until N even if the real number of queries was lower. Thanks to Kjeld Peters for the reports. - Fix non replacement of bind parameters where there is line breaks in the parameters, aka multiline bind parameters. Thanks to Kjeld Peters for the report. - Fix error with seekable export tag with Perl v5.8. Thanks to Jeff Bohmer for the report. - Fix parsing of non standard syslog lines begining with a timestamp like "2013-02-28T10:35:11-05:00". Thanks to Ryan P. Kelly for the report. - Fix issue #65 where using -c | --dbclient with csvlog was broken. Thanks to Jaime Casanova for the report. - Fix empty report in watchlog mode (-w option). 2013-02-21 - Version 3.1 This is a quick release to fix missing reports of most frequent errors and slowest normalized queries in previous version published yesterday. - Fix empty report in watchlog mode (-w option). - Force immediat die on command line options error. - Fix missing report of most frequent events/errors report. Thanks to Vincent Laborie for the report. - Fix missing report of slowest normalized queries. Thanks to Vincent Laborie for the report. - Fix display of last print of progress bar when quiet mode is enabled. 2013-02-20 - Version 3.0 This new major release adds parallel log processing by using as many cores as wanted to parse log files, the performances gain is directly related to the number of cores specified. There's also new reports about autovacuum/autoanalyze informations and many bugs have been fixed. - Update documentation about log_duration, log_min_duration_statement and log_statement. - Rewrite dirty code around log timestamp comparison to find timestamp of the specified begin or ending date. - Remove distinction between logs with duration enabled from variables log_min_duration_statement and log_duration. Commands line options --enable-log_duration and --enable-log_min_duration have been removed. - Update documentation about parallel processing. - Remove usage of Storable::file_magic to autodetect binary format file, it is not include in core perl 5.8. Thanks to Marc Cousin for the report. - Force multiprocess per file when files are compressed. Thanks to Julien Rouhaud for the report. - Add progress bar logger for multiprocess by forking a dedicated process and using pipe. Also fix some bugs in using binary format that duplicate query/error samples per process. - chmod 755 pgbadger - Fix checkpoint reports when there is no checkpoint warnings. - Fix non report of hourly connections/checkpoint/autovacuum when not query is found in log file. Thanks to Guillaume Lelarge for the report. - Add better handling of signals in multiprocess mode. - Add -J|--job_per_file command line option to force pgbadger to use one process per file instead of using all to parse one file. Useful to have better performances with lot of small log file. - Fix parsing of orphan lines with stderr logs and log_line_prefix without session information into the prefix (%l). - Update documentation about -j | --jobs option. - Allow pgbadger to use several cores, aka multiprocessing. Add options -j | --jobs option to specify the number of core to use. - Add autovacuum and autoanalyze infos to binary format. - Fix case in SQL code highlighting where QQCODE temp keyword was not replaced. Thanks to Julien Ruhaud for the report. - Fix CSS to draw autovacuum graph and change legend opacity. - Add pie graph to show repartition of number of autovacuum per table and number of tuples removed by autovacuum per table. - Add debug information about selected type of log duration format. - Add report of tuples/pages removed in report of Vacuums by table. - Fix major bug on syslog parser where years part of the date was wrongly extracted from current date with logs generated in 2012. - Fix issue with Perl 5.16 that do not allow "ss" inside look-behind assertions. Thanks to Cedric for the report. - New vacuum and analyze hourly reports and graphs. Thanks to Guillaume Lelarge for the patch. UPGRADE: if you are running pgbadger by cron take care if you were using one of the following option: --enable-log_min_duration and --enable-log_duration, they have been removed and pgbadger will refuse to start. 2013-01-17 - Version 2.3 This release fixes several major issues especially with csvlog and a memory leak with log parsing using a start date. There's also several improvement like new reports of number of queries by database and application. Mouse over reported queries will show database, user, remote client and application name where they are executed. A new binary input/output format have been introduced to allow saving or reading precomputed statistics. This will allow incremental reports based on periodical runs of pgbader. This is a work in progress fully available with next coming major release. Several SQL code beautifier improvement from pgFormatter have also been merged. - Clarify misleading statement about log_duration: log_duration may be turned on depending on desired information. Only log_statement must not be on. Thanks to Matt Romaine for the patch. - Fix --dbname and --dbuser not working with csvlog format. Thanks to Luke Cyca for the report. - Fix issue in SQL formatting that prevent left back indentation when major keywords were found. Thanks to Kevin Brannen for the report. - Display 3 decimals in time report so that ms can be seen. Thanks to Adam Schroder for the request. - Force the parser to not insert a new line after the SET keyword when the query begin with it. This is to preserve the single line with queries like SET client_encoding TO "utf8"; - Add better SQL formatting of update queries by adding a new line after the SET keyword. Thanks to pilat66 for the report. - Update copyright and documentation. - Queries without application name are now stored under others application name. - Add report of number of queries by application if %a is specified in the log_line_prefix. - Add link menu to the request per database and limit the display of this information when there is more than one database. - Add report of requests per database. - Add report of user,remote client and application name to all request info. - Fix memory leak with option -b (--begin) and in incremental log parsing mode. - Remove duration part from log format auto-detection. Thanks to Guillaume Lelarge for the report. - Fix a performance issue on prettifying SQL queries that makes pgBagder several time slower that usual to generate the HTML output. Thanks to Vincent Laborie for the report. - Add missing SQL::Beautify paternity. - Add 'binary' format as input/output format. The binary output format allows to save log statistics in a non human readable file instead of an HTML or text file. These binary files might then be used as regular input files, combined or not, to produce a html or txt report. Thanks to Jehan Guillaume de Rorthais for the patch. - Remove port from the session regex pattern to match all lines. - Fix the progress bar. It was trying to use gunzip to get real file size for all formats (by default). Unbreak the bz2 format (that does not report real size) and add support for zip format. Thanks to Euler Taveira de Oliveira fort the patch. - Fix some typos and grammatical issues. Thanks to Euler Taveira de Oliveira fort the patch. - Improve SQL code highlighting and keywords detection merging change from pgFormatter project. - Add support to hostname or ip address in the client detection. Thanks to stuntmunkee for the report. - pgbadger will now only reports execute statement of the extended protocol (parse/bind/execute). Thanks to pierrestroh for the report. - Fix numerous typos as well as formatting and grammatical issues. Thanks to Thom Brown for the patch. - Add backward compatibility to obsolete --client command line option. If you were using the short option -c nothing is changed. - Fix issue with --dbclient and %h in log_line_prefix. Thanks to Julien Rouhaud for the patch. - Fix multiline progress bar output. - Allow usage of a dash into database, user and application names when prefix is used. Thanks to Vipul for the report. - Mouse over queries will now show in which database they are executed in the overviews (Slowest queries, Most frequent queries, etc. ). Thank to Dirk-Jan Bulsink for the feature request. - Fix missing keys on %cur_info hash. Thanks to Marc Cousin for the report. - Move opening file handle to log file into a dedicated function. Thanks to Marc Cousin for the patch. - Replace Ctrl+M by printable \r. Thanks to Marc Cousin for the report. 2012-11-13 - Version 2.2 This release add some major features like tsung output, speed improvement with csvlog, report of shut down events, new command line options to generate report excluding some user(s), to build report based on select queries only, to specify regex of the queries that must only be included in the report and to remove comments from queries. Lot of bug fixes, please upgrade. - Update PostgreSQL keywords list for 9.2 - Fix number of queries in progress bar with tsung output. - Remove obsolete syslog-ng and temporary syslog-ll log format added to fix some syslog autodetection issues. There is now just one syslog format: syslog, differences between syslog formats are detected and the log parser is adaptive. - Add comment about the check_incremental_position() method - Fix reports with empty graphs when log files were not in chronological order. - Add report of current total of queries and events parsed in progress bar. Thanks to Jehan-Guillaume de Rorthais for the patch. - Force pgBadger to use an require the XS version of Text::CSV instead of the Pure Perl implementation. It is a good bit faster thanks to David Fetter for the patch. Note that using csvlog is still a bit slower than syslog or stderr log format. - Fix several issue with tsung output. - Add report of shut down events - Add debug information on command line used to pipe compressed log file when -v is provide. - Add -U | --exclude-user command line option to generate report excluded user. Thanks to Birta Levente for the feature request. - Allow some options to be specified multiple time or be written as a coma separated list of value, here are these options: --dbname, --dbuser, --dbclient, --dbappname, --exclude_user. - Add -S | --select-only option to build report only on select queries. - Add first support to tsung output, see usage. Thanks to Guillaume Lelarge for the feature request. - Add --include-query and --include-file to specify regex of the queries that must only be included in the report. Thanks to Marc Cousin for the feature request. - Fix auto detection of log_duration and log_min_duration_statement format. - Fix parser issue with Windows logs without timezone information. Thanks to Nicolas Thauvin for the report. - Fix bug in %r = remote host and port log line prefix detection. Thanks to Hubert Depesz Lubaczewski for the report. - Add -C | --nocomment option to remove comment like /* ... */ from queries. Thanks to Hubert Depesz Lubaczewski for the feature request. - Fix escaping of log_line_prefix. Thanks to Hubert Depesz Lubaczewski for the patch. - Fix wrong detection of update queries when a query has a object names containing update and set. Thanks to Vincent Laborie for the report. 2012-10-10 - Version 2.1 This release add a major feature by allowing any custom log_line_prefix to be used by pgBadger. With stderr output you at least need to log the timestamp (%t) the pid (%p) and the session/line number (%l). Support to log_duration instead of log_min_duration_statement to allow reports simply based on duration and count report without query detail and report. Lot of bug fixes, please upgrade asap. - Add new --enable-log_min_duration option to force pgbadger to use lines generated by the log_min_duration_statement even if the log_duration format is autodetected. Useful if you use both but do not log all queries. Thanks to Vincent Laborie for the feature request. - Add syslog-ng format to better handle syslog traces with notation like: [ID * local2.info]. It is autodetected but can be forced in the -f option with value set to: syslog-ng. - Add --enable-log_duration command line option to force pgbadger to only use the log_duration trace even if log_min_duration_statement traces are autodetected. - Fix display of empty hourly graph when no data were found. - Remove query type report when log_duration is enabled. - Fix a major bug in query with bind parameter. Thanks to Marc Cousin for the report. - Fix detection of compressed log files and allow automatic detection and uncompress of .gz, .bz2 and .zip files. - Add gunzip -l command to find the real size of a gzip compressed file. - Fix log_duration only reports to not take care about query detail but just count and duration. - Fix issue with compressed csvlog. Thanks to Philip Freeman for the report. - Allow usage of log_duration instead of log_min_duration_statement to just collect statistics about the number of queries and their time. Thanks to Vincent Laborie for the feature request. - Fix issue on syslog format and autodetect with additional info like: [ID * local2.info]. Thanks to kapsalar for the report. - Removed unrecognized log line generated by deadlock_timeout. - Add missing information about unsupported csv log input from stdin. It must be read from a file. Thank to Philip Freeman for the report. - Fix issue #28: Illegal division by zero with log file without query and txt output. Thanks to rlowe for the report. - Update documentation about the -N | --appname option. - Rename --name option into --appname. Thanks to Guillaume Lellarge for the patch. - Fix min/max value in xasis that was always represented 2 days by default. Thanks to Casey Allen Shobe for the report. - Fix major bug when running pgbadger with the -e option. Thanks to Casey Allen Shobe for the report and the great help - Change project url to http://dalibo.github.com/pgbadger/. Thanks to Damien Clochard for this new hosting. - Fix lot of issues in CSV parser and force locale to be C. Thanks to Casey Allen Shobe for the reports. - Improve speed with custom log_line_prefix. - Merge pull request #26 from elementalvoid/helpdoc-fix - Fixed help text for --exclude-file. Old help text indicated that the option name was --exclude_file which was incorrect. - Remove the obsolete --regex-user and --regex-db options that was used to specify a search pattern in the log_line_prefix to find the user and db name. This is replaced by the --prefix option. - Replace Time column report header by Hour. - Fix another issue in log_line_prefix parser with stderr format - Add a more complex example using log_line_prefix - Fix log_line_prefix issue when using timepstamp with millisecond. - Add support to use any custom log_line_prefix with new option -p or --prefix. See README for an example. - Fix false autodetection of CSV format when log_statement is enable or in possible other cases. This was resulting in error: "FATAL: cannot use CSV". Thanks to Thomas Reiss for the report. - Fix display of empty graph of connections per seconds - Allow character : in log line prefix, it will no more break the log parsing. Thanks to John Rouillard for the report. - Add report of configuration parameter changes into the errors report and change errors report by events report to handle important messages that are not errors. - Allow pgbadger to recognize " autovacuum launcher" messages. 2012-08-21 - version 2.0 This major version adds some changes not backward compatible with previous versions. Options -p and -g are not more used as progress bar and graphs generation are enabled by default now. The obsolete -l option use to specify the log file to parse has been reused to specify an incremental file. Outside these changes and some bug fix there's also new features: * Using an incremental file with -l option allow to parse multiple time a single log file and to "seek" at the last line parsed during the previous run. Useful if you have a log rotation not sync with your pgbadger run. For exemple you can run somthing like this: pgbadger `find /var/log/postgresql/ -name "postgresql*" -mtime -7 -type f` \ -o report_`date +%F`.html -l /var/run/pgbadger/last_run.log * All queries diplayed in the HTML report are now clickable to display or hide a nice SQL query format. This is called SQL format beautifier. * CSV log parser have been entirely rewritten to handle csv with multiline. Every one should upgrade. - Change license from BSD like to PostgreSQL license. Request from Robert Treat. - Fix wrong pointer on Connections per host menu. Reported by Jean-Paul Argudo. - Small fix for sql formatting adding scrollbars. Patch by Julien Rouhaud. - Add SQL format beautifier on SQL queries. When you will click on a query it will be beautified. Patch by Gilles Darold - The progress bar is now enabled by default, the -p option has been removed. Use -q | --quiet to disable it. Patch by Gilles Darold. - Graphs are now generated by default for HTML output, option -g as been remove and option -G added to allow disabling graph generation. Request from Julien Rouhaud, patch by Gilles Darold. - Remove option -g and -p to the documentation. Patch by Gilles Darold. - Fix case sensitivity in command line options. Patch by Julien Rouhaud. - Add -T|--title option to change report title. Patch by Yury Bushmelev. - Add new option --exclude-file to exclude specific commands with regex stated in a file. This is a rewrite by Gilles Darold of the neoeahit (Vipul) patch. - CSV log parser have been entirely rewritten to handle csv with multi line, it also adds approximative duration for csvlog. Reported by Ludhimila Kendrick, patch by Gilles Darold. - Alphabetical reordering of options list in method usage() and documentation. Patch by Gilles Darold. - Remove obsolete -l | --logfile command line option, the -l option will be reused to specify an incremental file. Patch by Gilles Darold. - Add -l | --last-parsed options to allow incremental run of pgbadger. Patch by Gilles Darold. - Replace call to timelocal_nocheck by timegm_nocheck, to convert date time into second from the epoch. This should fix timezone issue. Patch by Gilles Darold. - Change regex on log parser to allow missing ending space in log_line_prefix. This seems a common mistake. Patch by Gilles Darold. - print warning when an empty log file is found. Patch by Gilles Darold. - Add perltidy rc file to format pgbadger Perl code. Patch from depesz. 2012-07-15 - version 1.2 This version adds some reports and fixes a major issue in log parser. Every one should upgrade. - Rewrite this changelog to be human readable. - Add -v | --verbose to enable debug mode. It is now disable by default - Add hourly report of checkpoint warning when checkpoints are occuring too frequently, it will display the hourly count and the average occuring time. - Add new report that sums the messages by log types. The report shows the number of messages of each log type, and a percentage. It also displays a pie graph. Patch by Guillaume Lelarge. - Add missing pie graph on locks by type report. - Format pie mouse track to display values only. - Fix graph download button id on new connection graph. - Add trackFormatter to flotr2 line graphs to show current x/y values. - Fix issue on per minute minimum value. - Add a note about Windows Os and zcat as well as a more general note about using compressed log file in other format than gzip. - Complete rewrite of the log parser to handle unordered log lines. Data are now stored by pid before and added to the global statistics at end. Error report now include full details, statements, contexts and hints when available. Deadlock are also fully reported with the concerned queries. - Fix miss handling of multi lines queries on syslog. - Add -a|--average option to configure the per minutes average interval for queries and connexions. If you want the average to be calculated each minutes instead of the 5 per default, use --average 1 or for the default --average 5. If you want average per hour set it to 60. - Add hourly statistics of connections and sessions as well as a chart about the number of connection per second (5 minutes average). - Allow OTHERS type of queries lower than 2% to be include in the sum of types < 2%. - Add autodetection of syslog ident name if different than the default "postgres" and that there is just one ident name in the log. - Remove syslog replacement of tabulation by #011 still visible when there was multiple tabulation. - Fix autodetection of log format syslog with single-digit day number in date. - Add ChangeLog to MANIFEST and change URI in html footer. - Check pgBadger compatibility with Windows Oses. Run perfectly. 2012-07-04 - version 1.1 This release fixes lot of issues and adds several main features. New feature: - Add possibility to get log from stdin - Change syslog parsing regex to allow log timestamp in log_line_prefix very often forgotten when log destination is changed from stderr to syslog. - Add documentation for the -z | --zcat command line option. - Allow `zcat` location to be specified via `--zcat` - David E. Wheeler - Add --disable-session,--disable-connection and disable-checkpoint command line options to remove their respective reports from the output - Add --disable-query command line option to remove queries statistics from the output - Add --disable-hourly command line option to remove hourly statistics from the output - Add --disable-error command line option to remove error report from the output - Add --exclude-query option to exclude types of queries by specifying a regex - Set thousand separator and decimal separator to be locale dependant - Add -w option to only report errors - Add Makefile.PL and full POD documentation to the project - Allow multiple log files from command line - Add simple csvlog support - Alex Hunsaker - Hourly report for temporary files and checkpoints have moved in a separate table. - Add hourly connections and sessions statistics. - Add a chart about the number of connections per seconds. Bug fix: - Add information about log format requirement (lc_message = 'C'). Reported by Alain Benard. - Fix for begin/end dates with single digit day using syslog. Patch by Joseph Marlin. - Fix handle of syslog dates with single-digit day number. Patch by Denis Orlikhin. - Fix many English syntax in error messages and documentation. Patch by Joseph Marlin. - Fix non terminated TH html tag in checkpoint hourly table. Reported by Joseph Marlin. - "Log file" section will now only report first and last log file parsed - Fix empty output in hourly temporary file stats. - Fix wrapping query that goes out of the table and makes the window scroll horizontally. Asked by Isaac Reuben. - Fix code where != was replaced by $$CLASSSY0A$$!=$$CLASSSY0B$$ in the output. Reported by Isaac Reuben - Fix and review text report output. - Fix an issue in SQL code highligh replacement. - Complete review of the HTML output. - Add .gitignore for swap files. Patch by Vincent Picavet - Fix wrong variable for user and database filter. Patch by Vincent Picavet. - Change default regexp for user and db to be able to detect both. Patch by Vincent Picavet. - Fix false cur_date when using syslog and allow -b and -e options to work. Patch by Vincent Picavet. - Fix some case where logs where not detected as PostgreSQL log lines. - Added explanation for --begin and --end datetime setting. Patch by ragged. - Added -v / --version. Patch by ragged. - Fix usage information and presentation in README file. 2012-05-04 - version to 1.0 First public release of pgBadger. New feature: - Add graph of ckeckpoint Wal files usage (added, removed, recycled). - Add --image-format to allow the change of the default png image format to jpeg. - Allow download of all pie graphics as images. - Add --pie-limit to sum all data lower than this percentage limit to avoid label overlap. - Allow download of graphics as PNG images. - Replace GD::Graph by the Flotr2 javascript library to draw graphics. Patch by Guillaume Lelarge - Add pie graphs for session, database, user and host. Add a --quiet option to remove debug output and --progress to show a progress bar during log parsing - Add pie graph for Queries by type. - Add graph for checkpoint write buffer per hours - Allow log parsing without any log_line_prefix and extend it to be defined by the user. Custom log_line prefix can be parsed using user defined regex with command line option --regex-db and --regex-user. For exemple the default regex of pgbadger to parse user and db name from log_line_prefix can be written like this: pgbadger -l mylogfile.log --regex-user="user=([^,]*)," \ --regex-db="db=([^,]*)" - Separe log_line_prefix from log level part in the parser to extend log_line_prefix parsing - If there is just one argument, assume it is the logfile and use default value for all other parameters - Add autodetection of log format (syslog or stderr) if none is given with option -f - Add --outfile option to dump output to a file instead of stdout. Default filename is out.html or out.txt following the output format. To dump to stdout set filename to - - Add --version command line option to show current pgbadger version. Bug fix: - Rearrange x and y axis - Fix legend opacity on graphics - Rearrange Overall stats view - Add more "normalization" on errors messages - Fix samples error with normalyzed error instead of real error message - Fix an other average size of temporary file decimal limit - Force quiet mode when --progress is used - Fix per sessions graphs - Fix sort order of days/hours into hours array - Fix sort order of days into graphics - Remove display of locks, sessions and connections statistics when none are available - Fix display of empty column of checkpoint when no checkpoint was found in log file pgbadger-7.1/LICENSE000066400000000000000000000016071255016237600141540ustar00rootroot00000000000000Copyright (c) 2012-2015, Dalibo Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies. IN NO EVENT SHALL Dalibo BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF Dalibo HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Dalibo SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND Dalibo HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. pgbadger-7.1/MANIFEST000066400000000000000000000001211255016237600142660ustar00rootroot00000000000000LICENSE Makefile.PL MANIFEST META.yml pgbadger README doc/pgBadger.pod ChangeLog pgbadger-7.1/META.yml000066400000000000000000000005161255016237600144160ustar00rootroot00000000000000# http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: pgBadger version: 1.1 version_from: pgbadger installdirs: site recommends: Text::CSV_XS: 0 distribution_type: script generated_by: ExtUtils::MakeMaker version 6.17 pgbadger-7.1/Makefile.PL000066400000000000000000000025701255016237600151210ustar00rootroot00000000000000use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. use strict; my @ALLOWED_ARGS = ('INSTALLDIRS','DESTDIR'); # Parse command line arguments and store them as environment variables while ($_ = shift) { my ($k,$v) = split(/=/, $_, 2); if (grep(/^$k$/, @ALLOWED_ARGS)) { $ENV{$k} = $v; } } $ENV{DESTDIR} =~ s/\/$//; # Default install path my $DESTDIR = $ENV{DESTDIR} || ''; my $INSTALLDIRS = $ENV{INSTALLDIRS} || 'site'; my %merge_compat = (); if ($ExtUtils::MakeMaker::VERSION >= 6.46) { %merge_compat = ( 'META_MERGE' => { resources => { homepage => 'http://projects.dalibo.org/pgbadger', repository => { type => 'git', git => 'git@github.com:dalibo/pgbadger.git', web => 'https://github.com/dalibo/pgbadger', }, }, } ); } WriteMakefile( 'DISTNAME' => 'pgbadger', 'NAME' => 'pgBadger', 'VERSION_FROM' => 'pgbadger', 'dist' => { 'COMPRESS'=>'gzip -9f', 'SUFFIX' => 'gz', 'ZIP'=>'/usr/bin/zip','ZIPFLAGS'=>'-rl' }, 'AUTHOR' => 'Gilles Darold (gilles@darold.net)', 'ABSTRACT' => 'pgBadger - PostgreSQL log analysis report', 'EXE_FILES' => [ qw(pgbadger) ], 'MAN1PODS' => { 'doc/pgBadger.pod' => 'blib/man1/pgbadger.1p' }, 'DESTDIR' => $DESTDIR, 'INSTALLDIRS' => $INSTALLDIRS, 'clean' => {}, %merge_compat ); pgbadger-7.1/README000066400000000000000000000672431255016237600140370ustar00rootroot00000000000000NAME pgBadger - a fast PostgreSQL log analysis report SYNOPSIS Usage: pgbadger [options] logfile [...] PostgreSQL log analyzer with fully detailed reports and graphs. Arguments: logfile can be a single log file, a list of files, or a shell command returning a list of files. If you want to pass log content from stdin use - as filename. Note that input from stdin will not work with csvlog. You can also use a file containing a list of log file to parse, see -L command line option. Options: -a | --average minutes : number of minutes to build the average graphs of queries and connections. Default 5 minutes. -A | --histo-avg minutes: number of minutes to build the histogram graphs of queries. Default 60 minutes. -b | --begin datetime : start date/time for the data to be parsed in log. -B | --bar-graph : use bar graph instead of line by default. -c | --dbclient host : only report on entries for the given client host. -C | --nocomment : remove comments like /* ... */ from queries. -d | --dbname database : only report on entries for the given database. -D | --dns-resolv : client ip adresses are replaced by their DNS name. Be warned that this can really slow down pgBadger. -e | --end datetime : end date/time for the data to be parsed in log. -f | --format logtype : possible values: syslog, syslog2, stderr and csv. Default: stderr. -G | --nograph : disable graphs on HTML output. Enabled by default. -h | --help : show this message and exit. -i | --ident name : programname used as syslog ident. Default: postgres -I | --incremental : use incremental mode, reports will be generated by days in a separate directory, --outdir must be set. -j | --jobs number : number of jobs to run at same time. Default is 1, run as single process. -J | --Jobs number : number of log file to parse in parallel. Default is 1, run as single process. -l | --last-parsed file: allow incremental log parsing by registering the last datetime and line parsed. Useful if you want to watch errors since last run or if you want one report per day with a log rotated each week. -L | logfile-list file : file containing a list of log file to parse. -m | --maxlength size : maximum length of a query, it will be restricted to the given size. Default: no truncate -M | --no-multiline : do not collect multiline statement to avoid garbage especially on errors that generate a huge report. -n | --nohighlight : disable SQL code highlighting. -N | --appname name : only report on entries for given application name -o | --outfile filename: define the filename for the output. Default depends on the output format: out.html, out.txt, out.bin, out.json or out.tsung. With module JSON::XS installed, you can output file in JSON format either. To dump output to stdout use - as filename. -O | --outdir path : directory where out file must be saved. -p | --prefix string : the value of your custom log_line_prefix as defined in your postgresql.conf. Only use it if you aren't using one of the standard prefixes specified in the pgBadger documentation, such as if your prefix includes additional variables like client ip or application name. See examples below. -P | --no-prettify : disable SQL queries prettify formatter. -q | --quiet : don't print anything to stdout, not even a progress bar. -r | --remote-host ip : set the host where to execute the cat command on remote logfile to parse localy the file. -R | --retention N : number of week to keep in incremental mode. Default to 0, disabled. Used to set the number of weel to keep in output directory. Older weeks and days directory are automatically removed. -s | --sample number : number of query samples to store. Default: 3. -S | --select-only : only report SELECT queries. -t | --top number : number of queries to store/display. Default: 20. -T | --title string : change title of the HTML page report. -u | --dbuser username : only report on entries for the given user. -U | --exclude-user username : exclude entries for the specified user from report. -v | --verbose : enable verbose or debug mode. Disabled by default. -V | --version : show pgBadger version and exit. -w | --watch-mode : only report errors just like logwatch could do. -x | --extension : output format. Values: text, html, bin, json or tsung. Default: html -X | --extra-files : in incremetal mode allow pgbadger to write CSS and JS files in the output directory as separate files. -z | --zcat exec_path : set the full path to the zcat program. Use it if zcat or bzcat or unzip is not in your path. --pie-limit num : pie data lower than num% will show a sum instead. --exclude-query regex : any query matching the given regex will be excluded from the report. For example: "^(VACUUM|COMMIT)" You can use this option multiple times. --exclude-file filename: path of the file which contains all the regex to use to exclude queries from the report. One regex per line. --include-query regex : any query that does not match the given regex will be excluded from the report. You can use this option multiple times. For example: "(tbl1|tbl2)". --include-file filename: path of the file which contains all the regex of the queries to include from the report. One regex per line. --disable-error : do not generate error report. --disable-hourly : do not generate hourly report. --disable-type : do not generate report of queries by type, database or user. --disable-query : do not generate query reports (slowest, most frequent, queries by users, by database, ...). --disable-session : do not generate session report. --disable-connection : do not generate connection report. --disable-lock : do not generate lock report. --disable-temporary : do not generate temporary report. --disable-checkpoint : do not generate checkpoint/restartpoint report. --disable-autovacuum : do not generate autovacuum report. --charset : used to set the HTML charset to be used. Default: utf-8. --csv-separator : used to set the CSV field separator, default: , --exclude-time regex : any timestamp matching the given regex will be excluded from the report. Example: "2013-04-12 .*" You can use this option multiple times. --exclude-appname name : exclude entries for the specified application name from report. Example: "pg_dump". --exclude-line regex : pgbadger will start to exclude any log entry that will match the given regex. Can be used multiple time. --anonymize : obscure all literals in queries, useful to hide confidential data. --noreport : prevent pgbadger to create reports in incremental mode. --log-duration : force pgbadger to associate log entries generated by both log_duration = on and log_statement = 'all' --enable-checksum : used to add a md5 sum under each query report. pgBadger is able to parse a remote log file using a passwordless ssh connection. Use the -r or --remote-host to set the host ip address or hostname. There's also some additional options to fully control the ssh connection. --ssh-program ssh path to the ssh program to use. Default: ssh. --ssh-user username connection login name. Default to running user. --ssh-identity file path to the identity file to use. --ssh-timeout second timeout to ssh connection failure. Default 10 secs. --ssh-options options list of -o options to use for the ssh connection. Options always used: -o ConnectTimeout=$ssh_timeout -o PreferredAuthentications=hostbased,publickey Examples: pgbadger /var/log/postgresql.log pgbadger /var/log/postgres.log.2.gz /var/log/postgres.log.1.gz /var/log/postgres.log pgbadger /var/log/postgresql/postgresql-2012-05-* pgbadger --exclude-query="^(COPY|COMMIT)" /var/log/postgresql.log pgbadger -b "2012-06-25 10:56:11" -e "2012-06-25 10:59:11" /var/log/postgresql.log cat /var/log/postgres.log | pgbadger - # Log prefix with stderr log output perl pgbadger --prefix '%t [%p]: [%l-1] user=%u,db=%d,app=%a,client=%h' /pglog/postgresql-2012-08-21* perl pgbadger --prefix '%m %u@%d %p %r %a : ' /pglog/postgresql.log # Log line prefix with syslog log output perl pgbadger --prefix 'user=%u,db=%d,client=%h,app=%a' /pglog/postgresql-2012-08-21* # Use my 8 CPUs to parse my 10GB file faster, much faster perl pgbadger -j 8 /pglog/postgresql-9.1-main.log Generate Tsung sessions XML file with select queries only: perl pgbadger -S -o sessions.tsung --prefix '%t [%p]: [%l-1] user=%u,db=%d ' /pglog/postgresql-9.1.log Reporting errors every week by cron job: 30 23 * * 1 /usr/bin/pgbadger -q -w /var/log/postgresql.log -o /var/reports/pg_errors.html Generate report every week using incremental behavior: 0 4 * * 1 /usr/bin/pgbadger -q `find /var/log/ -mtime -7 -name "postgresql.log*"` -o /var/reports/pg_errors-`date +%F`.html -l /var/reports/pgbadger_incremental_file.dat This supposes that your log file and HTML report are also rotated every week. Or better, use the auto-generated incremental reports: 0 4 * * * /usr/bin/pgbadger -I -q /var/log/postgresql/postgresql.log.1 -O /var/www/pg_reports/ will generate a report per day and per week. In incremental mode, you can also specify the number of week to keep in the reports: /usr/bin/pgbadger --retention 2 -I -q /var/log/postgresql/postgresql.log.1 -O /var/www/pg_reports/ If you have a pg_dump at 23:00 and 13:00 each day during half an hour, you can use pgbadger as follow to exclude these period from the report: pgbadger --exclude-time "2013-09-.* (23|13):.*" postgresql.log This will help avoid having COPY statements, as generated by pg_dump, on top of the list of slowest queries. You can also use --exclude-appname "pg_dump" to solve this problem in a simpler way. DESCRIPTION pgBadger is a PostgreSQL log analyzer build for speed with fully detailed reports from your PostgreSQL log file. It's a single and small Perl script that outperform any other PostgreSQL log analyzer. It is written in pure Perl language and uses a javascript library (flotr2) to draw graphs so that you don't need to install any additional Perl modules or other packages. Furthermore, this library gives us more features such as zooming. pgBadger also uses the Bootstrap javascript library and the FontAwesome webfont for better design. Everything is embedded. pgBadger is able to autodetect your log file format (syslog, stderr or csvlog). It is designed to parse huge log files as well as gzip compressed file. See a complete list of features below. Supported compressed format are gzip, bzip2 and xz. For the last one you must have a xz version upper than 5.05 that support the --robot option. All charts are zoomable and can be saved as PNG images. You can also limit pgBadger to only report errors or remove any part of the report using command line options. pgBadger supports any custom format set into the log_line_prefix directive of your postgresql.conf file as long as it at least specify the %t and %p patterns. pgBadger allow parallel processing on a single log file and multiple files through the use of the -j option and the number of CPUs as value. If you want to save system performance you can also use log_duration instead of log_min_duration_statement to have reports on duration and number of queries only. FEATURE pgBadger reports everything about your SQL queries: Overall statistics The most frequent waiting queries. Queries that waited the most. Queries generating the most temporary files. Queries generating the largest temporary files. The slowest queries. Queries that took up the most time. The most frequent queries. The most frequent errors. Histogram of query times. Histogram of sessions times. Users involved in top queries. Applications involved in top queries. Queries generating the most cancellation. Queries most cancelled. The following reports are also available with hourly charts divide by periods of five minutes: SQL queries statistics. Temporary file statistics. Checkpoints statistics. Autovacuum and autoanalyze statistics. Cancelled queries. Error events (panic, fatal, error and warning). There's also some pie reports of distribution about: Locks statistics. Queries by type (select/insert/update/delete). Distribution of queries type per database/application Sessions per database/user/client/application. Connections per database/user/client/application. Autovacuum and autoanalyze per table. Queries per user and total duration per user. All charts are zoomable and can be saved as PNG images. SQL queries reported are highlighted and beautified automatically. You can also have incremental reports with one report per day and a cumulative report per week. Two multiprocess modes are available to speed up log parsing, one using one core per log file, and the second to use multiple core to parse a single file. Both modes can be combined. Histogram granularity can be adjusted using the -A command line option. By default they will report the mean of each top queries/error occuring per hour, but you can specify the granularity down to the minute. pgBadger can also be used in a central place to parse remote log files using a password less SSH connection. This mode can be used with compressed files and in mode multiprocess per file (-J) but can not be used with CSV log format. REQUIREMENT pgBadger comes as a single Perl script - you do not need anything other than a modern Perl distribution. Charts are rendered using a Javascript library so you don't need anything. Your browser will do all the work. If you planned to parse PostgreSQL CSV log files you might need some Perl Modules: Text::CSV_XS - to parse PostgreSQL CSV log files. This module is optional, if you don't have PostgreSQL log in the CSV format you don't need to install it. If you want to export statistics as JSON file you need an additional Perl module: JSON::XS - JSON serialising/deserialising, done correctly and fast This module is optional, if you don't select the json output format you don't need to install it. Compressed log file format is autodetected from the file exension. If pgBadger find a gz extension it will use the zcat utility, with a bz2 extension it will use bzcat and if the file extension is zip or xz then the unzip or xz utilities will be used. If those utilities are not found in the PATH environment variable then use the --zcat command line option to change this path. For example: --zcat="/usr/local/bin/gunzip -c" or --zcat="/usr/local/bin/bzip2 -dc" --zcat="C:\tools\unzip -p" By default pgBadger will use the zcat, bzcat and unzip utilities following the file extension. If you use the default autodetection compress format you can mixed gz, bz2, xz or zip files. Specifying a custom value to --zcat option will remove this feature of mixed compressed format. Note that multiprocessing can not be used with compressed files or CSV files as well as under Windows platform. INSTALLATION Download the tarball from github and unpack the archive as follow: tar xzf pgbadger-7.x.tar.gz cd pgbadger-7.x/ perl Makefile.PL make && sudo make install This will copy the Perl script pgbadger to /usr/local/bin/pgbadger by default and the man page into /usr/local/share/man/man1/pgbadger.1. Those are the default installation directories for 'site' install. If you want to install all under /usr/ location, use INSTALLDIRS='perl' as an argument of Makefile.PL. The script will be installed into /usr/bin/pgbadger and the manpage into /usr/share/man/man1/pgbadger.1. For example, to install everything just like Debian does, proceed as follows: perl Makefile.PL INSTALLDIRS=vendor By default INSTALLDIRS is set to site. POSTGRESQL CONFIGURATION You must enable and set some configuration directives in your postgresql.conf before starting. You must first enable SQL query logging to have something to parse: log_min_duration_statement = 0 Here every statement will be logged, on busy server you may want to increase this value to only log queries with a higher duration time. Note that if you have log_statement set to 'all' nothing will be logged through directive log_min_duration_statement. See next chapter for more information. With 'stderr' log format, log_line_prefix must be at least: log_line_prefix = '%t [%p]: [%l-1] ' Log line prefix could add user, database name, application name and client ip address as follows: log_line_prefix = '%t [%p]: [%l-1] user=%u,db=%d,app=%a,client=%h ' or for syslog log file format: log_line_prefix = 'user=%u,db=%d,app=%aclient=%h ' Log line prefix for stderr output could also be: log_line_prefix = '%t [%p]: [%l-1] db=%d,user=%u,app=%a,client=%h ' or for syslog output: log_line_prefix = 'db=%d,user=%u,app=%a,client=%h ' You need to enable other parameters in postgresql.conf to get more information from your log files: log_checkpoints = on log_connections = on log_disconnections = on log_lock_waits = on log_temp_files = 0 log_autovacuum_min_duration = 0 Do not enable log_statement as their log format will not be parsed by pgBadger. Of course your log messages should be in English without locale support: lc_messages='C' but this is not only recommended by pgBadger. Note: the session line [%l-1] is just used to match the default prefix for "stderr". The -1 has no real purpose and basically is not used in Pgbadger statistics / graphs. You can safely removed them from the log_line_prefix but you will need to set the --prefix command line option. log_min_duration_statement, log_duration and log_statement If you want full statistics reports you must set log_min_duration_statement to 0 or more milliseconds. If you just want to report duration and number of queries and don't want all details about queries, set log_min_duration_statement to -1 to disable it and enable log_duration in your postgresql.conf file. If you want to add the most common request report you can either choose to set log_min_duration_statement to a higher value or choose to enable log_statement. Enabling log_min_duration_statement will add reports about slowest queries and queries that took up the most time. Take care that if you have log_statement set to 'all' nothing will be logged with log_line_prefix. PARALLEL PROCESSING To enable parallel processing you just have to use the -j N option where N is the number of cores you want to use. pgbadger will then proceed as follow: for each log file chunk size = int(file size / N) look at start/end offsets of these chunks fork N processes and seek to the start offset of each chunk each process will terminate when the parser reach the end offset of its chunk each process write stats into a binary temporary file wait for all children has terminated All binary temporary files generated will then be read and loaded into memory to build the html output. With that method, at start/end of chunks pgbadger may truncate or omit a maximum of N queries perl log file which is an insignificant gap if you have millions of queries in your log file. The chance that the query that you were looking for is loose is near 0, this is why I think this gap is livable. Most of the time the query is counted twice but truncated. When you have lot of small log files and lot of CPUs it is speedier to dedicate one core to one log file at a time. To enable this behavior you have to use option -J N instead. With 200 log files of 10MB each the use of the -J option start being really interesting with 8 Cores. Using this method you will be sure to not loose any queries in the reports. He are a benchmarck done on a server with 8 CPUs and a single file of 9.5GB. Option | 1 CPU | 2 CPU | 4 CPU | 8 CPU --------+---------+-------+-------+------ -j | 1h41m18 | 50m25 | 25m39 | 15m58 -J | 1h41m18 | 54m28 | 41m16 | 34m45 With 200 log files of 10MB each and a total og 2GB the results are slightly different: Option | 1 CPU | 2 CPU | 4 CPU | 8 CPU --------+-------+-------+-------+------ -j | 20m15 | 9m56 | 5m20 | 4m20 -J | 20m15 | 9m49 | 5m00 | 2m40 So it is recommanded to use -j unless you have hundred of small log file and can use at least 8 CPUs. IMPORTANT: when you are using parallel parsing pgbadger will generate a lot of temporary files in the /tmp directory and will remove them at end, so do not remove those files unless pgbadger is not running. They are all named with the following template tmp_pgbadgerXXXX.bin so they can be easily identified. INCREMENTAL REPORTS pgBadger include an automatic incremental report mode using option -I or --incremental. When running in this mode, pgBadger will generate one report per day and a cumulative report per week. Output is first done in binary format into the mandatory output directory (see option -O or --outdir), then in HTML format for daily and weekly reports with a main index file. The main index file will show a dropdown menu per week with a link to the week report and links to daily reports of this week. For example, if you run pgBadger as follow based on a daily rotated file: 0 4 * * * /usr/bin/pgbadger -I -q /var/log/postgresql/postgresql.log.1 \ -O /var/www/pg_reports/ you will have all daily and weekly reports for the full running period. In this mode pgBagder will create an automatic incremental file into the output directory, so you don't have to use the -l option unless you want to change the path of that file. This mean that you can run pgBadger in this mode each days on a log file rotated each week, it will not count the log entries twice. To save disk space you may want to use the -X or --extra-files command line option to force pgBadger to write javascript and css to separate files in the output directory. The resources will then be loaded using script and link tag. BINARY FORMAT Using the binary format it is possible to create custom incremental and cumulative reports. For example, if you want to refresh a pgbadger report each hour from a daily PostgreSQl log file, you can proceed by running each hour the following commands: pgbadger --last-parsed .pgbadger_last_state_file -o sunday/hourX.bin /var/log/pgsql/postgresql-Sun.log to generate the incremental data files in binary format. And to generate the fresh HTML report from that binary file: pgbadger sunday/*.bin Or an other example, if you have one log file per hour and you want a reports to be rebuild each time the log file is switched. Proceed as follow: pgbadger -o day1/hour01.bin /var/log/pgsql/pglog/postgresql-2012-03-23_10.log pgbadger -o day1/hour02.bin /var/log/pgsql/pglog/postgresql-2012-03-23_11.log pgbadger -o day1/hour03.bin /var/log/pgsql/pglog/postgresql-2012-03-23_12.log ... When you want to refresh the HTML report, for example each time after a new binary file is generated, just do the following: pgbadger -o day1_report.html day1/*.bin Adjust the commands following your needs. JSON FORMAT JSON format is good for sharing data with other languages, which makes it easy to integrate pgBadger's result into other monitoring tools like Cacti or Graphite. AUTHORS pgBadger is an original work from Gilles Darold. The pgBadger logo is an original creation of Damien Clochard. The pgBadger v4.x design comes from the "Art is code" company. This web site is a work of Gilles Darold. pgBadger is maintained by Gilles Darold, the good folks at Dalibo, and every one who wants to contribute. Many people have contributed to pgBadger, they are all quoted in the Changelog file. LICENSE pgBadger is free software distributed under the PostgreSQL Licence. Copyright (c) 2012-2015, Dalibo A modified version of the SQL::Beautify Perl Module is embedded in pgBadger with copyright (C) 2009 by Jonas Kramer and is published under the terms of the Artistic License 2.0. pgbadger-7.1/doc/000077500000000000000000000000001255016237600137105ustar00rootroot00000000000000pgbadger-7.1/doc/pgBadger.pod000066400000000000000000000617241255016237600161410ustar00rootroot00000000000000=head1 NAME pgBadger - a fast PostgreSQL log analysis report =head1 SYNOPSIS Usage: pgbadger [options] logfile [...] PostgreSQL log analyzer with fully detailed reports and graphs. Arguments: logfile can be a single log file, a list of files, or a shell command returning a list of files. If you want to pass log content from stdin use - as filename. Note that input from stdin will not work with csvlog. You can also use a file containing a list of log file to parse, see -L command line option. Options: -a | --average minutes : number of minutes to build the average graphs of queries and connections. Default 5 minutes. -A | --histo-avg minutes: number of minutes to build the histogram graphs of queries. Default 60 minutes. -b | --begin datetime : start date/time for the data to be parsed in log. -B | --bar-graph : use bar graph instead of line by default. -c | --dbclient host : only report on entries for the given client host. -C | --nocomment : remove comments like /* ... */ from queries. -d | --dbname database : only report on entries for the given database. -D | --dns-resolv : client ip adresses are replaced by their DNS name. Be warned that this can really slow down pgBadger. -e | --end datetime : end date/time for the data to be parsed in log. -f | --format logtype : possible values: syslog, syslog2, stderr and csv. Default: stderr. -G | --nograph : disable graphs on HTML output. Enabled by default. -h | --help : show this message and exit. -i | --ident name : programname used as syslog ident. Default: postgres -I | --incremental : use incremental mode, reports will be generated by days in a separate directory, --outdir must be set. -j | --jobs number : number of jobs to run at same time. Default is 1, run as single process. -J | --Jobs number : number of log file to parse in parallel. Default is 1, run as single process. -l | --last-parsed file: allow incremental log parsing by registering the last datetime and line parsed. Useful if you want to watch errors since last run or if you want one report per day with a log rotated each week. -L | logfile-list file : file containing a list of log file to parse. -m | --maxlength size : maximum length of a query, it will be restricted to the given size. Default: no truncate -M | --no-multiline : do not collect multiline statement to avoid garbage especially on errors that generate a huge report. -n | --nohighlight : disable SQL code highlighting. -N | --appname name : only report on entries for given application name -o | --outfile filename: define the filename for the output. Default depends on the output format: out.html, out.txt, out.bin, out.json or out.tsung. With module JSON::XS installed, you can output file in JSON format either. To dump output to stdout use - as filename. -O | --outdir path : directory where out file must be saved. -p | --prefix string : the value of your custom log_line_prefix as defined in your postgresql.conf. Only use it if you aren't using one of the standard prefixes specified in the pgBadger documentation, such as if your prefix includes additional variables like client ip or application name. See examples below. -P | --no-prettify : disable SQL queries prettify formatter. -q | --quiet : don't print anything to stdout, not even a progress bar. -r | --remote-host ip : set the host where to execute the cat command on remote logfile to parse localy the file. -R | --retention N : number of week to keep in incremental mode. Default to 0, disabled. Used to set the number of weel to keep in output directory. Older weeks and days directory are automatically removed. -s | --sample number : number of query samples to store. Default: 3. -S | --select-only : only report SELECT queries. -t | --top number : number of queries to store/display. Default: 20. -T | --title string : change title of the HTML page report. -u | --dbuser username : only report on entries for the given user. -U | --exclude-user username : exclude entries for the specified user from report. -v | --verbose : enable verbose or debug mode. Disabled by default. -V | --version : show pgBadger version and exit. -w | --watch-mode : only report errors just like logwatch could do. -x | --extension : output format. Values: text, html, bin, json or tsung. Default: html -X | --extra-files : in incremetal mode allow pgbadger to write CSS and JS files in the output directory as separate files. -z | --zcat exec_path : set the full path to the zcat program. Use it if zcat or bzcat or unzip is not in your path. --pie-limit num : pie data lower than num% will show a sum instead. --exclude-query regex : any query matching the given regex will be excluded from the report. For example: "^(VACUUM|COMMIT)" You can use this option multiple times. --exclude-file filename: path of the file which contains all the regex to use to exclude queries from the report. One regex per line. --include-query regex : any query that does not match the given regex will be excluded from the report. You can use this option multiple times. For example: "(tbl1|tbl2)". --include-file filename: path of the file which contains all the regex of the queries to include from the report. One regex per line. --disable-error : do not generate error report. --disable-hourly : do not generate hourly report. --disable-type : do not generate report of queries by type, database or user. --disable-query : do not generate query reports (slowest, most frequent, queries by users, by database, ...). --disable-session : do not generate session report. --disable-connection : do not generate connection report. --disable-lock : do not generate lock report. --disable-temporary : do not generate temporary report. --disable-checkpoint : do not generate checkpoint/restartpoint report. --disable-autovacuum : do not generate autovacuum report. --charset : used to set the HTML charset to be used. Default: utf-8. --csv-separator : used to set the CSV field separator, default: , --exclude-time regex : any timestamp matching the given regex will be excluded from the report. Example: "2013-04-12 .*" You can use this option multiple times. --exclude-appname name : exclude entries for the specified application name from report. Example: "pg_dump". --exclude-line regex : pgbadger will start to exclude any log entry that will match the given regex. Can be used multiple time. --anonymize : obscure all literals in queries, useful to hide confidential data. --noreport : prevent pgbadger to create reports in incremental mode. --log-duration : force pgbadger to associate log entries generated by both log_duration = on and log_statement = 'all' --enable-checksum : used to add a md5 sum under each query report. pgBadger is able to parse a remote log file using a passwordless ssh connection. Use the -r or --remote-host to set the host ip address or hostname. There's also some additional options to fully control the ssh connection. --ssh-program ssh path to the ssh program to use. Default: ssh. --ssh-user username connection login name. Default to running user. --ssh-identity file path to the identity file to use. --ssh-timeout second timeout to ssh connection failure. Default 10 secs. --ssh-options options list of -o options to use for the ssh connection. Options always used: -o ConnectTimeout=$ssh_timeout -o PreferredAuthentications=hostbased,publickey Examples: pgbadger /var/log/postgresql.log pgbadger /var/log/postgres.log.2.gz /var/log/postgres.log.1.gz /var/log/postgres.log pgbadger /var/log/postgresql/postgresql-2012-05-* pgbadger --exclude-query="^(COPY|COMMIT)" /var/log/postgresql.log pgbadger -b "2012-06-25 10:56:11" -e "2012-06-25 10:59:11" /var/log/postgresql.log cat /var/log/postgres.log | pgbadger - # Log prefix with stderr log output perl pgbadger --prefix '%t [%p]: [%l-1] user=%u,db=%d,app=%a,client=%h' /pglog/postgresql-2012-08-21* perl pgbadger --prefix '%m %u@%d %p %r %a : ' /pglog/postgresql.log # Log line prefix with syslog log output perl pgbadger --prefix 'user=%u,db=%d,client=%h,app=%a' /pglog/postgresql-2012-08-21* # Use my 8 CPUs to parse my 10GB file faster, much faster perl pgbadger -j 8 /pglog/postgresql-9.1-main.log Generate Tsung sessions XML file with select queries only: perl pgbadger -S -o sessions.tsung --prefix '%t [%p]: [%l-1] user=%u,db=%d ' /pglog/postgresql-9.1.log Reporting errors every week by cron job: 30 23 * * 1 /usr/bin/pgbadger -q -w /var/log/postgresql.log -o /var/reports/pg_errors.html Generate report every week using incremental behavior: 0 4 * * 1 /usr/bin/pgbadger -q `find /var/log/ -mtime -7 -name "postgresql.log*"` -o /var/reports/pg_errors-`date +%F`.html -l /var/reports/pgbadger_incremental_file.dat This supposes that your log file and HTML report are also rotated every week. Or better, use the auto-generated incremental reports: 0 4 * * * /usr/bin/pgbadger -I -q /var/log/postgresql/postgresql.log.1 -O /var/www/pg_reports/ will generate a report per day and per week. In incremental mode, you can also specify the number of week to keep in the reports: /usr/bin/pgbadger --retention 2 -I -q /var/log/postgresql/postgresql.log.1 -O /var/www/pg_reports/ If you have a pg_dump at 23:00 and 13:00 each day during half an hour, you can use pgbadger as follow to exclude these period from the report: pgbadger --exclude-time "2013-09-.* (23|13):.*" postgresql.log This will help avoid having COPY statements, as generated by pg_dump, on top of the list of slowest queries. You can also use --exclude-appname "pg_dump" to solve this problem in a simpler way. =head1 DESCRIPTION pgBadger is a PostgreSQL log analyzer build for speed with fully detailed reports from your PostgreSQL log file. It's a single and small Perl script that outperform any other PostgreSQL log analyzer. It is written in pure Perl language and uses a javascript library (flotr2) to draw graphs so that you don't need to install any additional Perl modules or other packages. Furthermore, this library gives us more features such as zooming. pgBadger also uses the Bootstrap javascript library and the FontAwesome webfont for better design. Everything is embedded. pgBadger is able to autodetect your log file format (syslog, stderr or csvlog). It is designed to parse huge log files as well as gzip compressed file. See a complete list of features below. Supported compressed format are gzip, bzip2 and xz. For the last one you must have a xz version upper than 5.05 that support the --robot option. All charts are zoomable and can be saved as PNG images. You can also limit pgBadger to only report errors or remove any part of the report using command line options. pgBadger supports any custom format set into the log_line_prefix directive of your postgresql.conf file as long as it at least specify the %t and %p patterns. pgBadger allow parallel processing on a single log file and multiple files through the use of the -j option and the number of CPUs as value. If you want to save system performance you can also use log_duration instead of log_min_duration_statement to have reports on duration and number of queries only. =head1 FEATURE pgBadger reports everything about your SQL queries: Overall statistics The most frequent waiting queries. Queries that waited the most. Queries generating the most temporary files. Queries generating the largest temporary files. The slowest queries. Queries that took up the most time. The most frequent queries. The most frequent errors. Histogram of query times. Histogram of sessions times. Users involved in top queries. Applications involved in top queries. Queries generating the most cancellation. Queries most cancelled. The following reports are also available with hourly charts divide by periods of five minutes: SQL queries statistics. Temporary file statistics. Checkpoints statistics. Autovacuum and autoanalyze statistics. Cancelled queries. Error events (panic, fatal, error and warning). There's also some pie reports of distribution about: Locks statistics. Queries by type (select/insert/update/delete). Distribution of queries type per database/application Sessions per database/user/client/application. Connections per database/user/client/application. Autovacuum and autoanalyze per table. Queries per user and total duration per user. All charts are zoomable and can be saved as PNG images. SQL queries reported are highlighted and beautified automatically. You can also have incremental reports with one report per day and a cumulative report per week. Two multiprocess modes are available to speed up log parsing, one using one core per log file, and the second to use multiple core to parse a single file. Both modes can be combined. Histogram granularity can be adjusted using the -A command line option. By default they will report the mean of each top queries/error occuring per hour, but you can specify the granularity down to the minute. pgBadger can also be used in a central place to parse remote log files using a password less SSH connection. This mode can be used with compressed files and in mode multiprocess per file (-J) but can not be used with CSV log format. =head1 REQUIREMENT pgBadger comes as a single Perl script - you do not need anything other than a modern Perl distribution. Charts are rendered using a Javascript library so you don't need anything. Your browser will do all the work. If you planned to parse PostgreSQL CSV log files you might need some Perl Modules: Text::CSV_XS - to parse PostgreSQL CSV log files. This module is optional, if you don't have PostgreSQL log in the CSV format you don't need to install it. If you want to export statistics as JSON file you need an additional Perl module: JSON::XS - JSON serialising/deserialising, done correctly and fast This module is optional, if you don't select the json output format you don't need to install it. Compressed log file format is autodetected from the file exension. If pgBadger find a gz extension it will use the zcat utility, with a bz2 extension it will use bzcat and if the file extension is zip or xz then the unzip or xz utilities will be used. If those utilities are not found in the PATH environment variable then use the --zcat command line option to change this path. For example: --zcat="/usr/local/bin/gunzip -c" or --zcat="/usr/local/bin/bzip2 -dc" --zcat="C:\tools\unzip -p" By default pgBadger will use the zcat, bzcat and unzip utilities following the file extension. If you use the default autodetection compress format you can mixed gz, bz2, xz or zip files. Specifying a custom value to --zcat option will remove this feature of mixed compressed format. Note that multiprocessing can not be used with compressed files or CSV files as well as under Windows platform. =head1 INSTALLATION Download the tarball from github and unpack the archive as follow: tar xzf pgbadger-7.x.tar.gz cd pgbadger-7.x/ perl Makefile.PL make && sudo make install This will copy the Perl script pgbadger to /usr/local/bin/pgbadger by default and the man page into /usr/local/share/man/man1/pgbadger.1. Those are the default installation directories for 'site' install. If you want to install all under /usr/ location, use INSTALLDIRS='perl' as an argument of Makefile.PL. The script will be installed into /usr/bin/pgbadger and the manpage into /usr/share/man/man1/pgbadger.1. For example, to install everything just like Debian does, proceed as follows: perl Makefile.PL INSTALLDIRS=vendor By default INSTALLDIRS is set to site. =head1 POSTGRESQL CONFIGURATION You must enable and set some configuration directives in your postgresql.conf before starting. You must first enable SQL query logging to have something to parse: log_min_duration_statement = 0 Here every statement will be logged, on busy server you may want to increase this value to only log queries with a higher duration time. Note that if you have log_statement set to 'all' nothing will be logged through directive log_min_duration_statement. See next chapter for more information. With 'stderr' log format, log_line_prefix must be at least: log_line_prefix = '%t [%p]: [%l-1] ' Log line prefix could add user, database name, application name and client ip address as follows: log_line_prefix = '%t [%p]: [%l-1] user=%u,db=%d,app=%a,client=%h ' or for syslog log file format: log_line_prefix = 'user=%u,db=%d,app=%aclient=%h ' Log line prefix for stderr output could also be: log_line_prefix = '%t [%p]: [%l-1] db=%d,user=%u,app=%a,client=%h ' or for syslog output: log_line_prefix = 'db=%d,user=%u,app=%a,client=%h ' You need to enable other parameters in postgresql.conf to get more information from your log files: log_checkpoints = on log_connections = on log_disconnections = on log_lock_waits = on log_temp_files = 0 log_autovacuum_min_duration = 0 Do not enable log_statement as their log format will not be parsed by pgBadger. Of course your log messages should be in English without locale support: lc_messages='C' but this is not only recommended by pgBadger. Note: the session line [%l-1] is just used to match the default prefix for "stderr". The -1 has no real purpose and basically is not used in Pgbadger statistics / graphs. You can safely removed them from the log_line_prefix but you will need to set the --prefix command line option. =head1 log_min_duration_statement, log_duration and log_statement If you want full statistics reports you must set log_min_duration_statement to 0 or more milliseconds. If you just want to report duration and number of queries and don't want all details about queries, set log_min_duration_statement to -1 to disable it and enable log_duration in your postgresql.conf file. If you want to add the most common request report you can either choose to set log_min_duration_statement to a higher value or choose to enable log_statement. Enabling log_min_duration_statement will add reports about slowest queries and queries that took up the most time. Take care that if you have log_statement set to 'all' nothing will be logged with log_line_prefix. =head1 PARALLEL PROCESSING To enable parallel processing you just have to use the -j N option where N is the number of cores you want to use. pgbadger will then proceed as follow: for each log file chunk size = int(file size / N) look at start/end offsets of these chunks fork N processes and seek to the start offset of each chunk each process will terminate when the parser reach the end offset of its chunk each process write stats into a binary temporary file wait for all children has terminated All binary temporary files generated will then be read and loaded into memory to build the html output. With that method, at start/end of chunks pgbadger may truncate or omit a maximum of N queries perl log file which is an insignificant gap if you have millions of queries in your log file. The chance that the query that you were looking for is loose is near 0, this is why I think this gap is livable. Most of the time the query is counted twice but truncated. When you have lot of small log files and lot of CPUs it is speedier to dedicate one core to one log file at a time. To enable this behavior you have to use option -J N instead. With 200 log files of 10MB each the use of the -J option start being really interesting with 8 Cores. Using this method you will be sure to not loose any queries in the reports. He are a benchmarck done on a server with 8 CPUs and a single file of 9.5GB. Option | 1 CPU | 2 CPU | 4 CPU | 8 CPU --------+---------+-------+-------+------ -j | 1h41m18 | 50m25 | 25m39 | 15m58 -J | 1h41m18 | 54m28 | 41m16 | 34m45 With 200 log files of 10MB each and a total og 2GB the results are slightly different: Option | 1 CPU | 2 CPU | 4 CPU | 8 CPU --------+-------+-------+-------+------ -j | 20m15 | 9m56 | 5m20 | 4m20 -J | 20m15 | 9m49 | 5m00 | 2m40 So it is recommanded to use -j unless you have hundred of small log file and can use at least 8 CPUs. IMPORTANT: when you are using parallel parsing pgbadger will generate a lot of temporary files in the /tmp directory and will remove them at end, so do not remove those files unless pgbadger is not running. They are all named with the following template tmp_pgbadgerXXXX.bin so they can be easily identified. =head1 INCREMENTAL REPORTS pgBadger include an automatic incremental report mode using option -I or --incremental. When running in this mode, pgBadger will generate one report per day and a cumulative report per week. Output is first done in binary format into the mandatory output directory (see option -O or --outdir), then in HTML format for daily and weekly reports with a main index file. The main index file will show a dropdown menu per week with a link to the week report and links to daily reports of this week. For example, if you run pgBadger as follow based on a daily rotated file: 0 4 * * * /usr/bin/pgbadger -I -q /var/log/postgresql/postgresql.log.1 \ -O /var/www/pg_reports/ you will have all daily and weekly reports for the full running period. In this mode pgBagder will create an automatic incremental file into the output directory, so you don't have to use the -l option unless you want to change the path of that file. This mean that you can run pgBadger in this mode each days on a log file rotated each week, it will not count the log entries twice. To save disk space you may want to use the -X or --extra-files command line option to force pgBadger to write javascript and css to separate files in the output directory. The resources will then be loaded using script and link tag. =head1 BINARY FORMAT Using the binary format it is possible to create custom incremental and cumulative reports. For example, if you want to refresh a pgbadger report each hour from a daily PostgreSQl log file, you can proceed by running each hour the following commands: pgbadger --last-parsed .pgbadger_last_state_file -o sunday/hourX.bin /var/log/pgsql/postgresql-Sun.log to generate the incremental data files in binary format. And to generate the fresh HTML report from that binary file: pgbadger sunday/*.bin Or an other example, if you have one log file per hour and you want a reports to be rebuild each time the log file is switched. Proceed as follow: pgbadger -o day1/hour01.bin /var/log/pgsql/pglog/postgresql-2012-03-23_10.log pgbadger -o day1/hour02.bin /var/log/pgsql/pglog/postgresql-2012-03-23_11.log pgbadger -o day1/hour03.bin /var/log/pgsql/pglog/postgresql-2012-03-23_12.log ... When you want to refresh the HTML report, for example each time after a new binary file is generated, just do the following: pgbadger -o day1_report.html day1/*.bin Adjust the commands following your needs. =head1 JSON FORMAT JSON format is good for sharing data with other languages, which makes it easy to integrate pgBadger's result into other monitoring tools like Cacti or Graphite. =head1 AUTHORS pgBadger is an original work from Gilles Darold. The pgBadger logo is an original creation of Damien Clochard. The pgBadger v4.x design comes from the "Art is code" company. This web site is a work of Gilles Darold. pgBadger is maintained by Gilles Darold, the good folks at Dalibo, and every one who wants to contribute. Many people have contributed to pgBadger, they are all quoted in the Changelog file. =head1 LICENSE pgBadger is free software distributed under the PostgreSQL Licence. Copyright (c) 2012-2015, Dalibo A modified version of the SQL::Beautify Perl Module is embedded in pgBadger with copyright (C) 2009 by Jonas Kramer and is published under the terms of the Artistic License 2.0. pgbadger-7.1/pgbadger000077500000000000000000035240751255016237600146640ustar00rootroot00000000000000#!/usr/bin/env perl #------------------------------------------------------------------------------ # # pgBadger - Advanced PostgreSQL log analyzer # # This program is open source, licensed under the PostgreSQL Licence. # For license terms, see the LICENSE file. #------------------------------------------------------------------------------ # # Settings in postgresql.conf # # You should enable SQL query logging with log_min_duration_statement >= 0 # With stderr output # Log line prefix should be: log_line_prefix = '%t [%p]: [%l-1] ' # Log line prefix should be: log_line_prefix = '%t [%p]: [%l-1] user=%u,db=%d ' # Log line prefix should be: log_line_prefix = '%t [%p]: [%l-1] db=%d,user=%u ' # If you need report per client Ip adresses you can add client=%h or remote=%h # pgbadger will also recognized the following form: # log_line_prefix = '%t [%p]: [%l-1] db=%d,user=%u,client=%h ' # or # log_line_prefix = '%t [%p]: [%l-1] user=%u,db=%d,remote=%h ' # With syslog output # Log line prefix should be: log_line_prefix = 'db=%d,user=%u ' # # Additional information that could be collected and reported # log_checkpoints = on # log_connections = on # log_disconnections = on # log_lock_waits = on # log_temp_files = 0 # log_autovacuum_min_duration = 0 #------------------------------------------------------------------------------ use vars qw($VERSION); use strict qw(vars subs); use Getopt::Long qw(:config no_ignore_case bundling); use IO::File; use Benchmark; use File::Basename; use Storable qw(store_fd fd_retrieve); use Time::Local 'timegm_nocheck'; use POSIX qw(locale_h sys_wait_h _exit strftime); setlocale(LC_NUMERIC, ''); setlocale(LC_ALL, 'C'); use File::Spec qw/ tmpdir /; use File::Temp qw/ tempfile /; use IO::Handle; use IO::Pipe; use FileHandle; use Socket; use constant EBCDIC => "\t" ne "\011"; $VERSION = '7.1'; $SIG{'CHLD'} = 'DEFAULT'; my $TMP_DIR = File::Spec->tmpdir() || '/tmp'; my %RUNNING_PIDS = (); my @tempfiles = (); my $parent_pid = $$; my $interrupt = 0; my $tmp_last_parsed = ''; my @SQL_ACTION = ('SELECT', 'INSERT', 'UPDATE', 'DELETE'); my @LATENCY_PERCENTILE = sort {$a <=> $b} (99,95,90); my $graphid = 1; my $NODATA = '
NO DATASET
'; my $MAX_QUERY_LENGTH = 20480; my $terminate = 0; my %CACHE_DNS = (); my $DNSLookupTimeout = 1; # (in seconds) my $EXPLAIN_URL = 'http://explain.depesz.com/?is_public=0&is_anon=0&plan='; my @E2A = ( 0, 1, 2, 3,156, 9,134,127,151,141,142, 11, 12, 13, 14, 15, 16, 17, 18, 19,157, 10, 8,135, 24, 25,146,143, 28, 29, 30, 31, 128,129,130,131,132,133, 23, 27,136,137,138,139,140, 5, 6, 7, 144,145, 22,147,148,149,150, 4,152,153,154,155, 20, 21,158, 26, 32,160,226,228,224,225,227,229,231,241,162, 46, 60, 40, 43,124, 38,233,234,235,232,237,238,239,236,223, 33, 36, 42, 41, 59, 94, 45, 47,194,196,192,193,195,197,199,209,166, 44, 37, 95, 62, 63, 248,201,202,203,200,205,206,207,204, 96, 58, 35, 64, 39, 61, 34, 216, 97, 98, 99,100,101,102,103,104,105,171,187,240,253,254,177, 176,106,107,108,109,110,111,112,113,114,170,186,230,184,198,164, 181,126,115,116,117,118,119,120,121,122,161,191,208, 91,222,174, 172,163,165,183,169,167,182,188,189,190,221,168,175, 93,180,215, 123, 65, 66, 67, 68, 69, 70, 71, 72, 73,173,244,246,242,243,245, 125, 74, 75, 76, 77, 78, 79, 80, 81, 82,185,251,252,249,250,255, 92,247, 83, 84, 85, 86, 87, 88, 89, 90,178,212,214,210,211,213, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,179,219,220,217,218,159 ); if (EBCDIC && ord('^') == 106) { # as in the BS2000 posix-bc coded character set $E2A[74] = 96; $E2A[95] = 159; $E2A[106] = 94; $E2A[121] = 168; $E2A[161] = 175; $E2A[173] = 221; $E2A[176] = 162; $E2A[186] = 172; $E2A[187] = 91; $E2A[188] = 92; $E2A[192] = 249; $E2A[208] = 166; $E2A[221] = 219; $E2A[224] = 217; $E2A[251] = 123; $E2A[253] = 125; $E2A[255] = 126; } elsif (EBCDIC && ord('^') == 176) { # as in codepage 037 on os400 $E2A[21] = 133; $E2A[37] = 10; $E2A[95] = 172; $E2A[173] = 221; $E2A[176] = 94; $E2A[186] = 91; $E2A[187] = 93; $E2A[189] = 168; } my $pgbadger_logo = ''; my $pgbadger_ico = 'data:image/x-icon;base64, AAABAAEAIyMQAAEABAA8BAAAFgAAACgAAAAjAAAARgAAAAEABAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAgAAGRsZACgqKQA2OTcASEpJAFpdWwBoa2kAeHt5AImMigCeoZ8AsLOxAMTHxQDR1NIA 5enmAPv+/AAAAAAA///////////////////////wAAD///////////H///////////AAAP////// //9Fq7Yv////////8AAA////////8V7u7qD////////wAAD///////8B7qWN5AL///////AAAP// ///y8Avrc3rtMCH/////8AAA/////xABvbAAAJ6kAA/////wAAD////wAG5tQAAADp6RAP////AA AP//MQBd7C2lRESOWe5xAD//8AAA//8APO7iC+7e7u4A3uxwBf/wAAD/9Aju7iAAvu7u0QAN7ukA 7/AAAP/wCe7kAAAF7ugAAAHO6xD/8AAA//AK7CAAAAHO1AAAABnrEP/wAAD/8ArAAAAAAc7kAAAA AIwQ//AAAP/wCjAAAAAC3uQAAAAAHBCf8AAA//AIEBVnIATu5gAXZhAFEP/wAAD/8AIAqxdwBu7p AFoX0QIQ//AAAP/wAAPsBCAL7u4QBwfmAAD/8AAA//AAA8owAC7u7lAAKbYAAJ/wAAD/8AAAAAAA fu7uwAAAAAAA//AAAP/wAAAAAADu7u7jAAAAAAD/8AAA//AAAAAABe7u7uoAAAAAAP/wAAD/8AAA AAAL7u7u7QAAAAAAn/AAAP/wAAAAAB3u7u7uYAAAAAD/8AAA//MAAAAATu7u7u6QAAAAAP/wAAD/ /wAAAAAM7u7u7TAAAAAD//AAAP//IQAAAAKu7u7UAAAAAB//8AAA////IAAAAAju7BAAAAAP///w AAD////2AAA1je7ulUAAA/////AAAP/////xEAnO7u7pIAH/////8AAA//////9CABju6iACP/// ///wAAD////////wAAggAP////////AAAP////////8wAAA/////////8AAA///////////w//// ///////wAAD///////////////////////AAAP/////gAAAA//+//+AAAAD//Af/4AAAAP/4A//g AAAA//AA/+AAAAD/oAA/4AAAAP8AAB/gAAAA/gAAD+AAAADwAAAB4AAAAPAAAADgAAAA4AAAAGAA AADgAAAA4AAAAOAAAADgAAAA4AAAAOAAAADgAAAAYAAAAOAAAADgAAAA4AAAAOAAAADgAAAA4AAA AOAAAABgAAAA4AAAAOAAAADgAAAA4AAAAOAAAADgAAAA4AAAAGAAAADgAAAA4AAAAOAAAADgAAAA 8AAAAOAAAADwAAAB4AAAAPwAAAfgAAAA/gAAD+AAAAD/gAA/4AAAAP/AAH/gAAAA//gD/+AAAAD/ /Af/4AAAAP//v//gAAAA/////+AAAAA '; #### # method used to fork as many child as wanted ## sub spawn { my $coderef = shift; unless (@_ == 0 && $coderef && ref($coderef) eq 'CODE') { print "usage: spawn CODEREF"; exit 0; } my $pid; if (!defined($pid = fork)) { print STDERR "Error: cannot fork: $!\n"; return; } elsif ($pid) { $RUNNING_PIDS{$pid} = $pid; return; # the parent } # the child -- go spawn $< = $>; $( = $); # suid progs only exit &$coderef(); } # Command line options my $zcat_cmd = 'gunzip -c'; my $zcat = $zcat_cmd; my $bzcat = 'bunzip2 -c'; my $ucat = 'unzip -p'; my $xzcat = 'xzcat'; my $gzip_uncompress_size = "gunzip -l %f | grep -E '^\\s*[0-9]+' | awk '{print \$2}'"; my $zip_uncompress_size = "unzip -l %f | awk '{if (NR==4) print \$1}'"; my $xz_uncompress_size = "xz --robot -l %f | grep totals | awk '{print \$5}'"; my $format = ''; my $outfile = ''; my $outdir = ''; my $incremental = ''; my $extra_files = 0; my $help = ''; my $ver = ''; my @dbname = (); my @dbuser = (); my @dbclient = (); my @dbappname = (); my @exclude_user = (); my @exclude_appname = (); my @exclude_line = (); my $ident = ''; my $top = 0; my $sample = 3; my $extension = ''; my $maxlength = 0; my $graph = 1; my $nograph = 0; my $debug = 0; my $nohighlight = 0; my $noprettify = 0; my $from = ''; my $to = ''; my $quiet = 0; my $progress = 1; my $error_only = 0; my @exclude_query = (); my @exclude_time = (); my $exclude_file = ''; my @include_query = (); my $include_file = ''; my $disable_error = 0; my $disable_hourly = 0; my $disable_type = 0; my $disable_query = 0; my $disable_session = 0; my $disable_connection = 0; my $disable_lock = 0; my $disable_temporary = 0; my $disable_checkpoint = 0; my $disable_autovacuum = 0; my $avg_minutes = 5; my $histo_avg_minutes = 60; my $last_parsed = ''; my $report_title = ''; my $log_line_prefix = ''; my $compiled_prefix = ''; my $project_url = 'http://dalibo.github.com/pgbadger/'; my $t_min = 0; my $t_max = 0; my $remove_comment = 0; my $select_only = 0; my $tsung_queries = 0; my $queue_size = 0; my $job_per_file = 0; my $charset = 'utf-8'; my $csv_sep_char = ','; my %current_sessions = (); my $incr_date = ''; my $last_incr_date = ''; my $anonymize = 0; my $noclean = 0; my $retention = 0; my $bar_graph = 0; my $dns_resolv = 0; my $nomultiline = 0; my $noreport = 0; my $log_duration = 0; my $logfile_list = ''; my $enable_checksum = 0; my $NUMPROGRESS = 10000; my @DIMENSIONS = (800, 300); my $RESRC_URL = ''; my $img_format = 'png'; my @log_files = (); my %prefix_vars = (); my $remote_host = ''; my $ssh_command = ''; my $ssh_bin = 'ssh'; my $ssh_identity = ''; my $ssh_user = ''; my $ssh_timeout = 10; my $ssh_options = "-o ConnectTimeout=$ssh_timeout -o PreferredAuthentications=hostbased,publickey"; # OBSOLETE, to be removed # List of regex that match fatal error message that do not # generate disconnection line in log. This is to prevent # sessions in the sessions charts to increase continually. # See issue #176 on github my @session_closed_msg = ( qr/^(database|role) "[^"]+" does not exist$/, qr/^no pg_hba.conf entry for/, ); my $sql_prettified; # Do not display data in pie where percentage is lower than this value # to avoid label overlapping. my $pie_percentage_limit = 2; # Get the decimal separator my $n = 5 / 2; my $num_sep = ','; $num_sep = ' ' if ($n =~ /,/); # Inform the parent that it should stop iterate on parsing other files sub stop_parsing { &logmsg('DEBUG', "Received interrupt signal"); $interrupt = 1; } # With multiprocess we need to wait for all children sub wait_child { my $sig = shift; $interrupt = 2; print STDERR "Received terminating signal ($sig).\n"; if ($^O !~ /MSWin32|dos/i) { 1 while wait != -1; $SIG{INT} = \&wait_child; $SIG{TERM} = \&wait_child; foreach my $f (@tempfiles) { unlink("$f->[1]") if (-e "$f->[1]"); } } if ($last_parsed && -e "$tmp_last_parsed") { unlink("$tmp_last_parsed"); } if ($last_parsed && -e "$last_parsed.tmp") { unlink("$last_parsed.tmp"); } _exit(0); } $SIG{INT} = \&wait_child; $SIG{TERM} = \&wait_child; $SIG{USR2} = \&stop_parsing; $| = 1; # get the command line parameters my $result = GetOptions( "a|average=i" => \$avg_minutes, "A|histo-average=i" => \$histo_avg_minutes, "b|begin=s" => \$from, "B|bar-graph!" => \$bar_graph, "c|dbclient=s" => \@dbclient, "C|nocomment!" => \$remove_comment, "d|dbname=s" => \@dbname, "D|dns-resolv!" => \$dns_resolv, "e|end=s" => \$to, "f|format=s" => \$format, "G|nograph!" => \$nograph, "h|help!" => \$help, "i|ident=s" => \$ident, "I|incremental!" => \$incremental, "j|jobs=i" => \$queue_size, "J|job_per_file=i" => \$job_per_file, "l|last-parsed=s" => \$last_parsed, "L|logfile-list=s" => \$logfile_list, "m|maxlength=i" => \$maxlength, "M|no-multiline!" => \$nomultiline, "N|appname=s" => \@dbappname, "n|nohighlight!" => \$nohighlight, "o|outfile=s" => \$outfile, "O|outdir=s" => \$outdir, "p|prefix=s" => \$log_line_prefix, "P|no-prettify!" => \$noprettify, "q|quiet!" => \$quiet, "r|remote-host=s" => \$remote_host, 'R|retention=i' => \$retention, "s|sample=i" => \$sample, "S|select-only!" => \$select_only, "t|top=i" => \$top, "T|title=s" => \$report_title, "u|dbuser=s" => \@dbuser, "U|exclude-user=s" => \@exclude_user, "v|verbose!" => \$debug, "V|version!" => \$ver, "w|watch-mode!" => \$error_only, "x|extension=s" => \$extension, "X|extra-files!" => \$extra_files, "z|zcat=s" => \$zcat, "pie-limit=i" => \$pie_percentage_limit, "image-format=s" => \$img_format, "exclude-query=s" => \@exclude_query, "exclude-file=s" => \$exclude_file, "exclude-appname=s" => \@exclude_appname, "include-query=s" => \@include_query, "exclude-line=s" => \@exclude_line, "include-file=s" => \$include_file, "disable-error!" => \$disable_error, "disable-hourly!" => \$disable_hourly, "disable-type!" => \$disable_type, "disable-query!" => \$disable_query, "disable-session!" => \$disable_session, "disable-connection!" => \$disable_connection, "disable-lock!" => \$disable_lock, "disable-temporary!" => \$disable_temporary, "disable-checkpoint!" => \$disable_checkpoint, "disable-autovacuum!" => \$disable_autovacuum, "charset=s" => \$charset, "csv-separator=s" => \$csv_sep_char, "exclude-time=s" => \@exclude_time, 'ssh-command=s' => \$ssh_command, 'ssh-program=s' => \$ssh_bin, 'ssh-identity=s' => \$ssh_identity, 'ssh-option=s' => \$ssh_options, 'ssh-user=s' => \$ssh_user, 'ssh-timeout=i' => \$ssh_timeout, 'anonymize!' => \$anonymize, 'noclean!' => \$noclean, 'noreport!' => \$noreport, 'log-duration!' => \$log_duration, 'enable-checksum!' => \$enable_checksum, ); die "FATAL: use pgbadger --help\n" if (not $result); $report_title = &escape_html($report_title) if $report_title; if ($ver) { print "pgBadger version $VERSION\n"; exit 0; } &usage() if ($help); # Try to load Digest::MD5 when asked if ($enable_checksum) { if (eval {require Digest::MD5;1} ne 1) { die("Can not load Perl module Digest::MD5.\n"); } else { Digest::MD5->import('md5_hex'); } } # Rewrite some command line arguments as lists &compute_arg_list(); # If pgBadger must parse remote files set the ssh command if ($remote_host) { # If no user defined ssh command if (!$ssh_command) { $ssh_command = $ssh_bin || 'ssh'; $ssh_command .= " -i $ssh_identity" if ($ssh_identity); $ssh_command .= " $ssh_options" if ($ssh_options); if ($ssh_user) { $ssh_command .= " $ssh_user\@$remote_host"; } else { $ssh_command .= " $remote_host"; } } } # Log files to be parsed are passed as command line arguments if ($#ARGV >= 0) { foreach my $file (@ARGV) { if ($file ne '-') { if (!$remote_host) { die "FATAL: logfile $file must exist!\n" if not -f $file; if (-z $file) { print "WARNING: file $file is empty\n"; next; } push(@log_files, $file); } else { # Get files from remote host &logmsg('DEBUG', "Looking for remote filename using command: $ssh_command \"ls $file\""); my @rfiles = `$ssh_command "ls $file"`; foreach my $f (@rfiles) { push(@log_files, $f); } } } else { if ($logfile_list) { die "FATAL: stdin input - can not be used with logfile list (-L).\n"; } push(@log_files, $file); } } } if ($logfile_list) { if (!-e $logfile_list) { die "FATAL: logfile list $logfile_list must exist!\n"; } if (not open(IN, $logfile_list)) { die "FATAL: can not read logfile list $logfile_list, $!.\n"; } my @files = ; close(IN); foreach my $file (@files) { chomp($file); $file =~ s/\r//; if ($file eq '-') { die "FATAL: stdin input - can not be used with logfile list.\n"; } if (!$remote_host) { die "FATAL: logfile $file must exist!\n" if not -f $file; if (-z $file) { print "WARNING: file $file is empty\n"; next; } push(@log_files, $file); } else { # Get files from remote host &logmsg('DEBUG', "Looking for remote filename using command: $ssh_command \"ls $file\""); my @rfiles = `$ssh_command "ls $file"`; foreach my $f (@rfiles) { push(@log_files, $f); } } } } # Logfile is a mandatory parameter if ($#log_files < 0) { print STDERR "FATAL: you must give a log file as command line parameter.\n\n"; &usage(); } # Quiet mode is forced with progress bar $progress = 0 if ($quiet); # Set the default number minutes for queries and connections average $avg_minutes ||= 5; $avg_minutes = 60 if ($avg_minutes > 60); $avg_minutes = 1 if ($avg_minutes < 1); $histo_avg_minutes ||= 60; $histo_avg_minutes = 60 if ($histo_avg_minutes > 60); $histo_avg_minutes = 1 if ($histo_avg_minutes < 1); my @avgs = (); for (my $i = 0 ; $i < 60 ; $i += $avg_minutes) { push(@avgs, sprintf("%02d", $i)); } my @histo_avgs = (); for (my $i = 0 ; $i < 60 ; $i += $histo_avg_minutes) { push(@histo_avgs, sprintf("%02d", $i)); } # Set error like log level regex my $parse_regex = qr/^(LOG|WARNING|ERROR|FATAL|PANIC|DETAIL|HINT|STATEMENT|CONTEXT)/; my $full_error_regex = qr/^(WARNING|ERROR|FATAL|PANIC|DETAIL|HINT|STATEMENT|CONTEXT)/; my $main_error_regex = qr/^(WARNING|ERROR|FATAL|PANIC)/; # Set syslog prefix regex my $other_syslog_line = qr/^(...)\s+(\d+)\s(\d+):(\d+):(\d+)(?:\s[^\s]+)?\s([^\s]+)\s([^\s\[]+)\[(\d+)\]:(?:\s\[[^\]]+\])?\s\[(\d+)\-\d+\]\s*(.*)/; my $orphan_syslog_line = qr/^(...)\s+(\d+)\s(\d+):(\d+):(\d+)(?:\s[^\s]+)?\s([^\s]+)\s([^\s\[]+)\[(\d+)\]:/; my $orphan_stderr_line = ''; # Simply genreate a random string, thanks to Perlmonks # Set default format my $frmt = ''; if (!$remote_host) { $frmt = &autodetect_format($log_files[0]); } elsif (!$format) { die "FATAL: you must give a log file format (-f or --format) when using remote connection.\n\n"; } $format ||= $frmt; if ($format eq 'syslog2') { $other_syslog_line = qr/^(\d+-\d+)-(\d+)T(\d+):(\d+):(\d+)(?:.[^\s]+)?\s([^\s]+)\s(?:[^\s]+\s)?(?:[^\s]+\s)?([^\s\[]+)\[(\d+)\]:(?:\s\[[^\]]+\])?\s\[(\d+)\-\d+\]\s*(.*)/; $orphan_syslog_line = qr/^(\d+-\d+)-(\d+)T(\d+):(\d+):(\d+)(?:.[^\s]+)?\s([^\s]+)\s(?:[^\s]+\s)?(?:[^\s]+\s)?([^\s\[]+)\[(\d+)\]:/; } # Set default top query $top ||= 20; # Set the default extension and output format if (!$extension) { if ($outfile =~ /\.bin/i) { $extension = 'binary'; } elsif ($outfile =~ /\.json/i) { if (eval {require JSON::XS;1;} ne 1) { die("Can not save output in json format, please install Perl module JSON::XS first.\n"); } else { JSON::XS->import(); } $extension = 'json'; } elsif ($outfile =~ /\.tsung/i) { $extension = 'tsung'; } elsif ($outfile =~ /\.htm[l]*/i) { $extension = 'html'; } elsif ($outfile) { $extension = 'txt'; } else { $extension = 'html'; } } elsif (lc($extension) eq 'json') { if (eval {require JSON::XS;1;} ne 1) { die("Can not save output in json format, please install Perl module JSON::XS first.\n"); } else { JSON::XS->import(); } } # Set default filename of the output file $outfile ||= 'out.' . $extension; &logmsg('DEBUG', "Output '$extension' reports will be written to $outfile"); # Set default syslog ident name $ident ||= 'postgres'; # Set default pie percentage limit or fix value $pie_percentage_limit = 0 if ($pie_percentage_limit < 0); $pie_percentage_limit = 2 if ($pie_percentage_limit eq ''); $pie_percentage_limit = 100 if ($pie_percentage_limit > 100); # Set default download image format $img_format = lc($img_format); $img_format = 'jpeg' if ($img_format eq 'jpg'); $img_format = 'png' if ($img_format ne 'jpeg'); # Extract the output directory from outfile so that graphs will # be created in the same directory if ($outfile ne '-') { if (!$outdir) { my @infs = fileparse($outfile); if ($infs[0] ne '') { $outdir = $infs[1]; } else { # maybe a confusion between -O and -o die "FATAL: output file $outfile is a directory, should be a file\nor maybe you want to use -O | --outdir option instead.\n"; } } elsif (!-d "$outdir") { # An output directory has been passed as command line parameter die "FATAL: $outdir is not a directory or doesn't exist.\n"; } $outfile = basename($outfile); $outfile = $outdir . '/' . $outfile; } # Remove graph support if output is not html $graph = 0 unless ($extension eq 'html' or $extension eq 'binary' or $extension eq 'json'); $graph = 0 if ($nograph); # Set some default values my $end_top = $top - 1; $queue_size ||= 1; $job_per_file ||= 1; if ($^O =~ /MSWin32|dos/i) { if ( ($queue_size > 1) || ($job_per_file > 1) ) { print STDERR "WARNING: parallel processing is not supported on this platform.\n"; $queue_size = 1; $job_per_file = 1; } } if ($extension eq 'tsung') { # Open filehandle my $fh = new IO::File ">$outfile"; if (not defined $fh) { die "FATAL: can't write to $outfile, $!\n"; } print $fh qq{ }; $fh->close(); } else { # Test file creation before going to parse log my $tmpfh = new IO::File ">$outfile"; if (not defined $tmpfh) { die "FATAL: can't write to $outfile, $!\n"; } $tmpfh->close(); unlink($outfile) if (-e $outfile); } # -w and --disable-error can't go together if ($error_only && $disable_error) { die "FATAL: please choose between no event report and reporting events only.\n"; } # Set default search pattern for database, user name, application name and host in log_line_prefix my $regex_prefix_dbname = qr/db=([^,]*)/; my $regex_prefix_dbuser = qr/user=([^,]*)/; my $regex_prefix_dbclient = qr/(?:client|remote)=([^,]*)/; my $regex_prefix_dbappname = qr/app=([^,]*)/; # Set pattern to look for query type my $action_regex = qr/^[\s\(]*(DELETE|INSERT|UPDATE|SELECT|COPY)/is; # Loading excluded query from file if any if ($exclude_file) { open(IN, "$exclude_file") or die "FATAL: can't read file $exclude_file: $!\n"; my @exclq = ; close(IN); chomp(@exclq); map {s/\r//;} @exclq; foreach my $r (@exclq) { &check_regex($r, '--exclude-file'); } push(@exclude_query, @exclq); } # Testing regex syntax if ($#exclude_query >= 0) { foreach my $r (@exclude_query) { &check_regex($r, '--exclude-query'); } } # Testing regex syntax if ($#exclude_time >= 0) { foreach my $r (@exclude_time) { &check_regex($r, '--exclude-time'); } } # Loading included query from file if any if ($include_file) { open(IN, "$include_file") or die "FATAL: can't read file $include_file: $!\n"; my @exclq = ; close(IN); chomp(@exclq); map {s/\r//;} @exclq; foreach my $r (@exclq) { &check_regex($r, '--include-file'); } push(@include_query, @exclq); } # Testing regex syntax if ($#include_query >= 0) { foreach my $r (@include_query) { &check_regex($r, '--include-query'); } } # Compile custom log line prefix prefix my @prefix_params = (); if ($log_line_prefix) { # Build parameters name that will be extracted from the prefix regexp @prefix_params = &build_log_line_prefix_regex(); &check_regex($log_line_prefix, '--prefix'); if ($format eq 'syslog') { $log_line_prefix = '^(...)\s+(\d+)\s(\d+):(\d+):(\d+)(?:\s[^\s]+)?\s([^\s]+)\s([^\s\[]+)\[(\d+)\]:(?:\s\[[^\]]+\])?\s\[(\d+)\-\d+\]\s*' . $log_line_prefix . '\s*(LOG|WARNING|ERROR|FATAL|PANIC|DETAIL|STATEMENT|HINT|CONTEXT):\s+(?:[0-9A-Z]{5}:\s+)?(.*)'; $compiled_prefix = qr/$log_line_prefix/; unshift(@prefix_params, 't_month', 't_day', 't_hour', 't_min', 't_sec', 't_host', 't_ident', 't_pid', 't_session_line'); push(@prefix_params, 't_loglevel', 't_query'); } elsif ($format eq 'syslog2') { $format = 'syslog'; $log_line_prefix = '^(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)(?:.[^\s]+)?\s([^\s]+)\s(?:[^\s]+\s)?(?:[^\s]+\s)?([^\s\[]+)\[(\d+)\]:(?:\s\[[^\]]+\])?\s\[(\d+)\-\d+\]\s*' . $log_line_prefix . '\s*(LOG|WARNING|ERROR|FATAL|PANIC|DETAIL|STATEMENT|HINT|CONTEXT):\s+(?:[0-9A-Z]{5}:\s+)?(.*)'; $compiled_prefix = qr/$log_line_prefix/; unshift(@prefix_params, 't_year', 't_month', 't_day', 't_hour', 't_min', 't_sec', 't_host', 't_ident', 't_pid', 't_session_line'); push(@prefix_params, 't_loglevel', 't_query'); } elsif ($format eq 'stderr') { $orphan_stderr_line = qr/$log_line_prefix/; $log_line_prefix = '^' . $log_line_prefix . '\s*(LOG|WARNING|ERROR|FATAL|PANIC|DETAIL|STATEMENT|HINT|CONTEXT):\s+(?:[0-9A-Z]{5}:\s+)?(.*)'; $compiled_prefix = qr/$log_line_prefix/; push(@prefix_params, 't_loglevel', 't_query'); } } elsif ($format eq 'syslog') { $compiled_prefix = qr/^(...)\s+(\d+)\s(\d+):(\d+):(\d+)(?:\s[^\s]+)?\s([^\s]+)\s([^\s\[]+)\[(\d+)\]:(?:\s\[[^\]]+\])?\s\[(\d+)\-\d+\]\s*(.*?)\s*(LOG|WARNING|ERROR|FATAL|PANIC|DETAIL|STATEMENT|HINT|CONTEXT):\s+(?:[0-9A-Z]{5}:\s+)?(.*)/; push(@prefix_params, 't_month', 't_day', 't_hour', 't_min', 't_sec', 't_host', 't_ident', 't_pid', 't_session_line', 't_logprefix', 't_loglevel', 't_query'); } elsif ($format eq 'syslog2') { $format = 'syslog'; $compiled_prefix = qr/^(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)(?:.[^\s]+)?\s([^\s]+)\s(?:[^\s]+\s)?(?:[^\s]+\s)?([^\s\[]+)\[(\d+)\]:(?:\s\[[^\]]+\])?\s\[(\d+)\-\d+\]\s*(.*?)\s*(LOG|WARNING|ERROR|FATAL|PANIC|DETAIL|STATEMENT|HINT|CONTEXT):\s+(?:[0-9A-Z]{5}:\s+)?(.*)/; push(@prefix_params, 't_year', 't_month', 't_day', 't_hour', 't_min', 't_sec', 't_host', 't_ident', 't_pid', 't_session_line', 't_logprefix', 't_loglevel', 't_query'); } elsif ($format eq 'stderr') { $compiled_prefix = qr/^(\d+-\d+-\d+\s\d+:\d+:\d+)[\.\d]*(?: [A-Z\d]{3,6})?\s\[(\d+)\]:\s\[(\d+)\-\d+\]\s*(.*?)\s*(LOG|WARNING|ERROR|FATAL|PANIC|DETAIL|STATEMENT|HINT|CONTEXT):\s+(?:[0-9A-Z]{5}:\s+)?(.*)/; push(@prefix_params, 't_timestamp', 't_pid', 't_session_line', 't_logprefix', 't_loglevel', 't_query'); $orphan_stderr_line = qr/^(\d+-\d+-\d+\s\d+:\d+:\d+)[\.\d]*(?: [A-Z\d]{3,6})?\s\[(\d+)\]:\s\[(\d+)\-\d+\]\s*(.*?)\s*/; } sub check_regex { my ($pattern, $varname) = @_; eval {m/$pattern/i;}; if ($@) { die "FATAL: '$varname' invalid regex '$pattern', $!\n"; } } # Check start/end date time if ($from) { if ($from !~ /^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})([.]\d+([+-]\d+)?)?$/) { die "FATAL: bad format for begin datetime, should be yyyy-mm-dd hh:mm:ss.l+tz\n"; } else { my $fractional_seconds = $7 || "0"; $from = "$1-$2-$3 $4:$5:$6.$7" } } if ($to) { if ($to !~ /^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})([.]\d+([+-]\d+)?)?$/) { die "FATAL: bad format for ending datetime, should be yyyy-mm-dd hh:mm:ss.l+tz\n"; } else { my $fractional_seconds = $7 || "0"; $to = "$1-$2-$3 $4:$5:$6.$7" } } # Stores the last parsed line from log file to allow incremental parsing my $LAST_LINE = ''; # Set the level of the data aggregator, can be minute, hour or day follow the # size of the log file. my $LEVEL = 'hour'; # Month names my %month_abbr = ( 'Jan' => '01', 'Feb' => '02', 'Mar' => '03', 'Apr' => '04', 'May' => '05', 'Jun' => '06', 'Jul' => '07', 'Aug' => '08', 'Sep' => '09', 'Oct' => '10', 'Nov' => '11', 'Dec' => '12' ); my %abbr_month = ( '01' => 'Jan', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'May', '06' => 'Jun', '07' => 'Jul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Nov', '12' => 'Dec' ); # Keywords variable my @pg_keywords = qw( ALL ANALYSE ANALYZE AND ANY ARRAY AS ASC ASYMMETRIC AUTHORIZATION BINARY BOTH CASE CAST CHECK COLLATE COLLATION COLUMN CONCURRENTLY CONSTRAINT CREATE CROSS CURRENT_DATE CURRENT_ROLE CURRENT_TIME CURRENT_TIMESTAMP CURRENT_USER DEFAULT DEFERRABLE DESC DISTINCT DO ELSE END EXCEPT FALSE FETCH FOR FOREIGN FREEZE FROM FULL GRANT GROUP HAVING ILIKE IN INITIALLY INNER INTERSECT INTO IS ISNULL JOIN LEADING LEFT LIKE LIMIT LOCALTIME LOCALTIMESTAMP NATURAL NOT NOTNULL NULL ON ONLY OPEN OR ORDER OUTER OVER OVERLAPS PLACING PRIMARY REFERENCES RETURNING RIGHT SELECT SESSION_USER SIMILAR SOME SYMMETRIC TABLE THEN TO TRAILING TRUE UNION UNIQUE USER USING VARIADIC VERBOSE WHEN WHERE WINDOW WITH ); my @beautify_pg_keywords = qw( ANALYSE ANALYZE CONCURRENTLY FREEZE ILIKE ISNULL LIKE NOTNULL PLACING RETURNING VARIADIC ); # Highlight variables my @KEYWORDS1 = qw( ALTER ADD AUTO_INCREMENT BETWEEN BY BOOLEAN BEGIN CHANGE COLUMNS COMMIT COALESCE CLUSTER COPY DATABASES DATABASE DATA DELAYED DESCRIBE DELETE DROP ENCLOSED ESCAPED EXISTS EXPLAIN FIELDS FIELD FLUSH FUNCTION GREATEST IGNORE INDEX INFILE INSERT IDENTIFIED IF INHERIT KEYS KILL KEY LINES LOAD LOCAL LOCK LOW_PRIORITY LANGUAGE LEAST LOGIN MODIFY NULLIF NOSUPERUSER NOCREATEDB NOCREATEROLE OPTIMIZE OPTION OPTIONALLY OUTFILE OWNER PROCEDURE PROCEDURAL READ REGEXP RENAME RETURN REVOKE RLIKE ROLE ROLLBACK SHOW SONAME STATUS STRAIGHT_JOIN SET SEQUENCE TABLES TEMINATED TRUNCATE TEMPORARY TRIGGER TRUSTED UN$filenumLOCK USE UPDATE UNSIGNED VALUES VARIABLES VIEW VACUUM WRITE ZEROFILL XOR ABORT ABSOLUTE ACCESS ACTION ADMIN AFTER AGGREGATE ALSO ALWAYS ASSERTION ASSIGNMENT AT ATTRIBUTE BACKWARD BEFORE BIGINT CACHE CALLED CASCADE CASCADED CATALOG CHAIN CHARACTER CHARACTERISTICS CHECKPOINT CLOSE COMMENT COMMENTS COMMITTED CONFIGURATION CONNECTION CONSTRAINTS CONTENT CONTINUE CONVERSION COST CSV CURRENT CURSOR CYCLE DAY DEALLOCATE DEC DECIMAL DECLARE DEFAULTS DEFERRED DEFINER DELIMITER DELIMITERS DICTIONARY DISABLE DISCARD DOCUMENT DOMAIN DOUBLE EACH ENABLE ENCODING ENCRYPTED ENUM ESCAPE EXCLUDE EXCLUDING EXCLUSIVE EXECUTE EXTENSION EXTERNAL FIRST FLOAT FOLLOWING FORCE FORWARD FUNCTIONS GLOBAL GRANTED HANDLER HEADER HOLD HOUR IDENTITY IMMEDIATE IMMUTABLE IMPLICIT INCLUDING INCREMENT INDEXES INHERITS INLINE INOUT INPUT INSENSITIVE INSTEAD INT INTEGER INVOKER ISOLATION LABEL LARGE LAST LC_COLLATE LC_CTYPE LEAKPROOF LEVEL LISTEN LOCATION LOOP MAPPING MATCH MAXVALUE MINUTE MINVALUE MODE MONTH MOVE NAMES NATIONAL NCHAR NEXT NO NONE NOTHING NOTIFY NOWAIT NULLS OBJECT OF OFF OIDS OPERATOR OPTIONS OUT OWNED PARSER PARTIAL PARTITION PASSING PASSWORD PLANS PRECEDING PRECISION PREPARE PREPARED PRESERVE PRIOR PRIVILEGES QUOTE RANGE REAL REASSIGN RECHECK RECURSIVE REF REINDEX RELATIVE RELEASE REPEATABLE REPLICA RESET RESTART RESTRICT RETURNS ROW ROWS RULE SAVEPOINT SCHEMA SCROLL SEARCH SECOND SECURITY SEQUENCES SERIALIZABLE SERVER SESSION SETOF SHARE SIMPLE SMALLINT SNAPSHOT STABLE STANDALONE START STATEMENT STATISTICS STORAGE STRICT SYSID SYSTEM TABLESPACE TEMP TEMPLATE TRANSACTION TREAT TYPE TYPES UNBOUNDED UNCOMMITTED UNENCRYPTED UNKNOWN UNLISTEN UNLOGGED UNTIL VALID VALIDATE VALIDATOR VALUE VARYING VOLATILE WHITESPACE WITHOUT WORK WRAPPER XMLATTRIBUTES XMLCONCAT XMLELEMENT XMLEXISTS XMLFOREST XMLPARSE XMLPI XMLROOT XMLSERIALIZE YEAR YES ZONE ); foreach my $k (@pg_keywords) { push(@KEYWORDS1, $k) if (!grep(/^$k$/i, @KEYWORDS1)); } my @KEYWORDS2 = ( 'ascii', 'age', 'bit_length', 'btrim', 'char_length', 'character_length', 'convert', 'chr', 'current_date', 'current_time', 'current_timestamp', 'count', 'decode', 'date_part', 'date_trunc', 'encode', 'extract', 'get_byte', 'get_bit', 'initcap', 'isfinite', 'interval', 'justify_hours', 'justify_days', 'lower', 'length', 'lpad', 'ltrim', 'localtime', 'localtimestamp', 'md5', 'now', 'octet_length', 'overlay', 'position', 'pg_client_encoding', 'quote_ident', 'quote_literal', 'repeat', 'replace', 'rpad', 'rtrim', 'substring', 'split_part', 'strpos', 'substr', 'set_byte', 'set_bit', 'trim', 'to_ascii', 'to_hex', 'translate', 'to_char', 'to_date', 'to_timestamp', 'to_number', 'timeofday', 'upper', ); my @KEYWORDS3 = ('STDIN', 'STDOUT'); my %SYMBOLS = ( '=' => '=', '<' => '<', '>' => '>', '\|' => '|', ',' => ',', '\.' => '.', '\+' => '+', '\-' => '-', '\*' => '*', '\/' => '/', '!=' => '!=' ); my @BRACKETS = ('(', ')'); map {$_ = quotemeta($_)} @BRACKETS; # Inbounds of query times histogram my @histogram_query_time = (0, 1, 5, 10, 25, 50, 100, 500, 1000, 10000); # Inbounds of session times histogram my @histogram_session_time = (0, 500, 1000, 30000, 60000, 600000, 1800000, 3600000, 28800000); # Get inbounds of query times histogram sub get_hist_inbound { my ($duration, @histogram) = @_; for (my $i = 0; $i <= $#histogram; $i++) { return $histogram[$i-1] if ($histogram[$i] > $duration); } return -1; } # Where statistics are stored my %overall_stat = (); my %overall_checkpoint = (); my @top_slowest = (); my %normalyzed_info = (); my %error_info = (); my %logs_type = (); my %per_minute_info = (); my %lock_info = (); my %tempfile_info = (); my %cancelled_info = (); my %connection_info = (); my %database_info = (); my %application_info = (); my %user_info = (); my %host_info = (); my %session_info = (); my %conn_received = (); my %checkpoint_info = (); my %autovacuum_info = (); my %autoanalyze_info = (); my @graph_values = (); my %cur_info = (); my %cur_temp_info = (); my %cur_plan_info = (); my %cur_cancel_info = (); my %cur_lock_info = (); my $nlines = 0; my %last_line = (); our %saved_last_line = (); my %tsung_session = (); my @top_locked_info = (); my @top_tempfile_info = (); my @top_cancelled_info = (); my %drawn_graphs = (); my $t0 = Benchmark->new; # Write resources files from __DATA__ section if they have not been already copied # and return the HTML links to that files. If --extra-file is not used returns the # CSS and JS code to be embeded in HTML files my @jscode = &write_resources(); # Automatically set parameters with incremental mode if ($incremental) { # In incremental mode an output directory must be set if (!$outdir) { die "FATAL: you must specify an output directory with incremental mode, see -O or --outdir.\n" } # Ensure this is not a relative path if (dirname($outdir) eq '.') { die "FATAL: output directory ($outdir) is not an absolute path.\n"; } # Ensure that the directory already exists if (!-d $outdir) { die "FATAL: output directory $outdir does not exists\n"; } # Set default last parsed file in incremental mode if (!$last_parsed) { $last_parsed = $outdir . '/LAST_PARSED'; } $outfile = 'index.html'; # Set default output format $extension = 'binary'; } else { # Extra files for resources are not allowed without incremental mode $extra_files = 0; } # Reading last line parsed if ($last_parsed && -e $last_parsed) { if (open(IN, "$last_parsed")) { my $line = ; close(IN); ($saved_last_line{datetime}, $saved_last_line{current_pos}, $saved_last_line{orig}) = split(/\t/, $line, 3); # Preserve backward compatibility with version < 5 if ($saved_last_line{current_pos} =~ /\D/) { $saved_last_line{orig} = $saved_last_line{current_pos} . "\t" . $saved_last_line{orig}; $saved_last_line{current_pos} = 0; } if ( ($format eq 'binary') || ($format eq 'csv') ) { $saved_last_line{current_pos} = 0; } } else { die "FATAL: can't read last parsed line from $last_parsed, $!\n"; } } $tmp_last_parsed = 'tmp_' . basename($last_parsed) if ($last_parsed); $tmp_last_parsed = "$TMP_DIR/$tmp_last_parsed"; # Clean the incremental directory if the feature is not disabled if (!$noclean && $saved_last_line{datetime} && $outdir) { # Search the current week following the last parse date $saved_last_line{datetime} =~ /^(\d+)\-(\d+)\-(\d+) /; my $last_year = $1; my $last_month = $2; my $last_day = $3; # Get the week number following the date my $wn = &get_week_number($last_year, $last_month, $last_day); # Get the days of the current week where binary files must be preserved my @wdays = &get_wdays_per_month($wn - 1, "$last_year-$last_month"); # Find obsolete dir days that shoud be cleaned unless(opendir(DIR, "$outdir")) { die "Error: can't opendir $outdir: $!"; } my @dyears = grep { $_ =~ /^\d+$/ } readdir(DIR); closedir DIR; my @obsolete_days = (); foreach my $y (sort { $a <=> $b } @dyears) { unless(opendir(DIR, "$outdir/$y")) { die "Error: can't opendir $outdir/$y: $!"; } my @dmonths = grep { $_ =~ /^\d+$/ } readdir(DIR); closedir DIR; foreach my $m (sort { $a <=> $b } @dmonths) { unless(opendir(DIR, "$outdir/$y/$m")) { die "Error: can't opendir $outdir/$y/$m: $!"; } my @ddays = grep { $_ =~ /^\d+$/ } readdir(DIR); closedir DIR; foreach my $d (sort { $a <=> $b } @ddays) { if ("$y-$m-$d" lt $wdays[0]) { push(@obsolete_days, "$outdir/$y/$m/$d"); } } } } foreach my $p (@obsolete_days) { unless(opendir(DIR, "$p")) { die "Error: can't opendir $p: $!"; } my @hfiles = grep { $_ =~ /\.(html|txt|tsung|json)$/i } readdir(DIR); next if ($#hfiles == -1); # do not remove files if report file has not been generated seekdir(DIR, 0); my @bfiles = grep { $_ =~ /\.bin$/i } readdir(DIR); closedir DIR; foreach my $f (@bfiles) { &logmsg('DEBUG', "Removing obsolete binary file: $p/$f"); unlink("$p/$f"); } } } # Clear storage when a retention is specified in incremental mode if ( $saved_last_line{datetime} && $outdir && $retention) { # Search the current week following the last parse date $saved_last_line{datetime} =~ /^(\d+)\-(\d+)\-(\d+) /; my $last_year = $1; my $last_month = $2; my $last_day = $3; # Get the current week number my $wn = &get_week_number($last_year, $last_month, $last_day); my $limit = $last_year; if (($wn - $retention) < 1) { $limit--; $limit .= "52"; } else { $limit .= sprintf("%02d", $wn - $retention); } # Find obsolete weeks dir that shoud be cleaned unless(opendir(DIR, "$outdir")) { die "Error: can't opendir $outdir: $!"; } my @dyears = grep { $_ =~ /^\d+$/ } readdir(DIR); closedir DIR; my @obsolete_weeks = (); foreach my $y (sort { $a <=> $b } @dyears) { unless(opendir(DIR, "$outdir/$y")) { die "Error: can't opendir $outdir/$y: $!"; } my @weeks = grep { $_ =~ /^week-\d+$/ } readdir(DIR); closedir DIR; foreach my $w (sort { $a <=> $b } @weeks) { $w =~ /^week-(\d+)$/; if ("$y$1" lt $limit) { &logmsg('DEBUG', "Removing obsolete week directory $outdir/$y/week-$1"); &cleanup_directory("$outdir/$y/week-$1", 1); push(@obsolete_weeks, "$y$1"); } } } # Now removed the corresponding days foreach my $y (sort { $a <=> $b } @dyears) { unless(opendir(DIR, "$outdir/$y")) { die "Error: can't opendir $outdir/$y: $!"; } my @dmonths = grep { $_ =~ /^\d+$/ } readdir(DIR); closedir DIR; my @rmmonths = (); foreach my $m (sort { $a <=> $b } @dmonths) { unless(opendir(DIR, "$outdir/$y/$m")) { die "Error: can't opendir $outdir/$y/$m: $!"; } my @rmdays = (); my @ddays = grep { $_ =~ /^\d+$/ } readdir(DIR); closedir DIR; foreach my $d (sort { $a <=> $b } @ddays) { my $weekNumber = sprintf("%02d", POSIX::strftime("%U", 1, 1, 1, $d, $m - 1, $y - 1900)+1); if (grep(/^$y$weekNumber$/, @obsolete_weeks)) { &logmsg('DEBUG', "Removing obsolete directory $outdir/$y/$m/$d"); &cleanup_directory("$outdir/$y/$m/$d", 1); push(@rmdays, $d); } } if ($#ddays == $#rmdays) { &logmsg('DEBUG', "Removing obsolete empty directory $outdir/$y/$m"); rmdir("$outdir/$y/$m"); push(@rmmonths, $m); } } if ($#dmonths == $#rmmonths) { &logmsg('DEBUG', "Removing obsolete empty directory $outdir/$y"); rmdir("$outdir/$y"); } } } # Main loop reading log files my $global_totalsize = 0; my @given_log_files = ( @log_files ); chomp(@given_log_files); # Verify that the file has not changed for incremental move if (!$remote_host) { if ($saved_last_line{current_pos} > 0) { my @tmpfilelist = (); # Removed files that have already been parsed during previous runs foreach my $f (@given_log_files) { if ($f eq '-') { &logmsg('DEBUG', "waiting for log entries from stdin."); $saved_last_line{current_pos} = 0; push(@tmpfilelist, $f); } elsif (!&check_file_changed($f, $saved_last_line{datetime})) { &logmsg('DEBUG', "this file has already been parsed: $f"); } else { push(@tmpfilelist, $f); } } @given_log_files = (); push(@given_log_files, @tmpfilelist); } } else { # Disable multi process when using ssh to parse remote log $queue_size = 1; } # log files must be erased when loading stats from binary format if ($format eq 'binary') { $queue_size = 1; $job_per_file = 1; } my $pipe; # Seeking to an old log position is not possible outside incremental mode $saved_last_line{current_pos} = 0 if (!$last_parsed); # Start parsing all given files using multiprocess if ( ($#given_log_files >= 0) && (($queue_size > 1) || ($job_per_file > 1)) ) { # Number of running process my $child_count = 0; # Set max number of parallel process my $parallel_process = $queue_size; if ($job_per_file > 1) { $parallel_process = $job_per_file; } # Store total size of the log files foreach my $logfile ( @given_log_files ) { $global_totalsize += &get_log_file($logfile); } # Open a pipe for interprocess communication my $reader = new IO::Handle; my $writer = new IO::Handle; $pipe = IO::Pipe->new($reader, $writer); $writer->autoflush(1); # Fork the logger process if ($progress) { spawn sub { &multiprocess_progressbar($global_totalsize); }; } # Parse each log file following the multiprocess mode chosen (-j or -J) foreach my $logfile ( @given_log_files ) { while ($child_count >= $parallel_process) { my $kid = waitpid(-1, WNOHANG); if ($kid > 0) { $child_count--; delete $RUNNING_PIDS{$kid}; } sleep(1); } # Do not use split method with compressed files if ( ($queue_size > 1) && ($logfile !~ /\.(gz|bz2|zip|xz)$/i) ) { # Create multiple processes to parse one log file by chunks of data my @chunks = &split_logfile($logfile); &logmsg('DEBUG', "The following boundaries will be used to parse file $logfile, " . join('|', @chunks)); for (my $i = 0; $i < $#chunks; $i++) { while ($child_count >= $parallel_process) { my $kid = waitpid(-1, WNOHANG); if ($kid > 0) { $child_count--; delete $RUNNING_PIDS{$kid}; } sleep(1); } die "FATAL: Abort signal received when processing to next chunk\n" if ($interrupt == 2); last if ($interrupt); push(@tempfiles, [ tempfile('tmp_pgbadgerXXXX', SUFFIX => '.bin', DIR => $TMP_DIR, UNLINK => 1 ) ]); spawn sub { &process_file($logfile, $tempfiles[-1]->[0], $chunks[$i], $chunks[$i+1], $i); }; $child_count++; } } else { # Start parsing one file per parallel process push(@tempfiles, [ tempfile('tmp_pgbadgerXXXX', SUFFIX => '.bin', DIR => $TMP_DIR, UNLINK => 1 ) ]); spawn sub { &process_file($logfile, $tempfiles[-1]->[0]); }; $child_count++; } die "FATAL: Abort signal received when processing next file\n" if ($interrupt == 2); last if ($interrupt); } my $minproc = 1; $minproc = 0 if (!$progress); # Wait for all child processes to die except for the logger while (scalar keys %RUNNING_PIDS > $minproc) { my $kid = waitpid(-1, WNOHANG); if ($kid > 0) { delete $RUNNING_PIDS{$kid}; } sleep(1); } # Terminate the process logger foreach my $k (keys %RUNNING_PIDS) { kill(10, $k); %RUNNING_PIDS = (); } # Clear previous statistics &init_stats_vars(); # Load all data gathered by all the different processes foreach my $f (@tempfiles) { next if (!-e "$f->[1]" || -z "$f->[1]"); my $fht = new IO::File; $fht->open("< $f->[1]") or die "FATAL: can't open temp file $f->[1], $!\n"; &load_stats($fht); $fht->close(); } } else { # Multiprocessing disabled, parse log files one by one foreach my $logfile ( @given_log_files ) { last if (&process_file($logfile, '', $saved_last_line{current_pos})); } } # Get last line parsed from all process if ($last_parsed) { if (open(IN, "$tmp_last_parsed") ) { while (my $line = ) { chomp($line); my ($d, $p, $l) = split(/\t/, $line, 3); if (!$last_line{datetime} || ($d gt $last_line{datetime})) { $last_line{datetime} = $d; if ($p =~ /^\d+$/) { $last_line{orig} = $l; $last_line{current_pos} = $p; } else { $last_line{orig} = $p . "\t" . $l; } } } close(IN); } unlink("$tmp_last_parsed"); } # Save last line parsed if ($last_parsed && $last_line{datetime} && $last_line{orig}) { if (open(OUT, ">$last_parsed")) { $last_line{current_pos} ||= 0; print OUT "$last_line{datetime}\t$last_line{current_pos}\t$last_line{orig}\n"; close(OUT); } else { &logmsg('ERROR', "can't save last parsed line into $last_parsed, $!"); } } exit 2 if ($terminate); my $t1 = Benchmark->new; my $td = timediff($t1, $t0); &logmsg('DEBUG', "the log statistics gathering took:" . timestr($td)); # Global output filehandle my $fh = undef; if (!$incremental && ($#given_log_files >= 0) ) { &logmsg('LOG', "Ok, generating $extension report..."); if ($extension ne 'tsung') { $fh = new IO::File ">$outfile"; if (not defined $fh) { die "FATAL: can't write to $outfile, $!\n"; } if (($extension eq 'text') || ($extension eq 'txt')) { if ($error_only) { &dump_error_as_text(); } else { &dump_as_text(); } } elsif ($extension eq 'json') { if ($error_only) { &dump_error_as_json(); } else { &dump_as_json(); } } elsif ($extension eq 'binary') { &dump_as_binary($fh); } else { # Create instance to prettify SQL query if (!$noprettify) { $sql_prettified = SQL::Beautify->new(keywords => \@beautify_pg_keywords); } &dump_as_html('.'); } $fh->close; } else { # Open filehandle $fh = new IO::File ">>$outfile"; if (not defined $fh) { die "FATAL: can't write to $outfile, $!\n"; } print $fh "\n\n"; $fh->close(); } } elsif (!$incremental || !$noreport) { # Build a report per day my %weeks_directories = (); my @build_directories = (); if (open(IN, "$last_parsed.tmp")) { while (my $l = ) { chomp($l); push(@build_directories, $l) if (!grep(/^$l$/, @build_directories)); } close(IN); unlink("$last_parsed.tmp"); } else { &logmsg('WARNING', "can't read file $last_parsed.tmp, $!"); &logmsg('HINT', "maybe there's no new entries in your log since last run."); } foreach $incr_date (sort @build_directories) { $last_incr_date = $incr_date; # Set the path to binary files my $bpath = $incr_date; $bpath =~ s/\-/\//g; $incr_date =~ /^(\d+)-(\d+)\-(\d+)$/; # Get the week number following the date my $wn = &get_week_number($1, $2, $3); $weeks_directories{$wn} = "$1-$2" if (!exists $weeks_directories{$wn}); # First clear previous stored statistics &init_stats_vars(); # Load all data gathered by all the different processes unless(opendir(DIR, "$outdir/$bpath")) { die "Error: can't opendir $outdir/$bpath: $!"; } my @mfiles = grep { !/^\./ && ($_ =~ /\.bin$/) } readdir(DIR); closedir DIR; foreach my $f (@mfiles) { my $fht = new IO::File; $fht->open("< $outdir/$bpath/$f") or die "FATAL: can't open file $outdir/$bpath/$f, $!\n"; &load_stats($fht); $fht->close(); } &logmsg('LOG', "Ok, generating HTML daily report into $outdir/$bpath/..."); $fh = new IO::File ">$outdir/$bpath/$outfile"; if (not defined $fh) { die "FATAL: can't write to $outdir/$bpath/$outfile, $!\n"; } # Create instance to prettify SQL query if (!$noprettify) { $sql_prettified = SQL::Beautify->new(keywords => \@beautify_pg_keywords); } &dump_as_html('../../..'); $fh->close; } # Build a report per week foreach my $wn (sort { $a <=> $b } keys %weeks_directories) { &init_stats_vars(); # Get all days of the current week my @wdays = &get_wdays_per_month($wn - 1, $weeks_directories{$wn}); my $wdir = ''; # Load data per day foreach $incr_date (@wdays) { my $bpath = $incr_date; $bpath =~ s/\-/\//g; $incr_date =~ /^(\d+)\-(\d+)\-(\d+)$/; $wdir = "$1/week-$wn"; # Load all data gathered by all the differents processes if (-e "$outdir/$bpath") { unless(opendir(DIR, "$outdir/$bpath")) { die "Error: can't opendir $outdir/$bpath: $!"; } my @mfiles = grep { !/^\./ && ($_ =~ /\.bin$/) } readdir(DIR); closedir DIR; foreach my $f (@mfiles) { my $fht = new IO::File; $fht->open("< $outdir/$bpath/$f") or die "FATAL: can't open file $outdir/$bpath/$f, $!\n"; &load_stats($fht); $fht->close(); } } } &logmsg('LOG', "Ok, generating HTML weekly report into $outdir/$wdir/..."); if (!-d "$outdir/$wdir") { mkdir("$outdir/$wdir"); } $fh = new IO::File ">$outdir/$wdir/$outfile"; if (not defined $fh) { die "FATAL: can't write to $outdir/$wdir/$outfile, $!\n"; } # Create instance to prettify SQL query if (!$noprettify) { $sql_prettified = SQL::Beautify->new(keywords => \@beautify_pg_keywords); } &dump_as_html('../..'); $fh->close; } &logmsg('LOG', "Ok, generating global index to access incremental reports..."); $fh = new IO::File ">$outdir/index.html"; if (not defined $fh) { die "FATAL: can't write to $outdir/index.html, $!\n"; } my $date = localtime(time); my @tmpjscode = @jscode; map { s/EDIT_URI/\./; } @tmpjscode; my $local_title = 'Global Index on incremental reports'; if ($report_title) { $local_title = 'Global Index - ' . $report_title; } print $fh qq{ pgBadger :: $local_title @tmpjscode


}; # get year directories unless(opendir(DIR, "$outdir")) { die "Error: can't opendir $outdir: $!"; } my @dyears = grep { !/^\./ && /^\d{4}$/ } readdir(DIR); closedir DIR; foreach my $y (sort { $b <=> $a } @dyears) { print $fh qq{

Year $y

}; # foreach year directory look for week directories unless(opendir(DIR, "$outdir/$y")) { die "Error: can't opendir $outdir/$y: $!"; } my @ymonths = grep { /^\d{2}$/ } readdir(DIR); closedir DIR; my $i = 1; foreach my $m (sort {$a <=> $b } @ymonths) { print $fh "\n"; print $fh "\n\n" if ( ($i%4) == 0 ); $i++; } print $fh qq{
", &get_calendar($y, $m), "
}; } print $fh qq{
}; $fh->close; } my $t2 = Benchmark->new; $td = timediff($t2, $t1); &logmsg('DEBUG', "building reports took: " . timestr($td)); $td = timediff($t2, $t0); &logmsg('DEBUG', "the total execution time took: " . timestr($td)); exit 0; #------------------------------------------------------------------------------- # Show pgBadger command line usage sub usage { print qq{ Usage: pgbadger [options] logfile [...] PostgreSQL log analyzer with fully detailed reports and graphs. Arguments: logfile can be a single log file, a list of files, or a shell command returning a list of files. If you want to pass log content from stdin use - as filename. Note that input from stdin will not work with csvlog. Options: -a | --average minutes : number of minutes to build the average graphs of queries and connections. Default 5 minutes. -A | --histo-avg minutes: number of minutes to build the histogram graphs of queries. Default 60 minutes. -b | --begin datetime : start date/time for the data to be parsed in log. -B | --bar-graph : use bar graph instead of line by default. -c | --dbclient host : only report on entries for the given client host. -C | --nocomment : remove comments like /* ... */ from queries. -d | --dbname database : only report on entries for the given database. -D | --dns-resolv : client ip adresses are replaced by their DNS name. Be warned that this can really slow down pgBadger. -e | --end datetime : end date/time for the data to be parsed in log. -f | --format logtype : possible values: syslog, syslog2, stderr and csv. Default: stderr. -G | --nograph : disable graphs on HTML output. Enabled by default. -h | --help : show this message and exit. -i | --ident name : programname used as syslog ident. Default: postgres -I | --incremental : use incremental mode, reports will be generated by days in a separate directory, --outdir must be set. -j | --jobs number : number of jobs to run at same time. Default is 1, run as single process. -J | --Jobs number : number of log file to parse in parallel. Default is 1, run as single process. -l | --last-parsed file: allow incremental log parsing by registering the last datetime and line parsed. Useful if you want to watch errors since last run or if you want one report per day with a log rotated each week. -L | logfile-list file : file containing a list of log file to parse. -m | --maxlength size : maximum length of a query, it will be restricted to the given size. Default: no truncate -M | --no-multiline : do not collect multiline statement to avoid garbage especially on errors that generate a huge report. -n | --nohighlight : disable SQL code highlighting. -N | --appname name : only report on entries for given application name -o | --outfile filename: define the filename for the output. Default depends on the output format: out.html, out.txt, out.bin, out.json or out.tsung. With module JSON::XS installed, you can output file in JSON format either. To dump output to stdout use - as filename. -O | --outdir path : directory where out file must be saved. -p | --prefix string : the value of your custom log_line_prefix as defined in your postgresql.conf. Only use it if you aren't using one of the standard prefixes specified in the pgBadger documentation, such as if your prefix includes additional variables like client ip or application name. See examples below. -P | --no-prettify : disable SQL queries prettify formatter. -q | --quiet : don't print anything to stdout, not even a progress bar. -r | --remote-host ip : set the host where to execute the cat command on remote logfile to parse localy the file. -R | --retention N : number of week to keep in incremental mode. Default to 0, disabled. Used to set the number of weel to keep in output directory. Older weeks and days directory are automatically removed. -s | --sample number : number of query samples to store. Default: 3. -S | --select-only : only report SELECT queries. -t | --top number : number of queries to store/display. Default: 20. -T | --title string : change title of the HTML page report. -u | --dbuser username : only report on entries for the given user. -U | --exclude-user username : exclude entries for the specified user from report. -v | --verbose : enable verbose or debug mode. Disabled by default. -V | --version : show pgBadger version and exit. -w | --watch-mode : only report errors just like logwatch could do. -x | --extension : output format. Values: text, html, bin, json or tsung. Default: html -X | --extra-files : in incremetal mode allow pgbadger to write CSS and JS files in the output directory as separate files. -z | --zcat exec_path : set the full path to the zcat program. Use it if zcat or bzcat or unzip is not in your path. --pie-limit num : pie data lower than num% will show a sum instead. --exclude-query regex : any query matching the given regex will be excluded from the report. For example: "^(VACUUM|COMMIT)" You can use this option multiple times. --exclude-file filename: path of the file which contains all the regex to use to exclude queries from the report. One regex per line. --include-query regex : any query that does not match the given regex will be excluded from the report. You can use this option multiple times. For example: "(tbl1|tbl2)". --include-file filename: path of the file which contains all the regex of the queries to include from the report. One regex per line. --disable-error : do not generate error report. --disable-hourly : do not generate hourly report. --disable-type : do not generate report of queries by type, database or user. --disable-query : do not generate query reports (slowest, most frequent, queries by users, by database, ...). --disable-session : do not generate session report. --disable-connection : do not generate connection report. --disable-lock : do not generate lock report. --disable-temporary : do not generate temporary report. --disable-checkpoint : do not generate checkpoint/restartpoint report. --disable-autovacuum : do not generate autovacuum report. --charset : used to set the HTML charset to be used. Default: utf-8. --csv-separator : used to set the CSV field separator, default: , --exclude-time regex : any timestamp matching the given regex will be excluded from the report. Example: "2013-04-12 .*" You can use this option multiple times. --exclude-appname name : exclude entries for the specified application name from report. Example: "pg_dump". --exclude-line regex : pgbadger will start to exclude any log entry that will match the given regex. Can be used multiple time. --anonymize : obscure all literals in queries, useful to hide confidential data. --noreport : prevent pgbadger to create reports in incremental mode. --log-duration : force pgbadger to associate log entries generated by both log_duration = on and log_statement = 'all' --enable-checksum : used to add a md5 sum under each query report. pgBadger is able to parse a remote log file using a passwordless ssh connection. Use the -r or --remote-host to set the host ip address or hostname. There's also some additional options to fully control the ssh connection. --ssh-program ssh path to the ssh program to use. Default: ssh. --ssh-user username connection login name. Default to running user. --ssh-identity file path to the identity file to use. --ssh-timeout second timeout to ssh connection failure. Default 10 secs. --ssh-options options list of -o options to use for the ssh connection. Options always used: -o ConnectTimeout=\$ssh_timeout -o PreferredAuthentications=hostbased,publickey Examples: pgbadger /var/log/postgresql.log pgbadger /var/log/postgres.log.2.gz /var/log/postgres.log.1.gz \ /var/log/postgres.log pgbadger /var/log/postgresql/postgresql-2012-05-* pgbadger --exclude-query="^(COPY|COMMIT)" /var/log/postgresql.log pgbadger -b "2012-06-25 10:56:11" -e "2012-06-25 10:59:11" \ /var/log/postgresql.log cat /var/log/postgres.log | pgbadger - # Log prefix with stderr log output perl pgbadger --prefix '%t [%p]: [%l-1] user=%u,db=%d,client=%h' \ /pglog/postgresql-2012-08-21* perl pgbadger --prefix '%m %u@%d %p %r %a : ' /pglog/postgresql.log # Log line prefix with syslog log output perl pgbadger --prefix 'user=%u,db=%d,client=%h,appname=%a' \ /pglog/postgresql-2012-08-21* # Use my 8 CPUs to parse my 10GB file faster, much faster perl pgbadger -j 8 /pglog/postgresql-9.1-main.log Generate Tsung sessions XML file with select queries only: perl pgbadger -S -o sessions.tsung --prefix '%t [%p]: [%l-1] user=%u,db=%d ' /pglog/postgresql-9.1.log Reporting errors every week by cron job: 30 23 * * 1 /usr/bin/pgbadger -q -w /var/log/postgresql.log -o /var/reports/pg_errors.html Generate report every week using incremental behavior: 0 4 * * 1 /usr/bin/pgbadger -q `find /var/log/ -mtime -7 -name "postgresql.log*"` \ -o /var/reports/pg_errors-`date +%F`.html -l /var/reports/pgbadger_incremental_file.dat This supposes that your log file and HTML report are also rotated every week. Or better, use the auto-generated incremental reports: 0 4 * * * /usr/bin/pgbadger -I -q /var/log/postgresql/postgresql.log.1 \ -O /var/www/pg_reports/ will generate a report per day and per week. In incremental mode, you can also specify the number of week to keep in the reports: /usr/bin/pgbadger --retention 2 -I -q /var/log/postgresql/postgresql.log.1 \ -O /var/www/pg_reports/ If you have a pg_dump at 23:00 and 13:00 each day during half an hour, you can use pgbadger as follow to exclude these period from the report: pgbadger --exclude-time "2013-09-.* (23|13):.*" postgresql.log This will help avoid having COPY statements, as generated by pg_dump, on top of the list of slowest queries. You can also use --exclude-appname "pg_dump" to solve this problem in a simpler way. }; exit 0; } sub cleanup_directory { my ($dir, $remove_dir) = @_; unless(opendir(DIR, "$dir")) { die "Error: can't opendir $dir: $!"; } my @todel = grep { !/^\./ } readdir(DIR); closedir DIR; map { unlink("$dir/$_"); } @todel; rmdir("$dir") if ($remove_dir); } sub write_resources { # Write resource file to report directory or return resources in and array of lines my $rscfh; my @contents = (); my $endfile = ''; my $file = ''; while (my $l = ) { if ($l =~ /^WRFILE: ([^\s]+)/) { $file = $1; if (!$extra_files) { if ($#contents > 0) { push(@contents, $endfile); } if ($file =~ /\.css$/i) { push(@contents, ""; } elsif ($file =~ /\.js$/i) { push(@contents, ""; } next; } $rscfh->close() if (defined $rscfh); if ($file =~ /\.css$/i) { push(@contents, "\n"); } elsif ($file =~ /\.js$/i) { push(@contents, "\n"); } if (!-e "$outdir/$file") { $rscfh = new IO::File ">$outdir/$file"; die "FATAL: can't write file $outdir/$file\n" if (not defined $rscfh); } next; } if (!$extra_files) { push(@contents, $l); } else { $rscfh->print($l) if (defined $rscfh); } } $rscfh->close() if (defined $rscfh); # Return __DATA__ content if --extra-files is not used # or HTML links to resources files if (!$extra_files) { push(@contents, $endfile); } return @contents; } sub sort_by_week { my $curr = shift; my $next = shift; $a =~ /week\-(\d+)/; $curr = $1; $b =~ /week\-(\d+)/; $next = $1; return $next <=> $curr; } sub init_stats_vars { # Empty where statistics are stored %overall_stat = (); %overall_checkpoint = (); @top_slowest = (); @top_tempfile_info = (); @top_cancelled_info = (); @top_locked_info = (); %normalyzed_info = (); %error_info = (); %logs_type = (); %per_minute_info = (); %lock_info = (); %tempfile_info = (); %cancelled_info = (); %connection_info = (); %database_info = (); %application_info = (); %session_info = (); %conn_received = (); %checkpoint_info = (); %autovacuum_info = (); %autoanalyze_info = (); @graph_values = (); %cur_info = (); $nlines = 0; %tsung_session = (); } #### # Main function called per each parser process #### sub multiprocess_progressbar { my $totalsize = shift; &logmsg('DEBUG', "Starting progressbar writer process"); $0 = 'pgbadger logger'; # Terminate the process when we haven't read the complete file but must exit local $SIG{USR1} = sub { print STDERR "\n"; exit 1; }; my $timeout = 3; my $cursize = 0; my $nqueries = 0; my $nerrors = 0; my $last = 0; $pipe->reader(); while (my $r = <$pipe>) { chomp($r); my @infos = split(/\s+/, $r); last if ($infos[0] eq 'QUIT'); $cursize += $infos[0]; $nqueries += $infos[1]; $nerrors += $infos[2]; $cursize = $totalsize if ($cursize > $totalsize); print STDERR &progress_bar($cursize, $totalsize, 25, '=', $nqueries, $nerrors); } print STDERR "\n"; exit 0; } #### # Main function called per each parser process #### sub process_file { my ($logfile, $tmpoutfile, $start_offset, $stop_offset, $chunk_pos) = @_; my $old_queries_count = 0; my $old_errors_count = 0; my $getout = 0; $start_offset ||= 0; $0 = 'pgbadger parser'; &init_stats_vars() if ($tmpoutfile); if (!$remote_host) { &logmsg('DEBUG', "Starting to parse log file: $logfile"); } else { &logmsg('DEBUG', "Starting to parse remote log file: $remote_host:$logfile"); } local $SIG{INT} = sub { print STDERR "Received SIGINT abort parsing...\n"; $terminate = 1; }; local $SIG{TERM} = sub { print STDERR "Received SIGTERM abort parsing...\n"; $terminate = 1 }; my $curdate = localtime(time); $pipe->writer() if (defined $pipe); # Syslog does not have year information, so take care of year overlapping my ($gsec, $gmin, $ghour, $gmday, $gmon, $gyear, $gwday, $gyday, $gisdst) = localtime(time); $gyear += 1900; my $CURRENT_DATE = $gyear . sprintf("%02d", $gmon + 1) . sprintf("%02d", $gmday); my $cursize = 0; # Get file handle and size of the file my ($lfile, $totalsize) = &get_log_file($logfile); # Reset the start position if file is smaller that the current start offset $start_offset = 0 if ($start_offset > $totalsize); # Check if the first date in the log are after the last date saved if (($format ne 'binary') && ($format ne 'csv')) { if ($start_offset && !$chunk_pos) { if (&check_file_changed($logfile, $saved_last_line{datetime}, 1)) { &logmsg('DEBUG', "This file should be parsed from the beginning: $logfile"); &logmsg('DEBUG', "Reverting start offset $start_offset to 0 for file $logfile, stoppping offset is " . ($stop_offset || $totalsize)); $start_offset = 0; } $cursize = $start_offset; } } else { $start_offset = 0; $stop_offset = 0; } if ($stop_offset > 0) { $totalsize = $stop_offset - $start_offset; } my $current_offset = $start_offset || 0; # Forward the progress bar to the starting point in MP mode #$cursize = $start_offset if ($chunk_pos == 0); if (!$remote_host) { &logmsg('DEBUG', "Starting reading file $logfile..."); } else { &logmsg('DEBUG', "Starting reading file $remote_host:$logfile..."); } if ($format eq 'csv') { require Text::CSV_XS; my $csv = Text::CSV_XS->new( { binary => 1, eol => $/, sep_char => $csv_sep_char, allow_loose_quotes => 1, } ); # Parse csvlog lines CSVLOOP: while (!$csv->eof()) { while (my $row = $csv->getline($lfile)) { # We received a signal last CSVLOOP if ($terminate); # Number of columns in csvlog (22 before 9.0 and 23 from 9.0 to current) next if ( ($#{$row} != 22) && ($#{$row} != 21) ); # Set progress statistics $cursize += length(join(',', @$row)); $nlines++; if (!$tmpoutfile) { if ($progress && (($nlines % $NUMPROGRESS) == 0)) { if ($totalsize) { print STDERR &progress_bar($cursize, $totalsize, 25, '='); } else { print STDERR "."; } } } else { if ($progress && (($nlines % $NUMPROGRESS) == 0)) { $pipe->print("$cursize " . ($overall_stat{'queries_number'} - $old_queries_count) . " " . ($overall_stat{'errors_number'} - $old_errors_count) . "\n"); $old_queries_count = $overall_stat{'queries_number'}; $old_errors_count = $overall_stat{'errors_number'}; $cursize = 0; } } next if ($row->[11] !~ $parse_regex); # Extract the date if ($row->[0] =~ m/^(\d+)-(\d+)-(\d+)\s+(\d+):(\d+):(\d+)\.(\d+)/) { # Remove newline characters from queries map { s/[\r\n]+/ /gs; } @$row; my $milli = $7 || 0; ($prefix_vars{'t_year'}, $prefix_vars{'t_month'}, $prefix_vars{'t_day'}, $prefix_vars{'t_hour'}, $prefix_vars{'t_min'}, $prefix_vars{'t_sec'}) = ($1, $2, $3, $4, $5, $6); $prefix_vars{'t_timestamp'} = "$1-$2-$3 $4:$5:$6"; # Skip unwanted lines next if ($from && ($from gt $prefix_vars{'t_timestamp'})); if ($to && ($to lt $prefix_vars{'t_timestamp'})) { if ($tmpoutfile) { $pipe->print("$cursize " . ($overall_stat{'queries_number'} - $old_queries_count) . " " . ($overall_stat{'errors_number'} - $old_errors_count) . "\n"); $old_queries_count = $overall_stat{'queries_number'}; $old_errors_count = $overall_stat{'errors_number'}; $cursize = 0; } $getout = 2; last CSVLOOP; } # Jump to the last line parsed if required next if (!&check_incremental_position($prefix_vars{'t_timestamp'}, join(',', @$row))); # Store the current timestamp of the log line &store_current_timestamp($prefix_vars{'t_timestamp'}); # Set query parameters as global variables $prefix_vars{'t_dbuser'} = $row->[1] || ''; $prefix_vars{'t_dbname'} = $row->[2] || ''; $prefix_vars{'t_appname'} = $row->[22] || ''; $prefix_vars{'t_client'} = $row->[4] || ''; $prefix_vars{'t_client'} =~ s/:.*//; $prefix_vars{'t_client'} = _gethostbyaddr($prefix_vars{'t_client'}) if ($dns_resolv); $prefix_vars{'t_host'} = 'csv'; $prefix_vars{'t_pid'} = $row->[3]; $prefix_vars{'t_session_line'} = $row->[5]; $prefix_vars{'t_session_line'} =~ s/\..*//; $prefix_vars{'t_loglevel'} = $row->[11]; $prefix_vars{'t_query'} = $row->[13]; # Set ERROR additional information $prefix_vars{'t_detail'} = $row->[14]; $prefix_vars{'t_hint'} = $row->[15]; $prefix_vars{'t_context'} = $row->[18]; $prefix_vars{'t_statement'} = $row->[19]; # Check if the log line should be excluded from the report if (&validate_log_line($prefix_vars{'t_pid'})) { # Parse the query now &parse_query(); if (&store_queries($prefix_vars{'t_pid'})) { delete $cur_info{$prefix_vars{'t_pid'}}; } } } } if (!$csv->eof()) { warn "FATAL: cannot use CSV on $logfile, " . $csv->error_diag() . " at line " . ($nlines+1), "\n"; print STDERR "DETAIL: " . $csv->error_input(), "\n" if ($csv->error_input()); print STDERR "reset CSV parser\n"; $csv->SetDiag(0); } } } elsif ($format eq 'binary') { &load_stats($lfile); } else { # Format is not CSV. my $time_pattern = qr/(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})/; my $cur_pid = ''; my @matches = (); my $goon = 0; my $has_exclusion = 0; if ($#exclude_line >= 0) { $has_exclusion = 1; } &logmsg('DEBUG', "Start parsing at offset $start_offset of file $logfile to " . ($stop_offset || $totalsize)); if ($start_offset) { # Move to the starting offset position in file $lfile->seek($start_offset, 0); } while (my $line = <$lfile>) { # We received a signal last if ($terminate); # Start to exclude from parsing any desired lines if ($has_exclusion >= 0) { # Log line matches the excluded regex my $ef = 0; map { $ef = 1, last if ($line =~ /$_/is); } @exclude_line; next if ($ef); } $cursize += length($line); $current_offset += length($line); chomp($line); $line =~ s/\r//; $nlines++; next if (!$line); if (!$tmpoutfile) { if ($progress && (($nlines % $NUMPROGRESS) == 0)) { if ($totalsize) { print STDERR &progress_bar($cursize, $stop_offset || $totalsize, 25, '='); } else { print STDERR "."; } } } else { if ($progress && (($nlines % $NUMPROGRESS) == 0)) { $pipe->print("$cursize " . ($overall_stat{'queries_number'} - $old_queries_count) . " " . ($overall_stat{'errors_number'} - $old_errors_count) . "\n"); $old_queries_count = $overall_stat{'queries_number'}; $old_errors_count = $overall_stat{'errors_number'}; $cursize = 0; } } %prefix_vars = (); # Parse syslog lines if ($format =~ /syslog/) { @matches = ($line =~ $compiled_prefix); if ($#matches >= 0) { for (my $i = 0 ; $i <= $#prefix_params ; $i++) { $prefix_vars{$prefix_params[$i]} = $matches[$i]; } # skip non postgresql lines next if ($prefix_vars{'t_ident'} ne $ident); # Store temporary files and locks information &store_temporary_and_lock_infos($cur_pid); # Standard syslog format does not have year information, months are # three letters and days are not always with 2 digits. if ($prefix_vars{'t_month'} !~ /\d/) { $prefix_vars{'t_year'} = $gyear; $prefix_vars{'t_day'} = sprintf("%02d", $prefix_vars{'t_day'}); $prefix_vars{'t_month'} = $month_abbr{$prefix_vars{'t_month'}}; # Take care of year overlapping if ("$prefix_vars{'t_year'}$prefix_vars{'t_month'}$prefix_vars{'t_day'}" > $CURRENT_DATE) { $prefix_vars{'t_year'} = substr($CURRENT_DATE, 0, 4) - 1; } } $prefix_vars{'t_timestamp'} = "$prefix_vars{'t_year'}-$prefix_vars{'t_month'}-$prefix_vars{'t_day'} $prefix_vars{'t_hour'}:$prefix_vars{'t_min'}:$prefix_vars{'t_sec'}"; # Skip unwanted lines if ($#exclude_time >= 0) { foreach (@exclude_time) { if ($prefix_vars{'t_timestamp'} =~ /$_/) { return; } } } next if ($from && ($from gt $prefix_vars{'t_timestamp'})); if ($to && ($to lt $prefix_vars{'t_timestamp'})) { if (!$tmpoutfile) { if ($totalsize) { print STDERR &progress_bar($cursize, $stop_offset || $totalsize, 25, '='); } else { print STDERR "."; } } else { $pipe->print("$cursize " . ($overall_stat{'queries_number'} - $old_queries_count) . " " . ($overall_stat{'errors_number'} - $old_errors_count) . "\n"); $old_queries_count = $overall_stat{'queries_number'}; $old_errors_count = $overall_stat{'errors_number'}; $cursize = 0; } $getout = 2; last; } # Jump to the last line parsed if required next if (!&check_incremental_position($prefix_vars{'t_timestamp'}, $line)); $cur_pid = $prefix_vars{'t_pid'}; $goon = 1; $prefix_vars{'t_client'} = _gethostbyaddr($prefix_vars{'t_client'}) if ($dns_resolv); # Store the current timestamp of the log line &store_current_timestamp($prefix_vars{'t_timestamp'}); # Extract information from log line prefix if (!$log_line_prefix) { &parse_log_prefix($prefix_vars{'t_logprefix'}); } # Check if the log line should be excluded from the report if (&validate_log_line($prefix_vars{'t_pid'})) { # Process the log line &parse_query(); } } elsif ($goon && ($line =~ $other_syslog_line)) { $cur_pid = $8; my $t_query = $10; $t_query =~ s/#011/\t/g; next if ($t_query eq "\t"); if ($cur_info{$cur_pid}{vacuum} && ($t_query =~ /^\t(pages|tuples|buffer usage|avg read rate|system usage):/)) { if ($t_query =~ /^\t(pages|tuples): (\d+) removed, (\d+) remain/) { $autovacuum_info{tables}{$cur_info{$cur_pid}{vacuum}}{$1}{removed} += $2; } if ($t_query =~ m#^\tsystem usage: CPU .* sec elapsed (.*) sec#) { if ($1 > $autovacuum_info{peak}{system_usage}{elapsed}) { $autovacuum_info{peak}{system_usage}{elapsed} = $1; $autovacuum_info{peak}{system_usage}{table} = $cur_info{$cur_pid}{vacuum}; $autovacuum_info{peak}{system_usage}{date} = "$cur_info{$cur_pid}{year}-$cur_info{$cur_pid}{month}-$cur_info{$cur_pid}{day} " . "$cur_info{$cur_pid}{hour}:$cur_info{$cur_pid}{min}:$cur_info{$cur_pid}{sec}"; } } next; } elsif ( $cur_info{$cur_pid}{parameters} && (($t_query =~ /[,\s]*\$(\d+)\s=\s/) || ($t_query =~ /^('[^']*')$/)) ) { # stores bind parameters if any $cur_info{$cur_pid}{parameters} .= " $t_query"; next; } # Some log line may be written by applications next if ($line =~ /\bLOG: /); if (exists $cur_plan_info{$cur_pid}{duration}) { $cur_plan_info{$cur_pid}{plan} .= "\n" . $t_query; } elsif (exists $cur_temp_info{$cur_pid}{query}) { $cur_temp_info{$cur_pid}{query} .= "\n" . $t_query; } elsif (exists $cur_lock_info{$cur_pid}{query}) { $cur_lock_info{$cur_pid}{query} .= "\n" . $t_query; } elsif (exists $cur_cancel_info{$cur_pid}{query}) { $cur_cancel_info{$cur_pid}{query} .= "\n" . $t_query; } elsif (exists $cur_info{$cur_pid}{statement}) { $cur_info{$cur_pid}{statement} .= "\n" . $t_query if (!$nomultiline); } elsif (exists $cur_info{$cur_pid}{context}) { $cur_info{$cur_pid}{context} .= "\n" . $t_query; } elsif (exists $cur_info{$cur_pid}{detail}) { $cur_info{$cur_pid}{detail} .= "\n" . $t_query; } elsif (exists $cur_info{$cur_pid}{query}) { $cur_info{$cur_pid}{query} .= "\n" . $t_query if (!$nomultiline); } # Collect orphaned lines of multiline queries } elsif ($cur_pid && ($line !~ $orphan_syslog_line)) { # Some log line may be written by applications next if ($line =~ /\bLOG: /); if (exists $cur_plan_info{$cur_pid}{duration}) { $cur_plan_info{$cur_pid}{plan} .= "\n" . $line; } elsif (exists $cur_info{$cur_pid}{parameters}) { # stores bind parameters if any $cur_info{$cur_pid}{parameters} .= "\n" . $line; } elsif (exists $cur_temp_info{$cur_pid}{query}) { $cur_temp_info{$cur_pid}{query} .= "\n" . $line; } elsif (exists $cur_lock_info{$cur_pid}{query}) { $cur_lock_info{$cur_pid}{query} .= "\n" . $line; } elsif (exists $cur_cancel_info{$cur_pid}{query}) { $cur_cancel_info{$cur_pid}{query} .= "\n" . $line; } elsif (exists $cur_info{$cur_pid}{statement}) { $cur_info{$cur_pid}{statement} .= "\n" . $line if (!$nomultiline); } elsif (exists $cur_info{$cur_pid}{context}) { $cur_info{$cur_pid}{context} .= "\n" . $line; } elsif (exists $cur_info{$cur_pid}{detail}) { $cur_info{$cur_pid}{detail} .= "\n" . $line; } elsif (exists $cur_info{$cur_pid}{query}) { $cur_info{$cur_pid}{query} .= "\n" . $line if (!$nomultiline); } } else { &logmsg('DEBUG', "Unknown syslog line format: $line"); } } elsif ($format eq 'stderr') { @matches = ($line =~ $compiled_prefix); if ($#matches >= 0) { for (my $i = 0 ; $i <= $#prefix_params ; $i++) { $prefix_vars{$prefix_params[$i]} = $matches[$i]; } # Stores temporary files and lock information &store_temporary_and_lock_infos($cur_pid); if (!$prefix_vars{'t_timestamp'} && $prefix_vars{'t_mtimestamp'}) { $prefix_vars{'t_timestamp'} = $prefix_vars{'t_mtimestamp'}; } elsif (!$prefix_vars{'t_timestamp'} && $prefix_vars{'t_session_timestamp'}) { $prefix_vars{'t_timestamp'} = $prefix_vars{'t_session_timestamp'}; } ($prefix_vars{'t_year'}, $prefix_vars{'t_month'}, $prefix_vars{'t_day'}, $prefix_vars{'t_hour'}, $prefix_vars{'t_min'}, $prefix_vars{'t_sec'}) = ($prefix_vars{'t_timestamp'} =~ $time_pattern); # Skip unwanted lines if ($#exclude_time >= 0) { foreach (@exclude_time) { if ($prefix_vars{'t_timestamp'} =~ /$_/) { return; } } } next if ($from && ($from gt $prefix_vars{'t_timestamp'})); if ($to && ($to lt $prefix_vars{'t_timestamp'})) { if (!$tmpoutfile) { if ($totalsize) { print STDERR &progress_bar($cursize, $stop_offset || $totalsize, 25, '='); } else { print STDERR "."; } } else { $pipe->print("$cursize " . ($overall_stat{'queries_number'} - $old_queries_count) . " " . ($overall_stat{'errors_number'} - $old_errors_count) . "\n"); $old_queries_count = $overall_stat{'queries_number'}; $old_errors_count = $overall_stat{'errors_number'}; $cursize = 0; } $getout = 2; last; } # Jump to the last line parsed if required next if (!&check_incremental_position($prefix_vars{'t_timestamp'}, $line)); $cur_pid = $prefix_vars{'t_pid'}; $prefix_vars{'t_client'} = _gethostbyaddr($prefix_vars{'t_client'}) if ($dns_resolv); # Store the current timestamp of the log line &store_current_timestamp($prefix_vars{'t_timestamp'}); # Extract information from log line prefix if (!$log_line_prefix) { &parse_log_prefix($prefix_vars{'t_logprefix'}); } # Check if the log line should be excluded from the report if (&validate_log_line($prefix_vars{'t_pid'})) { $prefix_vars{'t_host'} = 'stderr'; # Process the log line &parse_query(); } # Collect additional query information } elsif ($cur_pid && ($line !~ $orphan_stderr_line)) { if ($line =~ s/^(STATEMENT|DETAIL|HINT):\s+//) { my $lbl = lc($1); $line =~ s/ERROR:\s+//; if (exists $cur_temp_info{$cur_pid}{size}) { $cur_temp_info{$cur_pid}{query} .= $line; } elsif (exists $cur_lock_info{$cur_pid}{query}) { $cur_lock_info{$cur_pid}{query} .= "\n" . $line; } elsif (exists $cur_cancel_info{$cur_pid}{query}) { $cur_cancel_info{$cur_pid}{query} .= "\n" . $line; } else { $cur_info{$cur_pid}{$lbl} = $line; } next; } elsif ($cur_info{$cur_pid}{vacuum} && ($line =~ /^\t(pages|tuples|buffer usage|avg read rate|system usage):/)) { if ($line =~ /^\t(pages|tuples): (\d+) removed, (\d+) remain/) { $autovacuum_info{tables}{$cur_info{$cur_pid}{vacuum}}{$1}{removed} += $2; } if ($line =~ m#^\tsystem usage: CPU .* sec elapsed (.*) sec#) { if ($1 > $autovacuum_info{peak}{system_usage}{elapsed}) { $autovacuum_info{peak}{system_usage}{elapsed} = $1; $autovacuum_info{peak}{system_usage}{table} = $cur_info{$cur_pid}{vacuum}; $autovacuum_info{peak}{system_usage}{date} = "$cur_info{$cur_pid}{year}-$cur_info{$cur_pid}{month}-$cur_info{$cur_pid}{day} " . "$cur_info{$cur_pid}{hour}:$cur_info{$cur_pid}{min}:$cur_info{$cur_pid}{sec}"; } } next; } elsif ( $cur_info{$cur_pid}{parameters} && (($line =~ /[,\s]*\$(\d+)\s=\s/) || ($line =~ /^'[^']*'$/)) ) { # stores bind parameters if any $cur_info{$cur_pid}{parameters} .= " $line"; next; } # Some log line may be written by applications next if ($line =~ /\bLOG: /); if (exists $cur_plan_info{$cur_pid}{duration}) { $cur_plan_info{$cur_pid}{plan} .= "\n" . $line; } elsif (exists $cur_info{$cur_pid}{parameters}) { # stores bind parameters if any $cur_info{$cur_pid}{parameters} .= "\n" . $line; } elsif (exists $cur_temp_info{$cur_pid}{size}) { if (exists $cur_info{$cur_pid}{query} && !$cur_temp_info{$cur_pid}{query}) { $cur_temp_info{$cur_pid}{query} = $cur_info{$cur_pid}{query}; $cur_temp_info{$cur_pid}{timestamp} = $cur_info{$cur_pid}{'timestamp'}; $cur_temp_info{$cur_pid}{dbname} = $cur_info{$cur_pid}{'dbname'}; $cur_temp_info{$cur_pid}{dbuser} = $cur_info{$cur_pid}{'dbuser'}; $cur_temp_info{$cur_pid}{dbclient} = $cur_info{$cur_pid}{'client'} || $cur_info{$cur_pid}{'dbclient'}; $cur_temp_info{$cur_pid}{dbappname} = $cur_info{$cur_pid}{'appname'}; delete $cur_info{$cur_pid}; } $cur_temp_info{$cur_pid}{query} .= "\n" . $line; } elsif (exists $cur_lock_info{$cur_pid}{query}) { $cur_lock_info{$cur_pid}{query} .= "\n" . $line; } elsif (exists $cur_cancel_info{$cur_pid}{query}) { $cur_cancel_info{$cur_pid}{query} .= "\n" . $line; } elsif (exists $cur_info{$cur_pid}{statement}) { $cur_info{$cur_pid}{statement} .= "\n" . $line if (!$nomultiline); } elsif (exists $cur_info{$cur_pid}{context}) { $cur_info{$cur_pid}{context} .= "\n" . $line; } elsif (exists $cur_info{$cur_pid}{detail}) { $cur_info{$cur_pid}{detail} .= "\n" . $line; } elsif (exists $cur_info{$cur_pid}{query}) { $cur_info{$cur_pid}{query} .= "\n" . $line if (!$nomultiline); } # Collect orphaned lines of multiline queries } elsif ($cur_pid && ($cur_info{$cur_pid}{query})) { $cur_info{$cur_pid}{detail} .= "\n" . $line; } elsif (exists $cur_plan_info{$cur_pid}{duration}) { $cur_plan_info{$cur_pid}{plan} .= "\n" . $line; } } else { # unknown format &logmsg('DEBUG', "Unknown line format: $line"); } last if (($stop_offset > 0) && ($current_offset >= $stop_offset)); } if ($last_parsed) { $last_line{current_pos} = $current_offset; } } close $lfile; # Inform the parent that it should stop parsing other files if ($terminate) { kill(12, $parent_pid); return $terminate; } # Get stats from all pending temporary storage foreach my $pid (sort {$cur_info{$a}{date} <=> $cur_info{$b}{date}} keys %cur_info) { # Stores last query information &store_queries($pid, 1); } # Stores last temporary files and lock information foreach my $pid (keys %cur_temp_info) { &store_temporary_and_lock_infos($pid); } # Stores last cancelled queries information foreach my $pid (keys %cur_cancel_info) { &store_temporary_and_lock_infos($pid); } # Stores last temporary files and lock information foreach my $pid (keys %cur_lock_info) { &store_temporary_and_lock_infos($pid); } if ($extension eq 'tsung') { foreach my $pid (sort {$a <=> $b} keys %tsung_session) { &store_tsung_session($pid); } } if ($progress && ($getout != 1)) { if (!$tmpoutfile) { if ($totalsize) { print STDERR &progress_bar($cursize, $stop_offset || $totalsize, 25, '=',$overall_stat{'queries_number'},$overall_stat{'errors_number'}, $logfile); print STDERR "\n"; } } else { $pipe->print("$cursize " . ($overall_stat{'queries_number'} - $old_queries_count) . " " . ($overall_stat{'errors_number'} - $old_errors_count) . "\n"); } } %cur_info = (); # In incremental mode data are saved to disk per day if ($incremental && $last_line{datetime}) { $incr_date = $last_line{datetime}; $incr_date =~ s/\s.*$//; # set path and create subdirectories my $bpath = $incr_date; while ($bpath =~ s/([^\-]+)\-/$1\//) { mkdir("$outdir/$1") if (!-d "$outdir/$1"); } mkdir("$outdir/$bpath") if (!-d "$outdir/$bpath"); # Mark the directory as needing index update if (open(OUT, ">>$last_parsed.tmp")) { flock(OUT, 2) || return $getout; print OUT "$incr_date\n"; close(OUT); } else { &logmsg('ERROR', "can't save last parsed line into $last_parsed.tmp, $!"); } # Save binary data my $filenum = $$; $filenum++ while (-e "$outdir/$bpath/$incr_date-$filenum.bin"); my $fhb = new IO::File ">$outdir/$bpath/$incr_date-$filenum.bin"; if (not defined $fhb) { die "FATAL: can't write to $outdir/$bpath/$incr_date-$filenum.bin, $!\n"; } &dump_as_binary($fhb); $fhb->close; &init_stats_vars(); } elsif ($tmpoutfile) { &dump_as_binary($tmpoutfile); $tmpoutfile->close(); } # Inform the parent that it should stop parsing other files if ($getout) { kill(12, $parent_pid); } # Save last line into temporary file if ($last_parsed && scalar keys %last_line) { if (open(OUT, ">>$tmp_last_parsed")) { flock(OUT, 2) || return $getout; $last_line{current_pos} ||= 0; print OUT "$last_line{datetime}\t$last_line{current_pos}\t$last_line{orig}\n"; close(OUT); } else { &logmsg('ERROR', "can't save last parsed line into $tmp_last_parsed, $!"); } } return $getout; } # Store the current timestamp of the log line sub store_current_timestamp { my $t_timestamp = shift; $prefix_vars{'t_date'} = $t_timestamp; $prefix_vars{'t_date'} =~ s/\D+//g; if (!$overall_stat{'first_log_ts'} || ($overall_stat{'first_log_ts'} gt $t_timestamp)) { $overall_stat{'first_log_ts'} = $t_timestamp; } if (!$overall_stat{'last_log_ts'} || ($overall_stat{'last_log_ts'} lt $t_timestamp)) { $overall_stat{'last_log_ts'} = $t_timestamp; } } # Method used to check if the file stores logs after the last incremental position or not # This position should have been saved in the incremental file and read in the $last_parsed at # start up. Here we just verify that the first date in file is before the last incremental date. sub check_file_changed { my ($file, $saved_date, $look_at_beginning) = @_; my ($lfile, $totalsize, $iscompressed) = &get_log_file($file); # Compressed files do not allow seeking if ($iscompressed) { close($lfile); return 1; } my ($gsec, $gmin, $ghour, $gmday, $gmon, $gyear, $gwday, $gyday, $gisdst) = localtime(time); $gyear += 1900; my $CURRENT_DATE = $gyear . sprintf("%02d", $gmon + 1) . sprintf("%02d", $gmday); %prefix_vars = (); # If seeking is not explicitely disabled if (!$look_at_beginning) { # do not seek if filesize is smaller than the seek position if ($saved_last_line{current_pos} < $totalsize) { $lfile->seek($saved_last_line{current_pos} || 0, 0); } } my $more_lines = 0; while (my $line = <$lfile>) { $more_lines++; if ($format =~ /syslog/) { my @matches = ($line =~ $compiled_prefix); if ($#matches >= 0) { for (my $i = 0 ; $i <= $#prefix_params ; $i++) { $prefix_vars{$prefix_params[$i]} = $matches[$i]; } # Standard syslog format does not have year information, months are # three letters and days are not always with 2 digits. if ($prefix_vars{'t_month'} !~ /\d/) { $prefix_vars{'t_year'} = $gyear; $prefix_vars{'t_day'} = sprintf("%02d", $prefix_vars{'t_day'}); $prefix_vars{'t_month'} = $month_abbr{$prefix_vars{'t_month'}}; # Take care of year overlapping if ("$prefix_vars{'t_year'}$prefix_vars{'t_month'}$prefix_vars{'t_day'}" > $CURRENT_DATE) { $prefix_vars{'t_year'} = substr($CURRENT_DATE, 0, 4) - 1; } } $prefix_vars{'t_timestamp'} = "$prefix_vars{'t_year'}-$prefix_vars{'t_month'}-$prefix_vars{'t_day'} $prefix_vars{'t_hour'}:$prefix_vars{'t_min'}:$prefix_vars{'t_sec'}"; # This file has already been parsed if ($saved_date gt $prefix_vars{'t_timestamp'}) { close($lfile); return 0; } else { last; } } } elsif ($format eq 'stderr') { my @matches = ($line =~ $compiled_prefix); if ($#matches >= 0) { for (my $i = 0 ; $i <= $#prefix_params ; $i++) { $prefix_vars{$prefix_params[$i]} = $matches[$i]; } if (!$prefix_vars{'t_timestamp'} && $prefix_vars{'t_mtimestamp'}) { $prefix_vars{'t_timestamp'} = $prefix_vars{'t_mtimestamp'}; } elsif (!$prefix_vars{'t_timestamp'} && $prefix_vars{'t_session_timestamp'}) { $prefix_vars{'t_timestamp'} = $prefix_vars{'t_session_timestamp'}; } } next if (!$prefix_vars{'t_timestamp'}); # This file has already been parsed if ($saved_date gt $prefix_vars{'t_timestamp'}) { close($lfile); return 0; } else { last; } } } close($lfile); if (!$more_lines) { close($lfile); return 0; } return 1; } # Method used to check if we have already reached the last parsing position in incremental mode # This position should have been saved in the incremental file and read in the $last_parsed at # start up. sub check_incremental_position { my ($cur_date, $line) = @_; if ($last_parsed) { if ($saved_last_line{datetime}) { if ($cur_date lt $saved_last_line{datetime}) { return 0; } elsif (!$last_line{datetime} && ($cur_date eq $saved_last_line{datetime})) { return 0 if ($line ne $saved_last_line{orig}); } } $last_line{datetime} = $cur_date; $last_line{orig} = $line; } # In incremental mode data are saved to disk per day if ($incremental) { $cur_date =~ s/\s.*$//; # Check if the current day has changed, if so save data $incr_date = $cur_date if (!$incr_date); if ($cur_date gt $incr_date) { # Get stats from all pending temporary storage foreach my $pid (sort {$cur_info{$a}{date} <=> $cur_info{$b}{date}} keys %cur_info) { # Stores last queries information &store_queries($pid, 1); } # Stores last temporary files and lock information foreach my $pid (keys %cur_temp_info) { &store_temporary_and_lock_infos($pid); } # Stores last cancelled queries information foreach my $pid (keys %cur_cancel_info) { &store_temporary_and_lock_infos($pid); } # Stores last temporary files and lock information foreach my $pid (keys %cur_lock_info) { &store_temporary_and_lock_infos($pid); } if ($extension eq 'tsung') { foreach my $pid (sort {$a <=> $b} keys %tsung_session) { &store_tsung_session($pid); } } # set path and create subdirectories my $bpath = $incr_date; while ($bpath =~ s/([^\-]+)\-/$1\//) { mkdir("$outdir/$1") if (!-d "$outdir/$1"); } mkdir("$outdir/$bpath") if (!-d "$outdir/$bpath"); # Mark this directory as needing a reindex if (open(OUT, ">>$last_parsed.tmp")) { flock(OUT, 2) || return 1; print OUT "$incr_date\n"; close(OUT); } else { &logmsg('ERROR', "can't save last parsed line into $last_parsed.tmp, $!"); } # Save binary data my $filenum = $$; $filenum++ while (-e "$outdir/$bpath/$incr_date-$filenum.bin"); my $fhb = new IO::File ">$outdir/$bpath/$incr_date-$filenum.bin"; if (not defined $fhb) { die "FATAL: can't write to $outdir/$bpath/$incr_date-$filenum.bin, $!\n"; } &dump_as_binary($fhb); $fhb->close; $incr_date = $cur_date; &init_stats_vars(); } } return 1; } # Display message following the log level sub logmsg { my ($level, $str) = @_; return if ($quiet && ($level ne 'FATAL')); return if (!$debug && ($level eq 'DEBUG')); if ($level =~ /(\d+)/) { print STDERR "\t" x $1; } print STDERR "$level: $str\n"; } # Normalize SQL queries by removing parameters sub normalize_query { my $orig_query = shift; return if (!$orig_query); # Remove comments $orig_query =~ s/\/\*(.*?)\*\///gs; # Set the entire query lowercase $orig_query = lc($orig_query); # Remove extra space, new line and tab characters by a single space $orig_query =~ s/[\t\s\r\n]+/ /gs; # Removed start of transaction if ($orig_query !~ /^\s*begin\s*;\s*$/) { $orig_query =~ s/^\s*begin\s*;\s*//gs } # Remove string content $orig_query =~ s/\\'//g; $orig_query =~ s/'[^']*'/''/g; $orig_query =~ s/''('')+/''/g; # Remove NULL parameters $orig_query =~ s/=\s*NULL/=''/g; # Remove numbers $orig_query =~ s/([^a-z_\$-])-?([0-9]+)/${1}0/g; # Remove hexadecimal numbers $orig_query =~ s/([^a-z_\$-])0x[0-9a-f]{1,10}/${1}0x/g; # Remove IN values $orig_query =~ s/in\s*\([\'0x,\s]*\)/in (...)/g; return $orig_query; } sub generate_anonymized_string { my ($original, $cache, $before) = @_; # Prevent dates from being anonymized return $original if $original =~ m{\A\d\d\d\d[/:-]\d\d[/:-]\d\d\z}; return $original if $original =~ m{\A\d\d[/:-]\d\d[/:-]\d\d\d\d\z}; # Prevent dates format like DD/MM/YYYY HH24:MI:SS from being anonymized return $original if $original =~ m{\A(?:FM|FX|TM)?(?:HH|HH12|HH24|MI|SS|MS|US|SSSS|AM|A\.M\.|PM|P\.M\.|am|a\.m\.|pm|p\.m\.|Y,YYY|YYYY|YYY|YY|Y|IYYY|IYY|IY|I|BC|B\.C\.|AD|A\.D\.|bc|b\.c\.|ad|a\.d\.|MONTH|Month|month|MON|Mon|mon|MM|DAY|Day|day|DY|Dy|dy|DDD|DD|D|W|WW|IW|CC|J|Q|RM|rm|TZ|tz|[\s\/\-:])+(?:TH|th|SP)?$}; # Prevent interval from being anonymized return $original if $before =~ /interval/i; # Range of characters to use in anonymized strings my @chars = ('A'..'Z', 0..9, 'a'..'z', '-', '_', '.'); unless ($cache->{$original}) { # Actual anonymized version generation $cache->{$original} = join('', map { $chars[rand @chars] } 1..10 ); } return $cache->{$original}; } # Anonymize litteral in SQL queries by replacing parameters with fake values sub anonymize_query { my $orig_query = shift; return if (!$orig_query); # Variable to hold anonymized versions, so we can provide the same value # for the same input, within single query. my $anonymization_cache = {}; # Remove comments $orig_query =~ s/\/\*(.*?)\*\///gs; # Clean query $orig_query =~ s/\\'//g; $orig_query =~ s/('')+//g; # Anonymize each values $orig_query =~ s/([^\s]+[\s\(]*)'([^']*)'/"$1'".generate_anonymized_string($2, $anonymization_cache, $1)."'"/eg; return $orig_query; } # Format numbers with comma for better reading sub comma_numbers { return 0 if ($#_ < 0); return 0 if (!$_[0]); my $text = reverse $_[0]; $text =~ s/(\d\d\d)(?=\d)(?!\d*\.)/$1$num_sep/g; return scalar reverse $text; } # Format numbers with comma for better reading sub pretty_print_size { my $val = shift; return 0 if (!$val); if ($val >= 1125899906842624) { $val = ($val / 1125899906842624); $val = sprintf("%0.2f", $val) . " PiB"; } elsif ($val >= 1099511627776) { $val = ($val / 1099511627776); $val = sprintf("%0.2f", $val) . " TiB"; } elsif ($val >= 1073741824) { $val = ($val / 1073741824); $val = sprintf("%0.2f", $val) . " GiB"; } elsif ($val >= 1048576) { $val = ($val / 1048576); $val = sprintf("%0.2f", $val) . " MiB"; } elsif ($val >= 1024) { $val = ($val / 1024); $val = sprintf("%0.2f", $val) . " KiB"; } else { $val = $val . " B"; } return $val; } # Format duration sub convert_time { my $time = shift; return '0s' if (!$time); my $days = int($time / 86400000); $time -= ($days * 86400000); my $hours = int($time / 3600000); $time -= ($hours * 3600000); my $minutes = int($time / 60000); $time -= ($minutes * 60000); my $seconds = int($time / 1000); $time -= ($seconds * 1000); my $milliseconds = sprintf("%.3d", $time); $days = $days < 1 ? '' : $days . 'd'; $hours = $hours < 1 ? '' : $hours . 'h'; $minutes = $minutes < 1 ? '' : $minutes . 'm'; $seconds = $seconds < 1 ? '' : $seconds . 's'; $milliseconds = $milliseconds < 1 ? '' : $milliseconds . 'ms'; if ($days || $hours || $minutes) { $milliseconds = ''; } elsif ($seconds) { $milliseconds =~ s/\.\d+//; } $milliseconds =~ s/^[0]+// if ($milliseconds !~ /\./); $time = $days . $hours . $minutes . $seconds . $milliseconds; $time = '0s' if ($time eq ''); return $time; } # Stores the top N queries generating the biggest temporary file sub set_top_tempfile_info { my ($q, $sz, $date, $db, $user, $remote, $app) = @_; push(@top_tempfile_info, [($sz, $date, $q, $db, $user, $remote, $app)]); my @tmp_top_tempfile_info = sort {$b->[0] <=> $a->[0]} @top_tempfile_info; @top_tempfile_info = (); for (my $i = 0; $i <= $#tmp_top_tempfile_info; $i++) { push(@top_tempfile_info, $tmp_top_tempfile_info[$i]); last if ($i == $end_top); } } # Stores the top N queries cancelled sub set_top_cancelled_info { my ($q, $sz, $date, $db, $user, $remote, $app) = @_; push(@top_cancelled_info, [($sz, $date, $q, $db, $user, $remote, $app)]); my @tmp_top_cancelled_info = sort {$b->[0] <=> $a->[0]} @top_cancelled_info; @top_cancelled_info = (); for (my $i = 0; $i <= $#tmp_top_cancelled_info; $i++) { push(@top_cancelled_info, $tmp_top_cancelled_info[$i]); last if ($i == $end_top); } } # Stores the top N queries waiting the most sub set_top_locked_info { my ($q, $dt, $date, $db, $user, $remote, $app) = @_; push(@top_locked_info, [($dt, $date, $q, $db, $user, $remote, $app)]); my @tmp_top_locked_info = sort {$b->[0] <=> $a->[0]} @top_locked_info; @top_locked_info = (); for (my $i = 0; $i <= $#tmp_top_locked_info; $i++) { push(@top_locked_info, $tmp_top_locked_info[$i]); last if ($i == $end_top); } } # Stores the top N slowest queries sub set_top_slowest { my ($q, $dt, $date, $db, $user, $remote, $app, $bind, $plan) = @_; push(@top_slowest, [($dt, $date, $q, $db, $user, $remote, $app, $bind, $plan)]); my @tmp_top_slowest = sort {$b->[0] <=> $a->[0]} @top_slowest; @top_slowest = (); for (my $i = 0; $i <= $#tmp_top_slowest; $i++) { push(@top_slowest, $tmp_top_slowest[$i]); last if ($i == $end_top); } } # Stores top N slowest sample queries sub set_top_sample { my ($norm, $q, $dt, $date, $db, $user, $remote, $app, $bind, $plan) = @_; $normalyzed_info{$norm}{samples}{$dt}{query} = $q; $normalyzed_info{$norm}{samples}{$dt}{date} = $date; $normalyzed_info{$norm}{samples}{$dt}{db} = $db; $normalyzed_info{$norm}{samples}{$dt}{user} = $user; $normalyzed_info{$norm}{samples}{$dt}{remote} = $remote; $normalyzed_info{$norm}{samples}{$dt}{app} = $app; $normalyzed_info{$norm}{samples}{$dt}{bind} = $bind; $normalyzed_info{$norm}{samples}{$dt}{plan} = $plan; if ($sample > 0) { my $i = 1; foreach my $k (sort {$b <=> $a} keys %{$normalyzed_info{$norm}{samples}}) { if ($i > $sample) { delete $normalyzed_info{$norm}{samples}{$k}; } $i++; } } } # Stores top N error sample queries sub set_top_error_sample { my ($q, $date, $real_error, $detail, $context, $statement, $hint, $db, $user, $app, $remote) = @_; # Stop when we have our number of samples if (!exists $error_info{$q}{date} || ($#{$error_info{$q}{date}} < $sample)) { if ( ($q =~ /deadlock detected/) || ($real_error && !grep(/^\Q$real_error\E$/, @{$error_info{$q}{error}})) ) { if ($anonymize) { $context = &anonymize_query($context); $statement = &anonymize_query($statement); $detail = &anonymize_query($detail); } push(@{$error_info{$q}{date}}, $date); push(@{$error_info{$q}{detail}}, $detail); push(@{$error_info{$q}{context}}, $context); push(@{$error_info{$q}{statement}}, $statement); push(@{$error_info{$q}{hint}}, $hint); push(@{$error_info{$q}{error}}, $real_error); push(@{$error_info{$q}{db}}, $db); push(@{$error_info{$q}{user}}, $user); push(@{$error_info{$q}{app}}, $app); push(@{$error_info{$q}{remote}}, $remote); } } } sub dump_as_text { # Global information my $curdate = localtime(time); my $fmt_nlines = &comma_numbers($nlines); my $total_time = timestr($td); $total_time =~ s/^([\.0-9]+) wallclock.*/$1/; $total_time = &convert_time($total_time * 1000); my $logfile_str = $log_files[0]; if ($#log_files > 0) { $logfile_str .= ', ..., ' . $log_files[-1]; } print $fh qq{ pgBadger :: $report_title - Global information --------------------------------------------------- Generated on $curdate Log file: $logfile_str Parsed $fmt_nlines log entries in $total_time Log start from $overall_stat{'first_log_ts'} to $overall_stat{'last_log_ts'} }; # Overall statistics my $fmt_unique = &comma_numbers(scalar keys %normalyzed_info); my $fmt_queries = &comma_numbers($overall_stat{'queries_number'}); my $fmt_duration = &convert_time($overall_stat{'queries_duration'}); $overall_stat{'first_query_ts'} ||= '-'; $overall_stat{'last_query_ts'} ||= '-'; print $fh qq{ - Overall statistics --------------------------------------------------- Number of unique normalized queries: $fmt_unique Number of queries: $fmt_queries Total query duration: $fmt_duration First query: $overall_stat{'first_query_ts'} Last query: $overall_stat{'last_query_ts'} }; foreach (sort {$overall_stat{'peak'}{$b}{query} <=> $overall_stat{'peak'}{$a}{query}} keys %{$overall_stat{'peak'}}) { print $fh "Query peak: ", &comma_numbers($overall_stat{'peak'}{$_}{query}), " queries/s at $_"; last; } if (!$disable_error) { my $fmt_errors = &comma_numbers($overall_stat{'errors_number'}); my $fmt_unique_error = &comma_numbers(scalar keys %error_info); print $fh qq{ Number of events: $fmt_errors Number of unique normalized events: $fmt_unique_error }; } if ($tempfile_info{count}) { my $fmt_temp_maxsise = &comma_numbers($tempfile_info{maxsize}); my $fmt_temp_avsize = &comma_numbers(sprintf("%.2f", ($tempfile_info{size} / $tempfile_info{count}))); print $fh qq{Number temporary files: $tempfile_info{count} Max size of temporary files: $fmt_temp_maxsise Average size of temporary files: $fmt_temp_avsize }; } if ($cancelled_info{count}) { print $fh qq{Number cancelled queries: $cancelled_info{count} }; } if (!$disable_session && $session_info{count}) { my $avg_session_duration = &convert_time($session_info{duration} / $session_info{count}); my $tot_session_duration = &convert_time($session_info{duration}); my $avg_queries = &comma_numbers(int($overall_stat{'queries_number'}/$session_info{count})); my $avg_duration = &convert_time(int($overall_stat{'queries_duration'}/$session_info{count})); print $fh qq{Total number of sessions: $session_info{count} Total duration of sessions: $tot_session_duration Average duration of sessions: $avg_session_duration Average queries per sessions: $avg_queries Average queries duration per sessions: $avg_duration }; foreach (sort {$overall_stat{'peak'}{$b}{session} <=> $overall_stat{'peak'}{$a}{session}} keys %{$overall_stat{'peak'}}) { print $fh "Session peak: ", &comma_numbers($overall_stat{'peak'}{$_}{session}), " sessions at $_"; last; } } if (!$disable_connection && $connection_info{count}) { print $fh "Total number of connections: $connection_info{count}\n"; foreach (sort {$overall_stat{'peak'}{$b}{connection} <=> $overall_stat{'peak'}{$a}{connection}} keys %{$overall_stat{'peak'}}) { if ($overall_stat{'peak'}{$_}{connection} > 0) { print $fh "Connection peak: ", &comma_numbers($overall_stat{'peak'}{$_}{connection}), " conn/s at $_"; } last; } } if (scalar keys %database_info > 1) { print $fh "Total number of databases: ", scalar keys %database_info, "\n"; } if (!$disable_hourly && $overall_stat{'queries_number'}) { print $fh qq{ - Hourly statistics ---------------------------------------------------- Report not supported by text format }; } # INSERT/DELETE/UPDATE/SELECT repartition my $totala = 0; foreach my $a (@SQL_ACTION) { $totala += $overall_stat{$a}; } if (!$disable_type && $totala) { my $total = $overall_stat{'queries_number'} || 1; print $fh "\n- Queries by type ------------------------------------------------------\n\n"; print $fh "Type Count Percentage\n"; foreach my $a (@SQL_ACTION) { print $fh "$a: ", &comma_numbers($overall_stat{$a}), " ", sprintf("%0.2f", ($overall_stat{$a} * 100) / $total), "%\n"; } print $fh "OTHERS: ", &comma_numbers($total - $totala), " ", sprintf("%0.2f", (($total - $totala) * 100) / $total), "%\n" if (($total - $totala) > 0); print $fh "\n"; # Show request per database statistics if (scalar keys %database_info > 1) { print $fh "\n- Request per database ------------------------------------------------------\n\n"; print $fh "Database Request type Count Duration\n"; foreach my $d (sort keys %database_info) { print $fh "$d - ", &comma_numbers($database_info{$d}{count}), " ", &convert_time($database_info{$d}{duration}), "\n"; foreach my $r (sort keys %{$database_info{$d}}) { next if (($r eq 'count') || ($r =~ /duration/)); print $fh "\t$r ", &comma_numbers($database_info{$d}{$r}), " ", &convert_time($database_info{$d}{"$r|duration"}), "\n"; } } } # Show request per application statistics if (scalar keys %application_info > 1) { print $fh "\n- Request per application ------------------------------------------------------\n\n"; print $fh "Application Request type Count Duration\n"; foreach my $d (sort keys %application_info) { print $fh "$d - ", &comma_numbers($application_info{$d}{count}), " ", &convert_time($application_info{$d}{duration}), "\n"; foreach my $r (sort keys %{$application_info{$d}}) { next if (($r eq 'count') || ($r =~ /duration/)); print $fh "\t$r ", &comma_numbers($application_info{$d}{$r}), " ", &convert_time($application_info{$d}{"$r|duration"}), "\n"; } } } # Show request per user statistics if (scalar keys %user_info > 1) { print $fh "\n- Request per user ------------------------------------------------------\n\n"; print $fh "User Request type Count duration\n"; foreach my $d (sort keys %user_info) { print $fh "$d - ", &comma_numbers($user_info{$d}{count}), " ", &convert_time($user_info{$d}{duration}), "\n"; foreach my $r (sort keys %{$user_info{$d}}) { next if (($r eq 'count') || ($r =~ /duration/)); print $fh "\t$r ", &comma_numbers($user_info{$d}{$r}), " ", &convert_time($user_info{$d}{"$r|duration"}), "\n"; } } } # Show request per host statistics if (scalar keys %host_info > 1) { print $fh "\n- Request per host ------------------------------------------------------\n\n"; print $fh "Host Request type Count Duration\n"; foreach my $d (sort keys %host_info) { print $fh "$d - ", &comma_numbers($host_info{$d}{count}), " ", &convert_time($host_info{$d}{duration}), "\n"; foreach my $r (sort keys %{$host_info{$d}}) { next if (($r eq 'count') || ($r =~ /duration/)); print $fh "\t$r ", &comma_numbers($host_info{$d}{$r}), " ", &convert_time($host_info{$d}{"$r|duration"}), "\n"; } } } } if (!$disable_lock && scalar keys %lock_info > 0) { print $fh "\n- Locks by type ------------------------------------------------------\n\n"; print $fh "Type Object Count Total Duration Avg duration (s)\n"; my $total_count = 0; my $total_duration = 0; foreach my $t (sort keys %lock_info) { print $fh "$t\t\t", &comma_numbers($lock_info{$t}{count}), " ", &convert_time($lock_info{$t}{duration}), " ", &convert_time($lock_info{$t}{duration} / $lock_info{$t}{count}), "\n"; foreach my $o (sort keys %{$lock_info{$t}}) { next if (($o eq 'count') || ($o eq 'duration') || ($o eq 'chronos')); print $fh "\t$o\t", &comma_numbers($lock_info{$t}{$o}{count}), " ", &convert_time($lock_info{$t}{$o}{duration}), " ", &convert_time($lock_info{$t}{$o}{duration} / $lock_info{$t}{$o}{count}), "\n"; } $total_count += $lock_info{$t}{count}; $total_duration += $lock_info{$t}{duration}; } print $fh "Total:\t\t\t", &comma_numbers($total_count), " ", &convert_time($total_duration), " ", &convert_time($total_duration / ($total_count || 1)), "\n"; } # Show session per database statistics if (!$disable_session && exists $session_info{database}) { print $fh "\n- Sessions per database ------------------------------------------------------\n\n"; print $fh "Database Count Total Duration Avg duration (s)\n"; foreach my $d (sort keys %{$session_info{database}}) { print $fh "$d - ", &comma_numbers($session_info{database}{$d}{count}), " ", &convert_time($session_info{database}{$d}{duration}), " ", &convert_time($session_info{database}{$d}{duration} / $session_info{database}{$d}{count}), "\n"; } } # Show session per user statistics if (!$disable_session && exists $session_info{user}) { print $fh "\n- Sessions per user ------------------------------------------------------\n\n"; print $fh "User Count Total Duration Avg duration (s)\n"; foreach my $d (sort keys %{$session_info{user}}) { print $fh "$d - ", &comma_numbers($session_info{user}{$d}{count}), " ", &convert_time($session_info{user}{$d}{duration}), " ", &convert_time($session_info{user}{$d}{duration} / $session_info{user}{$d}{count}), "\n"; } } # Show session per host statistics if (!$disable_session && exists $session_info{host}) { print $fh "\n- Sessions per host ------------------------------------------------------\n\n"; print $fh "User Count Total Duration Avg duration (s)\n"; foreach my $d (sort keys %{$session_info{host}}) { print $fh "$d - ", &comma_numbers($session_info{host}{$d}{count}), " ", &convert_time($session_info{host}{$d}{duration}), " ", &convert_time($session_info{host}{$d}{duration} / $session_info{host}{$d}{count}), "\n"; } } # Show session per application statistics if (!$disable_session && exists $session_info{app}) { print $fh "\n- Sessions per application ------------------------------------------------------\n\n"; print $fh "Application Count Total Duration Avg duration (s)\n"; foreach my $d (sort keys %{$session_info{app}}) { print $fh "$d - ", &comma_numbers($session_info{app}{$d}{count}), " ", &convert_time($session_info{app}{$d}{duration}), " ", &convert_time($session_info{app}{$d}{duration} / $session_info{app}{$d}{count}), "\n"; } } # Show connection per database statistics if (!$disable_connection && exists $connection_info{database}) { print $fh "\n- Connections per database ------------------------------------------------------\n\n"; print $fh "Database User Count\n"; foreach my $d (sort keys %{$connection_info{database}}) { print $fh "$d - ", &comma_numbers($connection_info{database}{$d}), "\n"; foreach my $u (sort keys %{$connection_info{user}}) { next if (!exists $connection_info{database_user}{$d}{$u}); print $fh "\t$u ", &comma_numbers($connection_info{database_user}{$d}{$u}), "\n"; } } } # Show connection per user statistics if (!$disable_connection && exists $connection_info{user}) { print $fh "\n- Connections per user ------------------------------------------------------\n\n"; print $fh "User Count\n"; foreach my $d (sort keys %{$connection_info{user}}) { print $fh "$d - ", &comma_numbers($connection_info{user}{$d}), "\n"; } } # Show connection per host statistics if (!$disable_connection && exists $connection_info{host}) { print $fh "\n- Connections per host ------------------------------------------------------\n\n"; print $fh "User Count\n"; foreach my $d (sort keys %{$connection_info{host}}) { print $fh "$d - ", &comma_numbers($connection_info{host}{$d}), "\n"; } } # Show lock wait detailed information if (!$disable_lock && scalar keys %lock_info > 0) { my @top_locked_queries; foreach my $h (keys %normalyzed_info) { if (exists($normalyzed_info{$h}{locks})) { push (@top_locked_queries, [$h, $normalyzed_info{$h}{locks}{count}, $normalyzed_info{$h}{locks}{wait}, $normalyzed_info{$h}{locks}{minwait}, $normalyzed_info{$h}{locks}{maxwait}]); } } # Most frequent waiting queries (N) @top_locked_queries = sort {$b->[2] <=> $a->[2]} @top_locked_queries; print $fh "\n- Most frequent waiting queries (N) -----------------------------------------\n\n"; print $fh "Rank Count Total wait time (s) Min/Max/Avg duration (s) Query\n"; for (my $i = 0 ; $i <= $#top_locked_queries ; $i++) { last if ($i > $end_top); print $fh ($i + 1), ") ", $top_locked_queries[$i]->[1], " - ", &convert_time($top_locked_queries[$i]->[2]), " - ", &convert_time($top_locked_queries[$i]->[3]), "/", &convert_time($top_locked_queries[$i]->[4]), "/", &convert_time(($top_locked_queries[$i]->[2] / $top_locked_queries[$i]->[1])), " - ", $top_locked_queries[$i]->[0], "\n"; print $fh "--\n"; my $k = $top_locked_queries[$i]->[0]; my $j = 1; foreach my $d (sort {$b <=> $a} keys %{$normalyzed_info{$k}{samples}}) { my $ttl = $top_locked_info[$i]->[1] || ''; my $db = " - $normalyzed_info{$k}{samples}{$d}{date} - database: $normalyzed_info{$k}{samples}{$d}{db}" if ($normalyzed_info{$k}{samples}{$d}{db}); $db .= ", user: $normalyzed_info{$k}{samples}{$d}{user}" if ($normalyzed_info{$k}{samples}{$d}{user}); $db .= ", remote: $normalyzed_info{$k}{samples}{$d}{remote}" if ($normalyzed_info{$k}{samples}{$d}{remote}); $db .= ", app: $normalyzed_info{$k}{samples}{$d}{app}" if ($normalyzed_info{$k}{samples}{$d}{app}); $db .= ", bind query: yes" if ($normalyzed_info{$k}{samples}{$d}{bind}); $db =~ s/^, / - /; print $fh "\t- Example $j: ", &convert_time($d), "$db - ", $normalyzed_info{$k}{samples}{$d}{query}, "\n"; $j++; } } print $fh "\n"; @top_locked_queries = (); # Queries that waited the most @top_locked_info = sort {$b->[1] <=> $a->[1]} @top_locked_info; print $fh "\n- Queries that waited the mosts ---------------------------------------------\n\n"; print $fh "Rank Wait time (s) Query\n"; for (my $i = 0 ; $i <= $#top_locked_info ; $i++) { my $ttl = $top_locked_info[$i]->[1] || ''; my $db = " - database: $top_locked_info[$i]->[3]" if ($top_locked_info[$i]->[3]); $db .= ", user: $top_locked_info[$i]->[4]" if ($top_locked_info[$i]->[4]); $db .= ", remote: $top_locked_info[$i]->[5]" if ($top_locked_info[$i]->[5]); $db .= ", app: $top_locked_info[$i]->[6]" if ($top_locked_info[$i]->[6]); $db =~ s/^, / - /; print $fh ($i + 1), ") ", &convert_time($top_locked_info[$i]->[0]), " $ttl$db - ", $top_locked_info[$i]->[2], "\n"; print $fh "--\n"; } print $fh "\n"; } # Show temporary files detailed information if (!$disable_temporary && scalar keys %tempfile_info > 0) { my @top_temporary; foreach my $h (keys %normalyzed_info) { if (exists($normalyzed_info{$h}{tempfiles})) { push (@top_temporary, [$h, $normalyzed_info{$h}{tempfiles}{count}, $normalyzed_info{$h}{tempfiles}{size}, $normalyzed_info{$h}{tempfiles}{minsize}, $normalyzed_info{$h}{tempfiles}{maxsize}]); } } # Queries generating the most temporary files (N) @top_temporary = sort {$b->[1] <=> $a->[1]} @top_temporary; print $fh "\n- Queries generating the most temporary files (N) ---------------------------\n\n"; print $fh "Rank Count Total size Min/Max/Avg size Query\n"; my $idx = 1; for (my $i = 0 ; $i <= $#top_temporary ; $i++) { last if ($i > $end_top); print $fh $idx, ") ", $top_temporary[$i]->[1], " - ", &comma_numbers($top_temporary[$i]->[2]), " - ", &comma_numbers($top_temporary[$i]->[3]), "/", &comma_numbers($top_temporary[$i]->[4]), "/", &comma_numbers(sprintf("%.2f", $top_temporary[$i]->[2] / $top_temporary[$i]->[1])), " - ", $top_temporary[$i]->[0], "\n"; print $fh "--\n"; my $k = $top_temporary[$i]->[0]; if ($normalyzed_info{$k}{count} > 1) { my $j = 1; foreach my $d (sort {$b <=> $a} keys %{$normalyzed_info{$k}{samples}}) { my $db = "$normalyzed_info{$k}{samples}{$d}{date} - database: $normalyzed_info{$k}{samples}{$d}{db}" if ($normalyzed_info{$k}{samples}{$d}{db}); $db .= ", user: $normalyzed_info{$k}{samples}{$d}{user}" if ($normalyzed_info{$k}{samples}{$d}{user}); $db .= ", remote: $normalyzed_info{$k}{samples}{$d}{remote}" if ($normalyzed_info{$k}{samples}{$d}{remote}); $db .= ", app: $normalyzed_info{$k}{samples}{$d}{app}" if ($normalyzed_info{$k}{samples}{$d}{app}); $db .= ", bind query: yes" if ($normalyzed_info{$k}{samples}{$d}{bind}); $db =~ s/^, / - /; print $fh "\t- Example $j: ", &convert_time($d), " - $db - ", $normalyzed_info{$k}{samples}{$d}{query}, "\n"; $j++; } } $idx++; } @top_temporary = (); # Top queries generating the largest temporary files @top_tempfile_info = sort {$b->[1] <=> $a->[1]} @top_tempfile_info; print $fh "\n- Queries generating the largest temporary files ----------------------------\n\n"; print $fh "Rank Size Query\n"; for (my $i = 0 ; $i <= $#top_tempfile_info ; $i++) { my $ttl = $top_tempfile_info[$i]->[1] || ''; my $db = " - database: $top_tempfile_info[$i]->[3]" if ($top_tempfile_info[$i]->[3]); $db .= ", user: $top_tempfile_info[$i]->[4]" if ($top_tempfile_info[$i]->[4]); $db .= ", remote: $top_tempfile_info[$i]->[5]" if ($top_tempfile_info[$i]->[5]); $db .= ", app: $top_tempfile_info[$i]->[6]" if ($top_tempfile_info[$i]->[6]); $db =~ s/^, / - /; print $fh ($i + 1), ") ", &comma_numbers($top_tempfile_info[$i]->[0]), " - $ttl$db - ", $top_tempfile_info[$i]->[2], "\n"; } print $fh "\n"; } # Show cancelled queries detailed information if (!$disable_query && scalar keys %cancelled_info > 0) { my @top_cancelled; foreach my $h (keys %normalyzed_info) { if (exists($normalyzed_info{$h}{cancelled})) { push (@top_cancelled, [$h, $normalyzed_info{$h}{cancelled}{count}]); } } # Queries generating the most cancelled files (N) @top_cancelled = sort {$b->[1] <=> $a->[1]} @top_cancelled; print $fh "\n- Queries most cancelled (N) ---------------------------\n\n"; print $fh "Rank Count Query\n"; my $idx = 1; for (my $i = 0 ; $i <= $#top_cancelled ; $i++) { last if ($i > $end_top); print $fh $idx, ") ", $top_cancelled[$i]->[1], " - ", $top_cancelled[$i]->[0], "\n"; print $fh "--\n"; my $k = $top_cancelled[$i]->[0]; if ($normalyzed_info{$k}{count} > 1) { my $j = 1; foreach my $d (sort {$b <=> $a} keys %{$normalyzed_info{$k}{samples}}) { my $db = "$normalyzed_info{$k}{samples}{$d}{date} - database: $normalyzed_info{$k}{samples}{$d}{db}" if ($normalyzed_info{$k}{samples}{$d}{db}); $db .= ", user: $normalyzed_info{$k}{samples}{$d}{user}" if ($normalyzed_info{$k}{samples}{$d}{user}); $db .= ", remote: $normalyzed_info{$k}{samples}{$d}{remote}" if ($normalyzed_info{$k}{samples}{$d}{remote}); $db .= ", app: $normalyzed_info{$k}{samples}{$d}{app}" if ($normalyzed_info{$k}{samples}{$d}{app}); $db .= ", bind query: yes" if ($normalyzed_info{$k}{samples}{$d}{bind}); $db =~ s/^, / - /; print $fh "\t- Example $j: ", &convert_time($d), " - $db - ", $normalyzed_info{$k}{samples}{$d}{query}, "\n"; $j++; } } $idx++; } @top_cancelled = (); # Top queries generating the largest cancelled files @top_cancelled_info = sort {$b->[1] <=> $a->[1]} @top_cancelled_info; print $fh "\n- Queries generating the most cancellation ----------------------------\n\n"; print $fh "Rank Times cancelled Query\n"; for (my $i = 0 ; $i <= $#top_cancelled_info ; $i++) { my $ttl = $top_cancelled_info[$i]->[1] || ''; my $db = " - database: $top_cancelled_info[$i]->[3]" if ($top_cancelled_info[$i]->[3]); $db .= ", user: $top_cancelled_info[$i]->[4]" if ($top_cancelled_info[$i]->[4]); $db .= ", remote: $top_cancelled_info[$i]->[5]" if ($top_cancelled_info[$i]->[5]); $db .= ", app: $top_cancelled_info[$i]->[6]" if ($top_cancelled_info[$i]->[6]); $db =~ s/^, / - /; print $fh ($i + 1), ") ", &comma_numbers($top_cancelled_info[$i]->[0]), " - $ttl$db - ", $top_cancelled_info[$i]->[2], "\n"; } print $fh "\n"; } # Show top information if (!$disable_query && ($#top_slowest >= 0)) { print $fh "\n- Slowest queries ------------------------------------------------------\n\n"; print $fh "Rank Duration (s) Query\n"; for (my $i = 0 ; $i <= $#top_slowest ; $i++) { my $db = " database: $top_slowest[$i]->[3]" if ($top_slowest[$i]->[3]); $db .= ", user: $top_slowest[$i]->[4]" if ($top_slowest[$i]->[4]); $db .= ", remote: $top_slowest[$i]->[5]" if ($top_slowest[$i]->[5]); $db .= ", app: $top_slowest[$i]->[6]" if ($top_slowest[$i]->[6]); $db .= ", bind query: yes" if ($top_slowest[$i]->[7]); $db =~ s/^, //; print $fh $i + 1, ") " . &convert_time($top_slowest[$i]->[0]) . "$db - $top_slowest[$i]->[2]\n"; print $fh "--\n"; } print $fh "\n- Queries that took up the most time (N) -------------------------------\n\n"; print $fh "Rank Total duration Times executed Min/Max/Avg duration (s) Query\n"; my $idx = 1; foreach my $k (sort {$normalyzed_info{$b}{duration} <=> $normalyzed_info{$a}{duration}} keys %normalyzed_info) { next if (!$normalyzed_info{$k}{count}); last if ($idx > $top); my $q = $k; if ($normalyzed_info{$k}{count} == 1) { foreach (keys %{$normalyzed_info{$k}{samples}}) { $q = $normalyzed_info{$k}{samples}{$_}{query}; last; } } $normalyzed_info{$k}{average} = $normalyzed_info{$k}{duration} / $normalyzed_info{$k}{count}; print $fh "$idx) " . &convert_time($normalyzed_info{$k}{duration}) . " - " . &comma_numbers($normalyzed_info{$k}{count}) . " - " . &convert_time($normalyzed_info{$k}{min}) . "/" . &convert_time($normalyzed_info{$k}{max}) . "/" . &convert_time($normalyzed_info{$k}{average}) . " - $q\n"; print $fh "--\n"; my $i = 1; foreach my $d (sort {$b <=> $a} keys %{$normalyzed_info{$k}{samples}}) { my $db = " - database: $normalyzed_info{$k}{samples}{$d}{db}" if ($normalyzed_info{$k}{samples}{$d}{db}); $db .= ", user: $normalyzed_info{$k}{samples}{$d}{user}" if ($normalyzed_info{$k}{samples}{$d}{user}); $db .= ", remote: $normalyzed_info{$k}{samples}{$d}{remote}" if ($normalyzed_info{$k}{samples}{$d}{remote}); $db .= ", app: $normalyzed_info{$k}{samples}{$d}{app}" if ($normalyzed_info{$k}{samples}{$d}{app}); $db .= ", bind query: yes" if ($normalyzed_info{$k}{samples}{$d}{bind}); $db =~ s/^, / - /; print $fh "\t- Example $i: ", &convert_time($d), "$db - ", $normalyzed_info{$k}{samples}{$d}{query}, "\n"; $i++; } $idx++; } } if (!$disable_query && (scalar keys %normalyzed_info > 0)) { print $fh "\n- Most frequent queries (N) --------------------------------------------\n\n"; print $fh "Rank Times executed Total duration Min/Max/Avg duration (s) Query\n"; my $idx = 1; foreach my $k (sort {$normalyzed_info{$b}{count} <=> $normalyzed_info{$a}{count}} keys %normalyzed_info) { next if (!$normalyzed_info{$k}{count}); last if ($idx > $top); my $q = $k; if ($normalyzed_info{$k}{count} == 1) { foreach (keys %{$normalyzed_info{$k}{samples}}) { $q = $normalyzed_info{$k}{samples}{$_}{query}; last; } } print $fh "$idx) " . &comma_numbers($normalyzed_info{$k}{count}) . " - " . &convert_time($normalyzed_info{$k}{duration}) . " - " . &convert_time($normalyzed_info{$k}{min}) . "/" . &convert_time($normalyzed_info{$k}{max}) . "/" . &convert_time($normalyzed_info{$k}{duration} / $normalyzed_info{$k}{count}) . " - $q\n"; print $fh "--\n"; my $i = 1; foreach my $d (sort {$b <=> $a} keys %{$normalyzed_info{$k}{samples}}) { my $db = " - database: $normalyzed_info{$k}{samples}{$d}{db}" if ($normalyzed_info{$k}{samples}{$d}{db}); $db .= ", user: $normalyzed_info{$k}{samples}{$d}{user}" if ($normalyzed_info{$k}{samples}{$d}{user}); $db .= ", remote: $normalyzed_info{$k}{samples}{$d}{remote}" if ($normalyzed_info{$k}{samples}{$d}{remote}); $db .= ", app: $normalyzed_info{$k}{samples}{$d}{app}" if ($normalyzed_info{$k}{samples}{$d}{app}); $db .= ", bind query: yes" if ($normalyzed_info{$k}{samples}{$d}{bind}); $db =~ s/^, / - /; print $fh "\tExample $i: ", &convert_time($d), "$db - ", $normalyzed_info{$k}{samples}{$d}{query}, "\n"; $i++; } $idx++; } } if (!$disable_query && ($#top_slowest >= 0)) { print $fh "\n- Slowest queries (N) --------------------------------------------------\n\n"; print $fh "Rank Min/Max/Avg duration (s) Times executed Total duration Query\n"; my $idx = 1; foreach my $k (sort {$normalyzed_info{$b}{average} <=> $normalyzed_info{$a}{average}} keys %normalyzed_info) { next if (!$normalyzed_info{$k}{count}); last if ($idx > $top); my $q = $k; if ($normalyzed_info{$k}{count} == 1) { foreach (keys %{$normalyzed_info{$k}{samples}}) { $q = $normalyzed_info{$k}{samples}{$_}{query}; last; } } print $fh "$idx) " . &convert_time($normalyzed_info{$k}{min}) . "/" . &convert_time($normalyzed_info{$k}{max}) . "/" . &convert_time($normalyzed_info{$k}{average}) . " - " . &comma_numbers($normalyzed_info{$k}{count}) . " - " . &convert_time($normalyzed_info{$k}{duration}) . " - $q\n"; print $fh "--\n"; my $i = 1; foreach my $d (sort {$b <=> $a} keys %{$normalyzed_info{$k}{samples}}) { my $db = " - database: $normalyzed_info{$k}{samples}{$d}{db}" if ($normalyzed_info{$k}{samples}{$d}{db}); $db .= ", user: $normalyzed_info{$k}{samples}{$d}{user}" if ($normalyzed_info{$k}{samples}{$d}{user}); $db .= ", remote: $normalyzed_info{$k}{samples}{$d}{remote}" if ($normalyzed_info{$k}{samples}{$d}{remote}); $db .= ", app: $normalyzed_info{$k}{samples}{$d}{app}" if ($normalyzed_info{$k}{samples}{$d}{app}); $db .= ", bind query: yes" if ($normalyzed_info{$k}{samples}{$d}{yes}); $db =~ s/^, / - /; print $fh "\tExample $i: ", &convert_time($d), "$db - ", $normalyzed_info{$k}{samples}{$d}{query}, "\n"; $i++; } $idx++; } } @top_slowest = (); if (!$disable_error) { &show_error_as_text(); } print $fh "\n\n"; print $fh "Report generated by pgBadger $VERSION ($project_url).\n"; } sub dump_error_as_text { # Global information my $curdate = localtime(time); my $fmt_nlines = &comma_numbers($nlines); my $total_time = timestr($td); $total_time =~ s/^([\.0-9]+) wallclock.*/$1/; $total_time = &convert_time($total_time * 1000); my $logfile_str = $log_files[0]; if ($#log_files > 0) { $logfile_str .= ', ..., ' . $log_files[-1]; } $report_title ||= 'PostgreSQL Log Analyzer'; print $fh qq{ pgBadger :: $report_title - Global information --------------------------------------------------- Generated on $curdate Log file: $logfile_str Parsed $fmt_nlines log entries in $total_time Log start from $overall_stat{'first_log_ts'} to $overall_stat{'last_log_ts'} }; &show_error_as_text(); print $fh "\n\n"; print $fh "Report generated by pgBadger $VERSION ($project_url).\n"; } sub show_error_as_text { return if (scalar keys %error_info == 0); print $fh "\n- Most frequent events (N) ---------------------------------------------\n\n"; my $idx = 1; foreach my $k (sort {$error_info{$b}{count} <=> $error_info{$a}{count}} keys %error_info) { next if (!$error_info{$k}{count}); last if ($idx > $top); if ($error_info{$k}{count} > 1) { my $msg = $k; $msg =~ s/ERROR: (parameter "[^"]+" changed to)/LOG: $1/; $msg =~ s/ERROR: (database system was shut down)/LOG: $1/; $msg =~ s/ERROR: (recovery has paused)/LOG: $1/; $msg =~ s/ERROR: (database system was interrupted while in recovery)/LOG: $1/; print $fh "$idx) " . &comma_numbers($error_info{$k}{count}) . " - $msg\n"; print $fh "--\n"; my $j = 1; for (my $i = 0 ; $i <= $#{$error_info{$k}{date}} ; $i++) { if ( ($error_info{$k}{error}[$i] =~ s/ERROR: (parameter "[^"]+" changed to)/LOG: $1/) || ($error_info{$k}{error}[$i] =~ s/ERROR: (database system was shut down)/LOG: $1/) || ($error_info{$k}{error}[$i] =~ s/ERROR: (database system was interrupted while in recovery)/LOG: $1/) || ($error_info{$k}{error}[$i] =~ s/ERROR: (recovery has paused)/LOG: $1/)) { $logs_type{ERROR}--; $logs_type{LOG}++; } print $fh "\t- Example $j: $error_info{$k}{date}[$i] - $error_info{$k}{error}[$i]\n"; print $fh "\t\tDetail: $error_info{$k}{detail}[$i]\n" if ($error_info{$k}{detail}[$i]); print $fh "\t\tContext: $error_info{$k}{context}[$i]\n" if ($error_info{$k}{context}[$i]); print $fh "\t\tHint: $error_info{$k}{hint}[$i]\n" if ($error_info{$k}{hint}[$i]); print $fh "\t\tStatement: $error_info{$k}{statement}[$i]\n" if ($error_info{$k}{statement}[$i]); print $fh "\t\tDatabase: $error_info{$k}{db}[$i]\n" if ($error_info{$k}{db}[$i]); $j++; } } else { if ( ($error_info{$k}{error}[0] =~ s/ERROR: (parameter "[^"]+" changed to)/LOG: $1/) || ($error_info{$k}{error}[0] =~ s/ERROR: (database system was shut down)/LOG: $1/) || ($error_info{$k}{error}[0] =~ s/ERROR: (database system was interrupted while in recovery)/LOG: $1/) || ($error_info{$k}{error}[0] =~ s/ERROR: (recovery has paused)/LOG: $1/)) { $logs_type{ERROR}--; $logs_type{LOG}++; } print $fh "$idx) " . &comma_numbers($error_info{$k}{count}) . " - $error_info{$k}{error}[0]\n"; print $fh "--\n"; print $fh "\t- Date: $error_info{$k}{date}[0]\n"; print $fh "\t\tDetail: $error_info{$k}{detail}[0]\n" if ($error_info{$k}{detail}[0]); print $fh "\t\tContext: $error_info{$k}{context}[0]\n" if ($error_info{$k}{context}[0]); print $fh "\t\tHint: $error_info{$k}{hint}[0]\n" if ($error_info{$k}{hint}[0]); print $fh "\t\tStatement: $error_info{$k}{statement}[0]\n" if ($error_info{$k}{statement}[0]); print $fh "\t\tDatabase: $error_info{$k}{db}[0]\n" if ($error_info{$k}{db}[0]); } $idx++; } if (scalar keys %logs_type > 0) { print $fh "\n- Logs per type ---------------------------------------------\n\n"; my $total_logs = 0; foreach my $d (keys %logs_type) { $total_logs += $logs_type{$d}; } print $fh "Logs type Count Percentage\n"; foreach my $d (sort keys %logs_type) { next if (!$logs_type{$d}); print $fh "$d\t\t", &comma_numbers($logs_type{$d}), "\t", sprintf("%0.2f", ($logs_type{$d} * 100) / $total_logs), "%\n"; } } } sub html_header { my $uri = shift; my $date = localtime(time); my $global_info = &print_global_information(); my @tmpjscode = @jscode; map { s/EDIT_URI/$uri/; } @tmpjscode; my $local_title = 'PostgreSQL Log Analyzer'; if ($report_title) { $local_title = $report_title; } $report_title ||= 'pgBadger'; print $fh qq{ pgBadger :: $local_title @tmpjscode


    }; } sub html_footer { print $fh qq{
}; } # Create global information section sub print_global_information { my $curdate = localtime(time); my $fmt_nlines = &comma_numbers($nlines); my $total_time = timestr($td); $total_time =~ s/^([\.0-9]+) wallclock.*/$1/; $total_time = &convert_time($total_time * 1000); my $logfile_str = $log_files[0]; if ($#log_files > 0) { $logfile_str .= ', ..., ' . $log_files[-1]; } return qq{
  • Generated on $curdate
  • Log file: $logfile_str
  • Parsed $fmt_nlines log entries in $total_time
  • Log start from $overall_stat{'first_log_ts'} to $overall_stat{'last_log_ts'}
}; } sub print_overall_statistics { my $fmt_unique = &comma_numbers(scalar keys %normalyzed_info); my $fmt_queries = &comma_numbers($overall_stat{'queries_number'}); my $fmt_duration = &convert_time($overall_stat{'queries_duration'}); $overall_stat{'first_query_ts'} ||= '-'; $overall_stat{'last_query_ts'} ||= '-'; my $query_peak = 0; my $query_peak_date = ''; foreach (sort {$overall_stat{'peak'}{$b}{query} <=> $overall_stat{'peak'}{$a}{query}} keys %{$overall_stat{'peak'}}) { $query_peak = &comma_numbers($overall_stat{'peak'}{$_}{query}); $query_peak_date = $_; last; } my $avg_queries = &comma_numbers(int($overall_stat{'queries_number'}/($session_info{count} || 1))); my $avg_duration = &convert_time(int($overall_stat{'queries_duration'}/($session_info{count} || 1))); my $fmt_errors = &comma_numbers($overall_stat{'errors_number'}); my $fmt_unique_error = &comma_numbers(scalar keys %error_info); my $autovacuum_count = &comma_numbers($autovacuum_info{count}); my $autoanalyze_count = &comma_numbers($autoanalyze_info{count}); my $tempfile_count = &comma_numbers($tempfile_info{count}); my $cancelled_count = &comma_numbers($cancelled_info{count}); my $fmt_temp_maxsise = &comma_numbers($tempfile_info{maxsize}); my $fmt_temp_avsize = &comma_numbers(sprintf("%.2f", $tempfile_info{size} / ($tempfile_info{count} || 1))); my $session_count = &comma_numbers($session_info{count}); my $avg_session_duration = &convert_time($session_info{duration} / ($session_info{count} || 1)); my $tot_session_duration = &convert_time($session_info{duration}); my $connection_count = &comma_numbers($connection_info{count}); my $connection_peak = 0; my $connection_peak_date = ''; my $session_peak = 0; my $session_peak_date = ''; foreach (sort {$overall_stat{'peak'}{$b}{connection} <=> $overall_stat{'peak'}{$a}{connection}} keys %{$overall_stat{'peak'}}) { $connection_peak = &comma_numbers($overall_stat{'peak'}{$_}{connection}); $connection_peak_date = $_; last; } foreach (sort {$overall_stat{'peak'}{$b}{session} <=> $overall_stat{'peak'}{$a}{session}} keys %{$overall_stat{'peak'}}) { $session_peak = &comma_numbers($overall_stat{'peak'}{$_}{session}); $session_peak_date = $_; last; } my $main_error = 0; my $total = 0; foreach my $k (sort {$error_info{$b}{count} <=> $error_info{$a}{count}} keys %error_info) { next if (!$error_info{$k}{count}); $main_error = &comma_numbers($error_info{$k}{count}) if (!$main_error); $total += $error_info{$k}{count}; } $total = &comma_numbers($total); my $db_count = scalar keys %database_info; print $fh qq{

Overview

Global Stats

  • $fmt_unique Number of unique normalized queries
  • $fmt_queries Number of queries
  • $fmt_duration Total query duration
  • $overall_stat{'first_query_ts'} First query
  • $overall_stat{'last_query_ts'} Last query
  • $query_peak queries/s at $query_peak_date Query peak
  • $fmt_errors Number of events
  • $fmt_unique_error Number of unique normalized events
  • $main_error Max number of times the same event was reported
  • $cancelled_count Number of cancellation
  • $autovacuum_count Total number of automatic vacuums
  • $autoanalyze_count Total number of automatic analyzes
  • $tempfile_count Number temporary file
  • $fmt_temp_maxsise Max size of temporary file
  • $fmt_temp_avsize Average size of temporary file
  • $session_count Total number of sessions
  • $session_peak sessions at $session_peak_date Session peak
  • $tot_session_duration Total duration of sessions
  • $avg_session_duration Average duration of sessions
  • $avg_queries Average queries per session
  • $avg_duration Average queries duration per session
  • $connection_count Total number of connections
  • }; if ($connection_count) { print $fh qq{
  • $connection_peak connections/s at $connection_peak_date Connection peak
  • }; } print $fh qq{
  • $db_count Total number of databases
}; } sub print_general_activity { my $queries = ''; my $select_queries = ''; my $write_queries = ''; my $prepared_queries = ''; my $connections = ''; my $sessions = ''; foreach my $d (sort {$a <=> $b} keys %per_minute_info) { my $c = 1; $d =~ /^\d{4}(\d{2})(\d{2})$/; my $zday = "$abbr_month{$1} $2"; foreach my $h (sort {$a <=> $b} keys %{$per_minute_info{$d}}) { my %cur_period_info = (); my $write_average_duration = 0; my $write_average_count = 0; my %all_query_duration=(); foreach my $m (keys %{$per_minute_info{$d}{$h}}) { $cur_period_info{count} += ($per_minute_info{$d}{$h}{$m}{query}{count} || 0); $cur_period_info{duration} += ($per_minute_info{$d}{$h}{$m}{query}{duration} || 0); $cur_period_info{min} = $per_minute_info{$d}{$h}{$m}{query}{min} if (!exists $cur_period_info{min} || ($per_minute_info{$d}{$h}{$m}{query}{min} < $cur_period_info{min})); $cur_period_info{max} = $per_minute_info{$d}{$h}{$m}{query}{max} if (!exists $cur_period_info{max} || ($per_minute_info{$d}{$h}{$m}{query}{max} > $cur_period_info{max})); push(@{$all_query_duration{'query'}}, $per_minute_info{$d}{$h}{$m}{query}{duration}||0); foreach my $a (@SQL_ACTION) { $cur_period_info{$a}{count} += ($per_minute_info{$d}{$h}{$m}{$a}{count} || 0); $cur_period_info{$a}{duration} += ($per_minute_info{$d}{$h}{$m}{$a}{duration} || 0); push(@{$all_query_duration{$a}}, $per_minute_info{$d}{$h}{$m}{$a}{duration}||0); $cur_period_info{usual} += ($per_minute_info{$d}{$h}{$m}{$a}{count} || 0); } $cur_period_info{prepare} += ($per_minute_info{$d}{$h}{$m}{prepare} || 0); $cur_period_info{execute} += ($per_minute_info{$d}{$h}{$m}{execute} || 0); } $cur_period_info{average} = $cur_period_info{duration} / ($cur_period_info{count} || 1); $cur_period_info{'SELECT'}{average} = $cur_period_info{'SELECT'}{duration} / ($cur_period_info{'SELECT'}{count} || 1); $write_average_duration = ($cur_period_info{'INSERT'}{duration} + $cur_period_info{'UPDATE'}{duration} + $cur_period_info{'DELETE'}{duration}); $write_average_count = ($cur_period_info{'INSERT'}{count} + $cur_period_info{'UPDATE'}{count} + $cur_period_info{'DELETE'}{count}); $zday = " " if ($c > 1); $c++; my $count = &comma_numbers($cur_period_info{count}); my $min = &convert_time($cur_period_info{min}); my $max = &convert_time($cur_period_info{max}); my $average = &convert_time($cur_period_info{average}); my %percentile = (); foreach my $lp (@LATENCY_PERCENTILE) { $cur_period_info{$lp}{percentileindex} = int(@{$all_query_duration{'query'}} * $lp / 100) ; @{$all_query_duration{'query'}}= sort{ $a <=> $b } @{$all_query_duration{'query'}}; $cur_period_info{$lp}{percentile} = $all_query_duration{'query'}[$cur_period_info{$lp}{percentileindex}]; $percentile{$lp} = &convert_time($cur_period_info{$lp}{percentile}); $cur_period_info{'SELECT'}{$lp}{percentileindex} = int(@{$all_query_duration{'SELECT'}} * $lp / 100) ; @{$all_query_duration{'SELECT'}}= sort{ $a <=> $b } @{$all_query_duration{'SELECT'}}; $cur_period_info{'SELECT'}{$lp}{percentile} = $all_query_duration{'SELECT'}[$cur_period_info{'SELECT'}{$lp}{percentileindex}]; $percentile{'SELECT'}{$lp} = &convert_time($cur_period_info{'SELECT'}{$lp}{percentile}); @{$all_query_duration{'WRITE'}}= sort{ $a <=> $b } (@{$all_query_duration{'INSERT'}},@{$all_query_duration{'UPDATE'}},@{$all_query_duration{'DELETE'}}); $cur_period_info{'WRITE'}{$lp}{percentileindex} = int(@{$all_query_duration{'WRITE'}} * $lp / 100) ; $cur_period_info{'WRITE'}{$lp}{percentile} = $all_query_duration{'WRITE'}[$cur_period_info{'WRITE'}{$lp}{percentileindex}]; $percentile{'WRITE'}{$lp} = &convert_time($cur_period_info{'WRITE'}{$lp}{percentile}); } $queries .= qq{ $zday $h $count $min $max $average }; foreach my $lp (@LATENCY_PERCENTILE) { $queries .= "$percentile{$lp}\n"; } $queries .= qq{ }; $count = &comma_numbers($cur_period_info{'SELECT'}{count}); $average = &convert_time($cur_period_info{'SELECT'}{average}); $select_queries .= qq{ $zday $h $count $average }; foreach my $lp (@LATENCY_PERCENTILE) { $select_queries .= "$percentile{'SELECT'}{$lp}\n"; } $select_queries .= qq{ }; my $insert_count = &comma_numbers($cur_period_info{'INSERT'}{count}); my $update_count = &comma_numbers($cur_period_info{'UPDATE'}{count}); my $delete_count = &comma_numbers($cur_period_info{'DELETE'}{count}); my $write_average = &convert_time($write_average_duration / ($write_average_count || 1)); $write_queries .= qq{ $zday $h $insert_count $update_count $delete_count $write_average} ; foreach my $lp (@LATENCY_PERCENTILE) { $write_queries .= "$percentile{'WRITE'}{$lp}\n"; } $write_queries .= qq{ }; my $prepare_count = &comma_numbers($cur_period_info{prepare}); my $execute_count = &comma_numbers($cur_period_info{execute}); my $bind_prepare = &comma_numbers(sprintf("%.2f", $cur_period_info{execute}/($cur_period_info{prepare}||1))); my $prepare_usual = &comma_numbers(sprintf("%.2f", ($cur_period_info{prepare}/($cur_period_info{usual}||1)) * 100)) . "%"; $prepared_queries .= qq{ $zday $h $prepare_count $execute_count $bind_prepare $prepare_usual }; $count = &comma_numbers($connection_info{chronos}{"$d"}{"$h"}{count}); $average = &comma_numbers(sprintf("%0.2f", $connection_info{chronos}{"$d"}{"$h"}{count} / 3600)); $connections .= qq{ $zday $h $count $average/s }; $count = &comma_numbers($session_info{chronos}{"$d"}{"$h"}{count}); $cur_period_info{'session'}{average} = $session_info{chronos}{"$d"}{"$h"}{duration} / ($session_info{chronos}{"$d"}{"$h"}{count} || 1); $average = &convert_time($cur_period_info{'session'}{average}); $sessions .= qq{ $zday $h $count $average }; } } # Set default values $queries = qq{$NODATA} if (!$queries); $select_queries = qq{$NODATA} if (!$select_queries); $write_queries = qq{$NODATA} if (!$write_queries); $prepared_queries = qq{$NODATA} if (!$prepared_queries); $connections = qq{$NODATA} if (!$connections); $sessions = qq{$NODATA} if (!$sessions); print $fh qq{

General Activity

$queries
Day Hour Count Min duration Max duration Avg duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99)
$select_queries
Day Hour Count Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99)
$write_queries
Day Hour INSERT UPDATE DELETE Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99)
$prepared_queries
Day Hour Prepare Bind Bind/Prepare Percentage of prepare
$connections
Day Hour Count Average / Second
$sessions
Day Hour Count Average Duration
Back to the top of the General Activity table
}; } sub print_sql_traffic { my $bind_vs_prepared = sprintf("%.2f", $overall_stat{'execute'} / ($overall_stat{'prepare'} || 1)); my $total_usual_queries = 0; map { $total_usual_queries += $overall_stat{$_}; } @SQL_ACTION; my $prepared_vs_normal = sprintf("%.2f", ($overall_stat{'execute'} / ($total_usual_queries || 1))*100); my $query_peak = 0; my $query_peak_date = ''; foreach (sort {$overall_stat{'peak'}{$b}{query} <=> $overall_stat{'peak'}{$a}{query}} keys %{$overall_stat{'peak'}}) { $query_peak = &comma_numbers($overall_stat{'peak'}{$_}{query}); $query_peak_date = $_; last; } my $select_peak = 0; my $select_peak_date = ''; foreach (sort {$overall_stat{'peak'}{$b}{select} <=> $overall_stat{'peak'}{$a}{select}} keys %{$overall_stat{'peak'}}) { $select_peak = &comma_numbers($overall_stat{'peak'}{$_}{select}); $select_peak_date = $_; last; } my $write_peak = 0; my $write_peak_date = ''; foreach (sort {$overall_stat{'peak'}{$b}{write} <=> $overall_stat{'peak'}{$a}{write}} keys %{$overall_stat{'peak'}}) { $write_peak = &comma_numbers($overall_stat{'peak'}{$_}{write}); $write_peak_date = $_; last; } my $fmt_duration = &convert_time($overall_stat{'queries_duration'}); print $fh qq{

SQL Traffic

Key values

  • $query_peak queries/s Query Peak
  • $query_peak_date Date

Queries per second ($avg_minutes minutes average)

$drawn_graphs{queriespersecond_graph}
}; delete $drawn_graphs{queriespersecond_graph}; print $fh qq{

SELECT Traffic

Key values

  • $select_peak queries/s Query Peak
  • $select_peak_date Date

SELECT queries per second ($avg_minutes minutes average)

$drawn_graphs{selectqueries_graph}
}; delete $drawn_graphs{selectqueries_graph}; print $fh qq{

INSERT/UPDATE/DELETE Traffic

Key values

  • $write_peak queries/s Query Peak
  • $write_peak_date Date

Write queries per second ($avg_minutes minutes average)

$drawn_graphs{writequeries_graph}
}; delete $drawn_graphs{writequeries_graph}; print $fh qq{

Queries duration

Key values

  • $fmt_duration Total query duration

Average queries duration ($avg_minutes minutes average)

$drawn_graphs{durationqueries_graph}
}; delete $drawn_graphs{durationqueries_graph}; print $fh qq{

Prepared queries ratio

Key values

  • $bind_vs_prepared Ratio of bind vs prepare
  • $prepared_vs_normal % Ratio between prepared and "usual" statements

Ratio of bind vs prepare statements ($avg_minutes minutes average)

$drawn_graphs{bindpreparequeries_graph}
}; delete $drawn_graphs{bindpreparequeries_graph}; } sub compute_query_graphs { my %graph_data = (); if ($graph) { foreach my $tm (sort {$a <=> $b} keys %per_minute_info) { $tm =~ /(\d{4})(\d{2})(\d{2})/; my $y = $1 - 1900; my $mo = $2 - 1; my $d = $3; foreach my $h ("00" .. "23") { next if (!exists $per_minute_info{$tm}{$h}); my %q_dataavg = (); my %a_dataavg = (); my %c_dataavg = (); my %s_dataavg = (); my %p_dataavg = (); foreach my $m ("00" .. "59") { next if (!exists $per_minute_info{$tm}{$h}{$m}); my $rd = &average_per_minutes($m, $avg_minutes); if (!exists $p_dataavg{prepare}{"$rd"}) { $p_dataavg{prepare}{"$rd"} = 0; $p_dataavg{execute}{"$rd"} = 0; $q_dataavg{count}{"$rd"} = 0; $q_dataavg{duration}{"$rd"} = 0; $q_dataavg{max}{"$rd"} = 0; $q_dataavg{min}{"$rd"} = 0; if (!$disable_query) { foreach my $action (@SQL_ACTION) { $a_dataavg{$action}{count}{"$rd"} = 0; $a_dataavg{$action}{duration}{"$rd"} = 0; $a_dataavg{$action}{max}{"$rd"} = 0; $a_dataavg{$action}{min}{"$rd"} = 0; } $a_dataavg{write}{count}{"$rd"} = 0; $a_dataavg{write}{duration}{"$rd"} = 0; } $c_dataavg{average}{"$rd"} = 0; $c_dataavg{max}{"$rd"} = 0; $c_dataavg{min}{"$rd"} = 0; $s_dataavg{average}{"$rd"} = 0; $s_dataavg{max}{"$rd"} = 0; $s_dataavg{min}{"$rd"} = 0; } if (exists $per_minute_info{$tm}{$h}{$m}{prepare}) { $p_dataavg{prepare}{"$rd"} += $per_minute_info{$tm}{$h}{$m}{prepare}; } elsif (exists $per_minute_info{$tm}{$h}{$m}{parse}) { $p_dataavg{prepare}{"$rd"} += $per_minute_info{$tm}{$h}{$m}{parse}; } $p_dataavg{execute}{"$rd"} += $per_minute_info{$tm}{$h}{$m}{execute} if (exists $per_minute_info{$tm}{$h}{$m}{execute}); if (exists $per_minute_info{$tm}{$h}{$m}{query}) { # Average per minute $q_dataavg{count}{"$rd"} += $per_minute_info{$tm}{$h}{$m}{query}{count}; if (exists $per_minute_info{$tm}{$h}{$m}{query}{duration}) { $q_dataavg{duration}{"$rd"} += $per_minute_info{$tm}{$h}{$m}{query}{duration}; } # Search minimum and maximum during this minute foreach my $s (keys %{$per_minute_info{$tm}{$h}{$m}{query}{second}}) { $q_dataavg{max}{"$rd"} = $per_minute_info{$tm}{$h}{$m}{query}{second}{$s} if ($per_minute_info{$tm}{$h}{$m}{query}{second}{$s} > $q_dataavg{max}{"$rd"}); $q_dataavg{min}{"$rd"} = $per_minute_info{$tm}{$h}{$m}{query}{second}{$s} if ($per_minute_info{$tm}{$h}{$m}{query}{second}{$s} < $q_dataavg{min}{"$rd"}); } if (!$disable_query) { foreach my $action (@SQL_ACTION) { $a_dataavg{$action}{count}{"$rd"} += ($per_minute_info{$tm}{$h}{$m}{$action}{count} || 0); $a_dataavg{$action}{duration}{"$rd"} += ($per_minute_info{$tm}{$h}{$m}{$action}{duration} || 0); if ( ($action ne 'SELECT') && exists $per_minute_info{$tm}{$h}{$m}{$action}{count}) { $a_dataavg{write}{count}{"$rd"} += ($per_minute_info{$tm}{$h}{$m}{$action}{count} || 0); $a_dataavg{write}{duration}{"$rd"} += ($per_minute_info{$tm}{$h}{$m}{$action}{duration} || 0); } # Search minimum and maximum during this minute foreach my $s (keys %{$per_minute_info{$tm}{$h}{$m}{$action}{second}}) { $a_dataavg{$action}{max}{"$rd"} = $per_minute_info{$tm}{$h}{$m}{$action}{second}{$s} if ($per_minute_info{$tm}{$h}{$m}{$action}{second}{$s} > $a_dataavg{$action}{max}{"$rd"}); $a_dataavg{$action}{min}{"$rd"} = $per_minute_info{$tm}{$h}{$m}{$action}{second}{$s} if ($per_minute_info{$tm}{$h}{$m}{$action}{second}{$s} < $a_dataavg{$action}{min}{"$rd"}); } } } } if (exists $per_minute_info{$tm}{$h}{$m}{connection}) { # Average per minute $c_dataavg{average}{"$rd"} += $per_minute_info{$tm}{$h}{$m}{connection}{count}; # Search minimum and maximum during this minute foreach my $s (keys %{$per_minute_info{$tm}{$h}{$m}{connection}{second}}) { $c_dataavg{max}{"$rd"} = $per_minute_info{$tm}{$h}{$m}{connection}{second}{$s} if ($per_minute_info{$tm}{$h}{$m}{connection}{second}{$s} > $c_dataavg{max}{"$rd"}); $c_dataavg{min}{"$rd"} = $per_minute_info{$tm}{$h}{$m}{connection}{second}{$s} if ($per_minute_info{$tm}{$h}{$m}{connection}{second}{$s} < $c_dataavg{min}{"$rd"}); } delete $per_minute_info{$tm}{$h}{$m}{connection}; } if (exists $per_minute_info{$tm}{$h}{$m}{session}) { # Average per minute $s_dataavg{average}{"$rd"} += $per_minute_info{$tm}{$h}{$m}{session}{count}; # Search minimum and maximum during this minute foreach my $s (keys %{$per_minute_info{$tm}{$h}{$m}{session}{second}}) { $s_dataavg{max}{"$rd"} = $per_minute_info{$tm}{$h}{$m}{session}{second}{$s} if ($per_minute_info{$tm}{$h}{$m}{session}{second}{$s} > $s_dataavg{max}{"$rd"}); $s_dataavg{min}{"$rd"} = $per_minute_info{$tm}{$h}{$m}{session}{second}{$s} if ($per_minute_info{$tm}{$h}{$m}{session}{second}{$s} < $s_dataavg{min}{"$rd"}); } delete $per_minute_info{$tm}{$h}{$m}{session}; } } foreach my $rd (@avgs) { my $t = timegm_nocheck(0, $rd, $h, $d, $mo, $y) * 1000; next if ($t < $t_min); last if ($t > $t_max); if (exists $q_dataavg{count}) { # Average queries per minute $graph_data{query} .= "[$t, " . int(($q_dataavg{count}{"$rd"} || 0) / (60 * $avg_minutes)) . "],"; # Max queries per minute $graph_data{'query-max'} .= "[$t, " . ($q_dataavg{max}{"$rd"} || 0) . "],"; # Min queries per minute $graph_data{'query-min'} .= "[$t, " . ($q_dataavg{min}{"$rd"} || 0) . "],"; # Average duration per minute $graph_data{query4} .= "[$t, " . sprintf("%.3f", ($q_dataavg{duration}{"$rd"} || 0) / ($q_dataavg{count}{"$rd"} || 1)) . "],"; } if (scalar keys %c_dataavg) { # Average connections per minute $graph_data{conn_avg} .= "[$t, " . int(($c_dataavg{average}{"$rd"} || 0) / (60 * $avg_minutes)) . "],"; # Max connections per minute $graph_data{conn_max} .= "[$t, " . ($c_dataavg{max}{"$rd"} || 0) . "],"; # Min connections per minute $graph_data{conn_min} .= "[$t, " . ($c_dataavg{min}{"$rd"} || 0) . "],"; } if (scalar keys %s_dataavg) { # Average connections per minute $graph_data{sess_avg} .= "[$t, " . int(($s_dataavg{average}{"$rd"} || 0) / (60 * $avg_minutes)) . "],"; # Max connections per minute $graph_data{sess_max} .= "[$t, " . ($s_dataavg{max}{"$rd"} || 0) . "],"; # Min connections per minute $graph_data{sess_min} .= "[$t, " . ($s_dataavg{min}{"$rd"} || 0) . "],"; } if (!$disable_query && (scalar keys %a_dataavg > 0)) { foreach my $action (@SQL_ACTION) { next if ($select_only && ($action ne 'SELECT')); # Average queries per minute $graph_data{"$action"} .= "[$t, " . int(($a_dataavg{$action}{count}{"$rd"} || 0) / (60 * $avg_minutes)) . "],"; if ($action eq 'SELECT') { # Max queries per minute $graph_data{"$action-max"} .= "[$t, " . ($a_dataavg{$action}{max}{"$rd"} || 0) . "],"; # Min queries per minute $graph_data{"$action-min"} .= "[$t, " . ($a_dataavg{$action}{min}{"$rd"} || 0) . "],"; # Average query duration $graph_data{"$action-2"} .= "[$t, " . sprintf("%.3f", ($a_dataavg{$action}{duration}{"$rd"} || 0) / ($a_dataavg{$action}{count}{"$rd"} || 1)) . "],"; } else { # Average query duration $graph_data{"write"} .= "[$t, " . sprintf("%.3f", ($a_dataavg{write}{duration}{"$rd"} || 0) / ($a_dataavg{write}{count}{"$rd"} || 1)) . "],"; } } } if (!$disable_query && (scalar keys %p_dataavg> 0)) { $graph_data{prepare} .= "[$t, " . ($p_dataavg{prepare}{"$rd"} || 0) . "],"; $graph_data{execute} .= "[$t, " . ($p_dataavg{execute}{"$rd"} || 0) . "],"; $graph_data{ratio_bind_prepare} .= "[$t, " . sprintf("%.2f", ($p_dataavg{execute}{"$rd"} || 0) / ($p_dataavg{prepare}{"$rd"} || 1)) . "],"; } } } } foreach (keys %graph_data) { $graph_data{$_} =~ s/,$//; } } $drawn_graphs{'queriespersecond_graph'} = &flotr2_graph( $graphid++, 'queriespersecond_graph', $graph_data{'query-max'}, $graph_data{query}, $graph_data{'query-min'}, 'Queries per second (' . $avg_minutes . ' minutes average)', 'Queries per second', 'Maximum', 'Average', 'Minimum' ); $drawn_graphs{'connectionspersecond_graph'} = &flotr2_graph( $graphid++, 'connectionspersecond_graph', $graph_data{conn_max}, $graph_data{conn_avg}, $graph_data{conn_min}, 'Connections per second (' . $avg_minutes . ' minutes average)', 'Connections per second', 'Maximum', 'Average', 'Minimum' ); $drawn_graphs{'sessionspersecond_graph'} = &flotr2_graph( $graphid++, 'sessionspersecond_graph', $graph_data{sess_max}, $graph_data{sess_avg}, $graph_data{sess_min}, 'Number of sessions (' . $avg_minutes . ' minutes average)', 'Sessions', 'Maximum', 'Average', 'Minimum' ); $drawn_graphs{'selectqueries_graph'} = &flotr2_graph( $graphid++, 'selectqueries_graph', $graph_data{"SELECT-max"}, $graph_data{"SELECT"}, $graph_data{"SELECT-min"}, 'SELECT queries (' . $avg_minutes . ' minutes period)', 'Queries per second', 'Maximum', 'Average', 'Minimum' ); $drawn_graphs{'writequeries_graph'} = &flotr2_graph( $graphid++, 'writequeries_graph', $graph_data{"DELETE"}, $graph_data{"INSERT"}, $graph_data{"UPDATE"}, 'Write queries (' . $avg_minutes . ' minutes period)', 'Queries', 'DELETE queries', 'INSERT queries', 'UPDATE queries' ); if (!$select_only) { $drawn_graphs{'durationqueries_graph'} = &flotr2_graph( $graphid++, 'durationqueries_graph', $graph_data{query4}, $graph_data{"SELECT-2"}, $graph_data{write}, 'Average queries duration (' . $avg_minutes . ' minutes average)', 'Duration', 'All queries', 'Select queries', 'Write queries' ); } else { $drawn_graphs{'durationqueries_graph'} = &flotr2_graph( $graphid++, 'durationqueries_graph', $graph_data{query4}, '', '', 'Average queries duration (' . $avg_minutes . ' minutes average)', 'Duration', 'Select queries' ); } $drawn_graphs{'bindpreparequeries_graph'} = &flotr2_graph( $graphid++, 'bindpreparequeries_graph', $graph_data{prepare}, $graph_data{"execute"}, $graph_data{ratio_bind_prepare}, 'Bind versus prepare statements (' . $avg_minutes . ' minutes average)', 'Number of statements', 'Prepare/Parse', 'Execute/Bind', 'Bind vs prepare' ); } sub print_established_connection { my $connection_peak = 0; my $connection_peak_date = ''; foreach (sort {$overall_stat{'peak'}{$b}{connection} <=> $overall_stat{'peak'}{$a}{connection}} keys %{$overall_stat{'peak'}}) { $connection_peak = &comma_numbers($overall_stat{'peak'}{$_}{connection}); $connection_peak_date = $_; last; } print $fh qq{

Established Connections

Key values

  • $connection_peak connections Connection Peak
  • $connection_peak_date Date

Connections per second ($avg_minutes minutes average)

$drawn_graphs{connectionspersecond_graph}
}; delete $drawn_graphs{connectionspersecond_graph}; } sub print_user_connection { my %infos = (); my $total_count = 0; my $c = 0; my $conn_user_info = ''; my @main_user = ('unknown',0); foreach my $u (sort keys %{$connection_info{user}}) { $conn_user_info .= "$u" . &comma_numbers($connection_info{user}{$u}) . ""; $total_count += $connection_info{user}{$u}; if ($main_user[1] < $connection_info{user}{$u}) { $main_user[0] = $u; $main_user[1] = $connection_info{user}{$u}; } } if ($graph) { my @small = (); foreach my $d (sort keys %{$connection_info{user}}) { if ((($connection_info{user}{$d} * 100) / ($total_count||1)) > $pie_percentage_limit) { $infos{$d} = $connection_info{user}{$d} || 0; } else { $infos{"Sum connections < $pie_percentage_limit%"} += $connection_info{user}{$d} || 0; push(@small, $d); } } if ($#small == 0) { $infos{$small[0]} = $infos{"Sum connections < $pie_percentage_limit%"}; delete $infos{"Sum connections < $pie_percentage_limit%"}; } } $drawn_graphs{userconnections_graph} = &flotr2_piegraph($graphid++, 'graph_userconnections', 'Connections per user', %infos); $total_count = &comma_numbers($total_count); print $fh qq{

Connections per user

Key values

  • $main_user[0] Main User
  • $total_count connections Total
$drawn_graphs{userconnections_graph}
$conn_user_info
User Count
}; delete $drawn_graphs{userconnections_graph}; } sub print_host_connection { my %infos = (); my $total_count = 0; my $c = 0; my $conn_host_info = ''; my @main_host = ('unknown',0); foreach my $h (sort keys %{$connection_info{host}}) { $conn_host_info .= "$h" . &comma_numbers($connection_info{host}{$h}) . ""; $total_count += $connection_info{host}{$h}; if ($main_host[1] < $connection_info{host}{$h}) { $main_host[0] = $h; $main_host[1] = $connection_info{host}{$h}; } } if ($graph) { my @small = (); foreach my $d (sort keys %{$connection_info{host}}) { if ((($connection_info{host}{$d} * 100) / ($total_count||1)) > $pie_percentage_limit) { $infos{$d} = $connection_info{host}{$d} || 0; } else { $infos{"Sum connections < $pie_percentage_limit%"} += $connection_info{host}{$d} || 0; push(@small, $d); } } if ($#small == 0) { $infos{$small[0]} = $infos{"Sum connections < $pie_percentage_limit%"}; delete $infos{"Sum connections < $pie_percentage_limit%"}; } } $drawn_graphs{hostconnections_graph} = &flotr2_piegraph($graphid++, 'graph_hostconnections', 'Connections per host', %infos); $total_count = &comma_numbers($total_count); print $fh qq{

Connections per host

Key values

  • $main_host[0] Main host with $main_host[1] connections
  • $total_count Total connections
$drawn_graphs{hostconnections_graph}
$conn_host_info
Host Count
}; delete $drawn_graphs{hostconnections_graph}; } sub print_database_connection { my %infos = (); my $total_count = 0; my $conn_database_info = ''; my @main_database = ('unknown',0); foreach my $d (sort keys %{$connection_info{database}}) { $conn_database_info .= "$d " . &comma_numbers($connection_info{database}{$d}) . ""; $total_count += $connection_info{database}{$d}; if ($main_database[1] < $connection_info{database}{$d}) { $main_database[0] = $d; $main_database[1] = $connection_info{database}{$d}; } foreach my $u (sort keys %{$connection_info{user}}) { next if (!exists $connection_info{database_user}{$d}{$u}); $conn_database_info .= " $u" . &comma_numbers($connection_info{database_user}{$d}{$u}) . ""; } } if ($graph) { my @small = (); foreach my $d (sort keys %{$connection_info{database}}) { if ((($connection_info{database}{$d} * 100) / ($total_count||1)) > $pie_percentage_limit) { $infos{$d} = $connection_info{database}{$d} || 0; } else { $infos{"Sum connections < $pie_percentage_limit%"} += $connection_info{database}{$d} || 0; push(@small, $d); } } if ($#small == 0) { $infos{$small[0]} = $infos{"Sum connections < $pie_percentage_limit%"}; delete $infos{"Sum connections < $pie_percentage_limit%"}; } } $drawn_graphs{databaseconnections_graph} = &flotr2_piegraph($graphid++, 'graph_databaseconnections', 'Connections per database', %infos); $total_count = &comma_numbers($total_count); print $fh qq{

Connections per database

Key values

  • $main_database[0] Main Database
  • $total_count connections Total
$drawn_graphs{databaseconnections_graph}
$conn_database_info
Database User Count
}; delete $drawn_graphs{databaseconnections_graph}; } sub print_simultaneous_session { my $session_peak = 0; my $session_peak_date = ''; foreach (sort {$overall_stat{'peak'}{$b}{session} <=> $overall_stat{'peak'}{$a}{session}} keys %{$overall_stat{'peak'}}) { $session_peak = &comma_numbers($overall_stat{'peak'}{$_}{session}); $session_peak_date = $_; last; } print $fh qq{

Simultaneous sessions

Key values

  • $session_peak sessions Session Peak
  • $session_peak_date Date

Number of sessions ($avg_minutes minutes average)

$drawn_graphs{sessionspersecond_graph}
}; delete $drawn_graphs{sessionspersecond_graph}; } sub print_histogram_session_times { my %data = (); my $histogram_info = ''; my $most_range = ''; my $most_range_value = ''; for (my $i = 1; $i <= $#histogram_session_time; $i++) { $histogram_info .= "" . &convert_time($histogram_session_time[$i-1]) . '-' . &convert_time($histogram_session_time[$i]) . "" . &comma_numbers($overall_stat{histogram}{session_time}{$histogram_session_time[$i-1]}) . "" . sprintf("%0.2f", ($overall_stat{histogram}{session_time}{$histogram_session_time[$i-1]} * 100) / ($overall_stat{histogram}{session_total}||1)) . "%"; $data{"$histogram_session_time[$i-1]-$histogram_session_time[$i]ms"} = ($overall_stat{histogram}{session_time}{$histogram_session_time[$i-1]} || 0); if ($overall_stat{histogram}{session_time}{$histogram_session_time[$i-1]} > $most_range_value) { $most_range = "$histogram_session_time[$i-1]-$histogram_session_time[$i]ms"; $most_range_value = $overall_stat{histogram}{session_time}{$histogram_session_time[$i-1]}; } } if ($overall_stat{histogram}{session_total} > 0) { $histogram_info .= " > " . &convert_time($histogram_session_time[-1]) . "" . &comma_numbers($overall_stat{histogram}{session_time}{'-1'}) . "" . sprintf("%0.2f", ($overall_stat{histogram}{session_time}{'-1'} * 100) / ($overall_stat{histogram}{session_total}||1)) . "%"; $data{"> $histogram_session_time[-1]ms"} = ($overall_stat{histogram}{session_time}{"-1"} || 0); if ($overall_stat{histogram}{session_time}{"-1"} > $most_range_value) { $most_range = "> $histogram_session_time[-1]ms"; $most_range_value = $overall_stat{histogram}{session_time}{"-1"}; } } else { $histogram_info = qq{$NODATA}; } $drawn_graphs{histogram_session_times_graph} = &flotr2_duration_histograph($graphid++, 'graph_histogram_session_times', 'Queries', \@histogram_session_time, %data); $most_range_value = &comma_numbers($most_range_value) if ($most_range_value); print $fh qq{

Top Queries

Histogram of session times

Key values

  • $most_range_value $most_range duration
$drawn_graphs{histogram_session_times_graph}
$histogram_info
Range Count Percentage
}; delete $drawn_graphs{histogram_session_times_graph}; } sub print_user_session { my %infos = (); my $total_count = 0; my $c = 0; my $sess_user_info = ''; my @main_user = ('unknown',0); foreach my $u (sort keys %{$session_info{user}}) { $sess_user_info .= "$u" . &comma_numbers($session_info{user}{$u}{count}) . "" . &convert_time($session_info{user}{$u}{duration}), "" . &convert_time($session_info{user}{$u}{duration} / $session_info{user}{$u}{count}) . ""; $total_count += $session_info{user}{$u}{count}; if ($main_user[1] < $session_info{user}{$u}{count}) { $main_user[0] = $u; $main_user[1] = $session_info{user}{$u}{count}; } } if ($graph) { my @small = (); foreach my $d (sort keys %{$session_info{user}}) { if ((($session_info{user}{$d}{count} * 100) / ($total_count||1)) > $pie_percentage_limit) { $infos{$d} = $session_info{user}{$d}{count} || 0; } else { $infos{"Sum sessions < $pie_percentage_limit%"} += $session_info{user}{$d}{count} || 0; push(@small, $d); } } if ($#small == 0) { $infos{$small[0]} = $infos{"Sum sessions < $pie_percentage_limit%"}; delete $infos{"Sum sessions < $pie_percentage_limit%"}; } } $drawn_graphs{usersessions_graph} = &flotr2_piegraph($graphid++, 'graph_usersessions', 'Connections per user', %infos); $sess_user_info = qq{$NODATA} if (!$total_count); $total_count = &comma_numbers($total_count); print $fh qq{

Sessions per user

Key values

  • $main_user[0] Main User
  • $total_count sessions Total
$drawn_graphs{usersessions_graph}
$sess_user_info
User Count Total Duration Average Duration
}; delete $drawn_graphs{usersessions_graph}; } sub print_host_session { my %infos = (); my $total_count = 0; my $c = 0; my $sess_host_info = ''; my @main_host = ('unknown',0); foreach my $h (sort keys %{$session_info{host}}) { $sess_host_info .= "$h" . &comma_numbers($session_info{host}{$h}{count}) . "" . &convert_time($session_info{host}{$h}{duration}) . "" . &convert_time($session_info{host}{$h}{duration} / $session_info{host}{$h}{count}) . ""; $total_count += $session_info{host}{$h}{count}; if ($main_host[1] < $session_info{host}{$h}{count}) { $main_host[0] = $h; $main_host[1] = $session_info{host}{$h}{count}; } } if ($graph) { my @small = (); foreach my $d (sort keys %{$session_info{host}}) { if ((($session_info{host}{$d}{count} * 100) / ($total_count||1)) > $pie_percentage_limit) { $infos{$d} = $session_info{host}{$d}{count} || 0; } else { $infos{"Sum sessions < $pie_percentage_limit%"} += $session_info{host}{$d}{count} || 0; push(@small, $d); } } if ($#small == 0) { $infos{$small[0]} = $infos{"Sum sessions < $pie_percentage_limit%"}; delete $infos{"Sum sessions < $pie_percentage_limit%"}; } } $drawn_graphs{hostsessions_graph} = &flotr2_piegraph($graphid++, 'graph_hostsessions', 'Connections per host', %infos); $sess_host_info = qq{$NODATA} if (!$total_count); $total_count = &comma_numbers($total_count); print $fh qq{

Sessions per host

Key values

  • $main_host[0] Main Host
  • $total_count sessions Total
$drawn_graphs{hostsessions_graph}
$sess_host_info
Host Count Total Duration Average Duration
}; delete $drawn_graphs{hostsessions_graph}; } sub print_app_session { my %infos = (); my $total_count = 0; my $c = 0; my $sess_app_info = ''; my @main_app = ('unknown',0); foreach my $h (sort keys %{$session_info{app}}) { $sess_app_info .= "$h" . &comma_numbers($session_info{app}{$h}{count}) . "" . &convert_time($session_info{app}{$h}{duration}) . "" . &convert_time($session_info{app}{$h}{duration} / $session_info{app}{$h}{count}) . ""; $total_count += $session_info{app}{$h}{count}; if ($main_app[1] < $session_info{app}{$h}{count}) { $main_app[0] = $h; $main_app[1] = $session_info{app}{$h}{count}; } } if ($graph) { my @small = (); foreach my $d (sort keys %{$session_info{app}}) { if ((($session_info{app}{$d}{count} * 100) / ($total_count||1)) > $pie_percentage_limit) { $infos{$d} = $session_info{app}{$d}{count} || 0; } else { $infos{"Sum sessions < $pie_percentage_limit%"} += $session_info{app}{$d}{count} || 0; push(@small, $d); } } if ($#small == 0) { $infos{$small[0]} = $infos{"Sum sessions < $pie_percentage_limit%"}; delete $infos{"Sum sessions < $pie_percentage_limit%"}; } } $drawn_graphs{appsessions_graph} = &flotr2_piegraph($graphid++, 'graph_appsessions', 'Connections per application', %infos); $sess_app_info = qq{$NODATA} if (!$total_count); $total_count = &comma_numbers($total_count); print $fh qq{

Sessions per application

Key values

  • $main_app[0] Main Host
  • $total_count sessions Total
$drawn_graphs{appsessions_graph}
$sess_app_info
Application Count Total Duration Average Duration
}; delete $drawn_graphs{appsessions_graph}; } sub print_database_session { my %infos = (); my $total_count = 0; my $sess_database_info = ''; my @main_database = ('unknown',0); foreach my $d (sort keys %{$session_info{database}}) { $sess_database_info .= "$d" . &comma_numbers($session_info{database}{$d}{count}) . "" . &convert_time($session_info{database}{$d}{duration}) . "" . &convert_time($session_info{database}{$d}{duration} / $session_info{database}{$d}{count}) . ""; $total_count += $session_info{database}{$d}{count}; if ($main_database[1] < $session_info{database}{$d}{count}) { $main_database[0] = $d; $main_database[1] = $session_info{database}{$d}{count}; } } if ($graph) { my @small = (); foreach my $d (sort keys %{$session_info{database}}) { if ((($session_info{database}{$d}{count} * 100) / ($total_count||1)) > $pie_percentage_limit) { $infos{$d} = $session_info{database}{$d}{count} || 0; } else { $infos{"Sum sessions < $pie_percentage_limit%"} += $session_info{database}{$d}{count} || 0; push(@small, $d); } } if ($#small == 0) { $infos{$small[0]} = $infos{"Sum sessions < $pie_percentage_limit%"}; delete $infos{"Sum sessions < $pie_percentage_limit%"}; } } $drawn_graphs{databasesessions_graph} = &flotr2_piegraph($graphid++, 'graph_databasesessions', 'Connections per database', %infos); $sess_database_info = qq{$NODATA} if (!$total_count); $total_count = &comma_numbers($total_count); print $fh qq{

Sessions per database

Key values

  • $main_database[0] Main Database
  • $total_count sessions Total
$drawn_graphs{databasesessions_graph}
$sess_database_info
Database User Count Total Duration Average Duration
}; delete $drawn_graphs{databasesessions_graph}; } sub print_checkpoint { # checkpoint my %graph_data = (); if ($graph) { foreach my $tm (sort {$a <=> $b} keys %per_minute_info) { $tm =~ /(\d{4})(\d{2})(\d{2})/; my $y = $1 - 1900; my $mo = $2 - 1; my $d = $3; foreach my $h ("00" .. "23") { next if (!exists $per_minute_info{$tm}{$h}); my %chk_dataavg = (); my %t_dataavg = (); my %v_dataavg = (); foreach my $m ("00" .. "59") { next if (!exists $per_minute_info{$tm}{$h}{$m}); my $rd = &average_per_minutes($m, $avg_minutes); if ($checkpoint_info{wbuffer}) { $chk_dataavg{wbuffer}{"$rd"} = 0 if (!exists $chk_dataavg{wbuffer}{"$rd"}); $chk_dataavg{file_added}{"$rd"} = 0 if (!exists $chk_dataavg{file_added}{"$rd"}); $chk_dataavg{file_removed}{"$rd"} = 0 if (!exists $chk_dataavg{file_removed}{"$rd"}); $chk_dataavg{file_recycled}{"$rd"} = 0 if (!exists $chk_dataavg{file_recycled}{"$rd"}); if (exists $per_minute_info{$tm}{$h}{$m}{checkpoint}) { $chk_dataavg{wbuffer}{"$rd"} += ($per_minute_info{$tm}{$h}{$m}{checkpoint}{wbuffer} || 0); $chk_dataavg{file_added}{"$rd"} += ($per_minute_info{$tm}{$h}{$m}{checkpoint}{file_added} || 0); $chk_dataavg{file_removed}{"$rd"} += ($per_minute_info{$tm}{$h}{$m}{checkpoint}{file_removed} || 0); $chk_dataavg{file_recycled}{"$rd"} += ($per_minute_info{$tm}{$h}{$m}{checkpoint}{file_recycled} || 0); } } } foreach my $rd (@avgs) { my $t = timegm_nocheck(0, $rd, $h, $d, $mo, $y) * 1000; next if ($t < $t_min); last if ($t > $t_max); # Average of written checkpoint buffers and wal files if (exists $chk_dataavg{wbuffer}) { $graph_data{wbuffer} .= "[$t, " . ($chk_dataavg{wbuffer}{"$rd"} || 0) . "],"; $graph_data{file_added} .= "[$t, " . ($chk_dataavg{file_added}{"$rd"} || 0) . "],"; $graph_data{file_removed} .= "[$t, " . ($chk_dataavg{file_removed}{"$rd"} || 0) . "],"; $graph_data{file_recycled} .= "[$t, " . ($chk_dataavg{file_recycled}{"$rd"} || 0) . "],"; } } } } foreach (keys %graph_data) { $graph_data{$_} =~ s/,$//; } } # Checkpoint buffers and files $drawn_graphs{checkpointwritebuffers_graph} = &flotr2_graph($graphid++, 'checkpointwritebuffers_graph', $graph_data{wbuffer}, '', '', 'Checkpoint write buffers (' . $avg_minutes . ' minutes period)', 'Buffers', 'Write buffers', '', '' ); $drawn_graphs{checkpointfiles_graph} = &flotr2_graph($graphid++, 'checkpointfiles_graph', $graph_data{file_added}, $graph_data{file_removed}, $graph_data{file_recycled}, 'Checkpoint Wal files usage (' . $avg_minutes . ' minutes period)', 'Number of files', 'Added', 'Removed', 'Recycled' ); my $checkpoint_wbuffer_peak = 0; my $checkpoint_wbuffer_peak_date = ''; foreach (sort {$overall_checkpoint{'peak'}{$b}{checkpoint_wbuffer} <=> $overall_checkpoint{'peak'}{$a}{checkpoint_wbuffer}} keys %{$overall_checkpoint{'peak'}}) { $checkpoint_wbuffer_peak = &comma_numbers($overall_checkpoint{'peak'}{$_}{checkpoint_wbuffer}); $checkpoint_wbuffer_peak_date = $_; last; } my $walfile_usage_peak = 0; my $walfile_usage_peak_date = ''; foreach (sort {$overall_checkpoint{'peak'}{$b}{walfile_usage} <=> $overall_checkpoint{'peak'}{$a}{walfile_usage}} keys %{$overall_checkpoint{'peak'}}) { $walfile_usage_peak = &comma_numbers($overall_checkpoint{'peak'}{$_}{walfile_usage}); $walfile_usage_peak_date = $_; last; } print $fh qq{

Checkpoints / Restartpoints

Checkpoints Buffers

Key values

  • $checkpoint_wbuffer_peak buffers Checkpoint Peak
  • $checkpoint_wbuffer_peak_date Date
  • $overall_checkpoint{checkpoint_write} seconds Highest write time
  • $overall_checkpoint{checkpoint_sync} seconds Sync time

Checkpoint write buffers ($avg_minutes minutes average)

$drawn_graphs{checkpointwritebuffers_graph}
}; delete $drawn_graphs{checkpointwritebuffers_graph}; print $fh qq{

Checkpoints Wal files

Key values

  • $walfile_usage_peak files Wal files usage Peak
  • $walfile_usage_peak_date Date

Checkpoint Wal files usage ($avg_minutes minutes average)

$drawn_graphs{checkpointfiles_graph}
}; delete $drawn_graphs{checkpointfiles_graph}; my $buffers = ''; my $files = ''; my $warnings = ''; foreach my $d (sort {$a <=> $b} keys %per_minute_info) { $d =~ /^\d{4}(\d{2})(\d{2})$/; my $zday = "$abbr_month{$1} $2"; foreach my $h (sort {$a <=> $b} keys %{$per_minute_info{$d}}) { $buffers .= "$zday$h"; $files .= "$zday$h"; $warnings .= "$zday$h"; $zday = ''; my %cinf = (); my %rinf = (); my %cainf = (); my %rainf = (); foreach my $m (keys %{$per_minute_info{$d}{$h}}) { if (exists $per_minute_info{$d}{$h}{$m}{checkpoint}) { $cinf{wbuffer} += $per_minute_info{$d}{$h}{$m}{checkpoint}{wbuffer}; $cinf{file_added} += $per_minute_info{$d}{$h}{$m}{checkpoint}{file_added}; $cinf{file_removed} += $per_minute_info{$d}{$h}{$m}{checkpoint}{file_removed}; $cinf{file_recycled} += $per_minute_info{$d}{$h}{$m}{checkpoint}{file_recycled}; $cinf{write} += $per_minute_info{$d}{$h}{$m}{checkpoint}{write}; $cinf{sync} += $per_minute_info{$d}{$h}{$m}{checkpoint}{sync}; $cinf{total} += $per_minute_info{$d}{$h}{$m}{checkpoint}{total}; $cainf{sync_files} += $per_minute_info{$d}{$h}{$m}{checkpoint}{sync_files}; $cainf{sync_avg} += $per_minute_info{$d}{$h}{$m}{checkpoint}{sync_avg}; $cainf{sync_longest} = $per_minute_info{$d}{$h}{$m}{checkpoint}{sync_longest} if ($per_minute_info{$d}{$h}{$m}{checkpoint}{sync_longest} > $cainf{sync_longest}); } if (exists $per_minute_info{$d}{$h}{$m}{checkpoint}{warning}) { $cinf{warning} += $per_minute_info{$d}{$h}{$m}{checkpoint}{warning}; $cinf{warning_seconds} += $per_minute_info{$d}{$h}{$m}{checkpoint}{warning_seconds}; } } if (scalar keys %cinf) { $buffers .= "" . &comma_numbers($cinf{wbuffer}) . "" . &comma_numbers($cinf{write}) . 's' . "" . &comma_numbers($cinf{sync}) . 's' . "" . &comma_numbers($cinf{total}) . 's' . ""; $files .= "" . &comma_numbers($cinf{file_added}) . "" . &comma_numbers($cinf{file_removed}) . "" . &comma_numbers($cinf{file_recycled}) . "" . &comma_numbers($cainf{sync_files}) . "" . &comma_numbers($cainf{sync_longest}) . 's' . "" . &comma_numbers($cainf{sync_avg}) . 's' . ""; } else { $buffers .= "00s0s0s"; $files .= "00000s0s"; } if (exists $cinf{warning}) { $warnings .= "" . &comma_numbers($cinf{warning}) . "" . &comma_numbers(sprintf( "%.2f", ($cinf{warning_seconds} || 0) / ($cinf{warning} || 1))) . "s"; } else { $warnings .= "00s"; } } } $buffers = qq{$NODATA} if (!$buffers); $files = qq{$NODATA} if (!$files); $warnings = qq{$NODATA} if (!$warnings); print $fh qq{

Checkpoints Activity

$buffers
Day Hour Written buffers Write time Sync time Total time
$files
Day Hour Added Removed Recycled Synced files Longest sync Average sync
$warnings
Day Hour Count Avg time (sec)
Back to the top of the Checkpoint Activity table
}; } sub print_temporary_file { # checkpoint my %graph_data = (); if ($graph) { foreach my $tm (sort {$a <=> $b} keys %per_minute_info) { $tm =~ /(\d{4})(\d{2})(\d{2})/; my $y = $1 - 1900; my $mo = $2 - 1; my $d = $3; foreach my $h ("00" .. "23") { next if (!exists $per_minute_info{$tm}{$h}); my %chk_dataavg = (); my %t_dataavg = (); my %v_dataavg = (); foreach my $m ("00" .. "59") { next if (!exists $per_minute_info{$tm}{$h}{$m}); my $rd = &average_per_minutes($m, $avg_minutes); if ($tempfile_info{count}) { $t_dataavg{size}{"$rd"} = 0 if (!exists $t_dataavg{size}{"$rd"}); $t_dataavg{count}{"$rd"} = 0 if (!exists $t_dataavg{count}{"$rd"}); if (exists $per_minute_info{$tm}{$h}{$m}{tempfile}) { $t_dataavg{size}{"$rd"} += ($per_minute_info{$tm}{$h}{$m}{tempfile}{size} || 0); $t_dataavg{count}{"$rd"} += ($per_minute_info{$tm}{$h}{$m}{tempfile}{count} || 0); } } } foreach my $rd (@avgs) { my $t = timegm_nocheck(0, $rd, $h, $d, $mo, $y) * 1000; next if ($t < $t_min); last if ($t > $t_max); if (exists $t_dataavg{size}) { $graph_data{size} .= "[$t, " . ($t_dataavg{size}{"$rd"} || 0) . "],"; $graph_data{count} .= "[$t, " . ($t_dataavg{count}{"$rd"} || 0) . "],"; } } } } foreach (keys %graph_data) { $graph_data{$_} =~ s/,$//; } } # Temporary file size $drawn_graphs{temporarydata_graph} = &flotr2_graph($graphid++, 'temporarydata_graph', $graph_data{size}, '', '', 'Size of temporary files (' . $avg_minutes . ' minutes period)', 'Size of files', 'Size of files' ); # Temporary file number $drawn_graphs{temporaryfile_graph} = &flotr2_graph($graphid++, 'temporaryfile_graph', $graph_data{count}, '', '', 'Number of temporary files (' . $avg_minutes . ' minutes period)', 'Number of files', 'Number of files' ); my $tempfile_size_peak = 0; my $tempfile_size_peak_date = ''; foreach (sort {$overall_stat{'peak'}{$b}{tempfile_size} <=> $overall_stat{'peak'}{$a}{tempfile_size}} keys %{$overall_stat{'peak'}}) { $tempfile_size_peak = &pretty_print_size($overall_stat{'peak'}{$_}{tempfile_size}); $tempfile_size_peak_date = $_; last; } print $fh qq{

Temporary Files

Size of temporary files

Key values

  • $tempfile_size_peak Temp Files Peak
  • $tempfile_size_peak_date Date

Size of temporary files ($avg_minutes minutes average)

$drawn_graphs{temporarydata_graph}
}; delete $drawn_graphs{temporarydata_graph}; my $tempfile_count_peak = 0; my $tempfile_count_peak_date = ''; foreach (sort {$overall_stat{'peak'}{$b}{tempfile_count} <=> $overall_stat{'peak'}{$a}{tempfile_count}} keys %{$overall_stat{'peak'}}) { $tempfile_count_peak = &comma_numbers($overall_stat{'peak'}{$_}{tempfile_count}); $tempfile_count_peak_date = $_; last; } print $fh qq{

Number of temporary files

Key values

  • $tempfile_count_peak per second Temp Files Peak
  • $tempfile_count_peak_date Date

Number of temporary files ($avg_minutes minutes average)

$drawn_graphs{temporaryfile_graph}
}; delete $drawn_graphs{temporaryfile_graph}; my $tempfiles_activity = ''; foreach my $d (sort {$a <=> $b} keys %per_minute_info) { $d =~ /^\d{4}(\d{2})(\d{2})$/; my $zday = "$abbr_month{$1} $2"; foreach my $h (sort {$a <=> $b} keys %{$per_minute_info{$d}}) { $tempfiles_activity .= "$zday$h"; $zday = ""; my %tinf = (); foreach my $m (keys %{$per_minute_info{$d}{$h}}) { if (exists $per_minute_info{$d}{$h}{$m}{tempfile}) { $tinf{size} += $per_minute_info{$d}{$h}{$m}{tempfile}{size}; $tinf{count} += $per_minute_info{$d}{$h}{$m}{tempfile}{count}; } } if (scalar keys %tinf) { my $temp_average = &pretty_print_size(sprintf("%.2f", $tinf{size} / $tinf{count})); $tempfiles_activity .= "" . &comma_numbers($tinf{count}) . "$temp_average"; } else { $tempfiles_activity .= "00"; } } } $tempfiles_activity = qq{$NODATA} if (!$tempfiles_activity); print $fh qq{

Temporary Files Activity

$tempfiles_activity
Day Hour Count Average size
Back to the top of the Temporay Files Activity table
}; } sub print_cancelled_queries { # checkpoint my %graph_data = (); if ($graph) { foreach my $tm (sort {$a <=> $b} keys %per_minute_info) { $tm =~ /(\d{4})(\d{2})(\d{2})/; my $y = $1 - 1900; my $mo = $2 - 1; my $d = $3; foreach my $h ("00" .. "23") { next if (!exists $per_minute_info{$tm}{$h}); my %chk_dataavg = (); my %t_dataavg = (); my %v_dataavg = (); foreach my $m ("00" .. "59") { next if (!exists $per_minute_info{$tm}{$h}{$m}); my $rd = &average_per_minutes($m, $avg_minutes); if ($cancelled_info{count}) { $t_dataavg{count}{"$rd"} = 0 if (!exists $t_dataavg{count}{"$rd"}); if (exists $per_minute_info{$tm}{$h}{$m}{cancelled}) { $t_dataavg{count}{"$rd"} += ($per_minute_info{$tm}{$h}{$m}{cancelled}{count} || 0); } } } foreach my $rd (@avgs) { my $t = timegm_nocheck(0, $rd, $h, $d, $mo, $y) * 1000; next if ($t < $t_min); last if ($t > $t_max); if (exists $t_dataavg{count}) { $graph_data{count} .= "[$t, " . ($t_dataavg{count}{"$rd"} || 0) . "],"; } } } } foreach (keys %graph_data) { $graph_data{$_} =~ s/,$//; } } # Number of cancelled queries graph $drawn_graphs{cancelledqueries_graph} = &flotr2_graph($graphid++, 'cancelledqueries_graph', $graph_data{count}, '', '', 'Number of cancelled queries (' . $avg_minutes . ' minutes period)', 'Number of cancellation', 'Number of cancellation' ); my $cancelled_count_peak = 0; my $cancelled_count_peak_date = ''; foreach (sort {$overall_stat{'peak'}{$b}{cancelled_count} <=> $overall_stat{'peak'}{$a}{cancelled_count}} keys %{$overall_stat{'peak'}}) { $cancelled_count_peak = &comma_numbers($overall_stat{'peak'}{$_}{cancelled_count}); $cancelled_count_peak_date = $_; last; } print $fh qq{

Number of cancelled queries

Key values

  • $cancelled_count_peak per second Cancelled query Peak
  • $cancelled_count_peak_date Date

Number of cancelled queries ($avg_minutes minutes average)

$drawn_graphs{cancelledqueries_graph}
}; delete $drawn_graphs{cancelledqueries_graph}; } sub print_analyze_per_table { # ANALYZE stats per table my %infos = (); my $total_count = 0; my $analyze_info = ''; my @main_analyze = ('unknown',0); foreach my $t (sort {$autoanalyze_info{tables}{$b}{analyzes} <=> $autoanalyze_info{tables}{$a}{analyzes}} keys %{$autoanalyze_info{tables}}) { $analyze_info .= "$t" . $autoanalyze_info{tables}{$t}{analyzes} . ""; $total_count += $autoanalyze_info{tables}{$t}{analyzes}; if ($main_analyze[1] < $autoanalyze_info{tables}{$t}{analyzes}) { $main_analyze[0] = $t; $main_analyze[1] = $autoanalyze_info{tables}{$t}{analyzes}; } } $analyze_info .= "Total" . &comma_numbers($total_count) . ""; if ($graph) { my @small = (); foreach my $d (sort keys %{$autoanalyze_info{tables}}) { if ((($autoanalyze_info{tables}{$d}{analyzes} * 100) / ($total_count||1)) > $pie_percentage_limit) { $infos{$d} = $autoanalyze_info{tables}{$d}{analyzes} || 0; } else { $infos{"Sum analyzes < $pie_percentage_limit%"} += $autoanalyze_info{tables}{$d}{analyzes} || 0; push(@small, $d); } } if ($#small == 0) { $infos{$small[0]} = $infos{"Sum analyzes < $pie_percentage_limit%"}; delete $infos{"Sum analyzes < $pie_percentage_limit%"}; } } $drawn_graphs{tableanalyzes_graph} = &flotr2_piegraph($graphid++, 'graph_tableanalyzes', 'Analyzes per tables', %infos); $total_count = &comma_numbers($total_count); my $database = ''; if ($main_analyze[0] =~ s/^([^\.]+)\.//) { $database = $1; } $analyze_info = qq{$NODATA} if (!$total_count); print $fh qq{

Analyses per table

Key values

  • $main_analyze[0] ($main_analyze[1]) Main table analyzed (database $database)
  • $total_count analyzes Total
$drawn_graphs{tableanalyzes_graph}
$analyze_info
Table Number of analyzes
}; delete $drawn_graphs{tableanalyzes_graph}; } sub print_vacuum { # checkpoint my %graph_data = (); foreach my $tm (sort {$a <=> $b} keys %per_minute_info) { $tm =~ /(\d{4})(\d{2})(\d{2})/; my $y = $1 - 1900; my $mo = $2 - 1; my $d = $3; foreach my $h ("00" .. "23") { next if (!exists $per_minute_info{$tm}{$h}); my %chk_dataavg = (); my %t_dataavg = (); my %v_dataavg = (); foreach my $m ("00" .. "59") { next if (!exists $per_minute_info{$tm}{$h}{$m}); my $rd = &average_per_minutes($m, $avg_minutes); $v_dataavg{acount}{"$rd"} = 0 if (!exists $v_dataavg{acount}{"$rd"}); $v_dataavg{vcount}{"$rd"} = 0 if (!exists $v_dataavg{vcount}{"$rd"}); if (exists $per_minute_info{$tm}{$h}{$m}{autovacuum}) { $v_dataavg{vcount}{"$rd"} += ($per_minute_info{$tm}{$h}{$m}{autovacuum}{count} || 0); } if (exists $per_minute_info{$tm}{$h}{$m}{autoanalyze}) { $v_dataavg{acount}{"$rd"} += ($per_minute_info{$tm}{$h}{$m}{autoanalyze}{count} || 0); } } foreach my $rd (@avgs) { my $t = timegm_nocheck(0, $rd, $h, $d, $mo, $y) * 1000; next if ($t < $t_min); last if ($t > $t_max); if (exists $v_dataavg{vcount}) { $graph_data{vcount} .= "[$t, " . ($v_dataavg{vcount}{"$rd"} || 0) . "],"; } if (exists $v_dataavg{acount}) { $graph_data{acount} .= "[$t, " . ($v_dataavg{acount}{"$rd"} || 0) . "],"; } } } } foreach (keys %graph_data) { $graph_data{$_} =~ s/,$//; } # VACUUMs vs ANALYZEs chart $drawn_graphs{autovacuum_graph} = &flotr2_graph($graphid++, 'autovacuum_graph', $graph_data{vcount}, $graph_data{acount}, '', 'Autovacuum actions (' . $avg_minutes . ' minutes period)', '', 'VACUUMs', 'ANALYZEs' ); my $vacuum_size_peak = 0; my $vacuum_size_peak_date = ''; foreach (sort {$overall_stat{'peak'}{$b}{vacuum_size} <=> $overall_stat{'peak'}{$a}{vacuum_size}} keys %{$overall_stat{'peak'}}) { $vacuum_size_peak = &comma_numbers($overall_stat{'peak'}{$_}{vacuum_size}); $vacuum_size_peak_date = $_; last; } my $autovacuum_peak_system_usage_db = ''; if ($autovacuum_info{peak}{system_usage}{table} =~ s/^([^\.]+)\.//) { $autovacuum_peak_system_usage_db = $1; } my $autoanalyze_peak_system_usage_db = ''; if ($autoanalyze_info{peak}{system_usage}{table} =~ s/^([^\.]+)\.//) { $autoanalyze_peak_system_usage_db = $1; } $autovacuum_info{peak}{system_usage}{elapsed} ||= 0; $autoanalyze_info{peak}{system_usage}{elapsed} ||= 0; print $fh qq{

Vacuums

Vacuums / Analyzes Distribution

Key values

  • $autovacuum_info{peak}{system_usage}{elapsed} sec Highest CPU-cost vacuum
    Table $autovacuum_info{peak}{system_usage}{table}
    Database $autovacuum_peak_system_usage_db
  • $autovacuum_info{peak}{system_usage}{date} Date
  • $autoanalyze_info{peak}{system_usage}{elapsed} sec Highest CPU-cost analyze
    Table $autoanalyze_info{peak}{system_usage}{table}
    Database $autovacuum_peak_system_usage_db
  • $autoanalyze_info{peak}{system_usage}{date} Date

Autovacuum actions ($avg_minutes minutes average)

$drawn_graphs{autovacuum_graph}
}; delete $drawn_graphs{autovacuum_graph}; # ANALYZE stats per table &print_analyze_per_table(); # VACUUM stats per table &print_vacuum_per_table(); # Show tuples and pages removed per table &print_vacuum_tuple_removed; &print_vacuum_page_removed; my $vacuum_activity = ''; foreach my $d (sort {$a <=> $b} keys %per_minute_info) { my $c = 1; $d =~ /^\d{4}(\d{2})(\d{2})$/; my $zday = "$abbr_month{$1} $2"; foreach my $h (sort {$a <=> $b} keys %{$per_minute_info{$d}}) { $vacuum_activity .= "$zday$h"; $zday = ""; my %ainf = (); foreach my $m (keys %{$per_minute_info{$d}{$h}}) { if (exists $per_minute_info{$d}{$h}{$m}{autovacuum}{count}) { $ainf{vcount} += $per_minute_info{$d}{$h}{$m}{autovacuum}{count}; } if (exists $per_minute_info{$d}{$h}{$m}{autoanalyze}{count}) { $ainf{acount} += $per_minute_info{$d}{$h}{$m}{autoanalyze}{count}; } } if (scalar keys %ainf) { $vacuum_activity .= "" . &comma_numbers($ainf{vcount}) . ""; } else { $vacuum_activity .= "0"; } if (scalar keys %ainf) { $vacuum_activity .= "" . &comma_numbers($ainf{acount}) . ""; } else { $vacuum_activity .= "0"; } } } $vacuum_activity = qq{$NODATA} if (!$vacuum_activity); print $fh qq{

Autovacuum Activity

$vacuum_activity
Day Hour VACUUMs ANALYZEs
Back to the top of the Temporay Files Activity table
}; } sub print_vacuum_per_table { # VACUUM stats per table my $total_count = 0; my $total_idxscan = 0; my $vacuum_info = ''; my @main_vacuum = ('unknown',0); foreach my $t (sort {$autovacuum_info{tables}{$b}{vacuums} <=> $autovacuum_info{tables}{$a}{vacuums}} keys %{$autovacuum_info{tables}}) { $vacuum_info .= "$t" . $autovacuum_info{tables}{$t}{vacuums} . "" . $autovacuum_info{tables}{$t}{idxscans} . ""; $total_count += $autovacuum_info{tables}{$t}{vacuums}; $total_idxscan += $autovacuum_info{tables}{$t}{idxscans}; if ($main_vacuum[1] < $autovacuum_info{tables}{$t}{vacuums}) { $main_vacuum[0] = $t; $main_vacuum[1] = $autovacuum_info{tables}{$t}{vacuums}; } } $vacuum_info .= "Total" . &comma_numbers($total_count) . "" . &comma_numbers($total_idxscan) . ""; my %infos = (); my @small = (); foreach my $d (sort keys %{$autovacuum_info{tables}}) { if ((($autovacuum_info{tables}{$d}{vacuums} * 100) / ($total_count||1)) > $pie_percentage_limit) { $infos{$d} = $autovacuum_info{tables}{$d}{vacuums} || 0; } else { $infos{"Sum vacuums < $pie_percentage_limit%"} += $autovacuum_info{tables}{$d}{vacuums} || 0; push(@small, $d); } } if ($#small == 0) { $infos{$small[0]} = $infos{"Sum vacuums < $pie_percentage_limit%"}; delete $infos{"Sum vacuums < $pie_percentage_limit%"}; } $drawn_graphs{tablevacuums_graph} = &flotr2_piegraph($graphid++, 'graph_tablevacuums', 'Analyzes per tables', %infos); $vacuum_info = qq{$NODATA} if (!$total_count); $total_count = &comma_numbers($total_count); my $database = ''; if ($main_vacuum[0] =~ s/^([^\.]+)\.//) { $database = $1; } print $fh qq{

Vacuums per table

Key values

  • $main_vacuum[0] ($main_vacuum[1]) Main table vacuumed on database $database
  • $total_count vacuums Total
$drawn_graphs{tablevacuums_graph}
$vacuum_info
Table Number of vacuums Index scans
}; delete $drawn_graphs{tablevacuums_graph}; } sub print_vacuum_tuple_removed { # VACUUM stats per table my $total_count = 0; my $total_idxscan = 0; my $total_tuple = 0; my $total_page = 0; my $vacuum_info = ''; my @main_tuple = ('unknown',0); foreach my $t (sort {$autovacuum_info{tables}{$b}{tuples}{removed} <=> $autovacuum_info{tables}{$a}{tuples}{removed}} keys %{$autovacuum_info{tables}}) { $vacuum_info .= "$t" . $autovacuum_info{tables}{$t}{vacuums} . "" . $autovacuum_info{tables}{$t}{idxscans} . "" . $autovacuum_info{tables}{$t}{tuples}{removed} . "" . $autovacuum_info{tables}{$t}{pages}{removed} . ""; $total_count += $autovacuum_info{tables}{$t}{vacuums}; $total_idxscan += $autovacuum_info{tables}{$t}{idxscans}; $total_tuple += $autovacuum_info{tables}{$t}{tuples}{removed}; $total_page += $autovacuum_info{tables}{$t}{pages}{removed}; if ($main_tuple[1] < $autovacuum_info{tables}{$t}{tuples}{removed}) { $main_tuple[0] = $t; $main_tuple[1] = $autovacuum_info{tables}{$t}{tuples}{removed}; } } $vacuum_info .= "Total" . &comma_numbers($total_count) . "" . &comma_numbers($total_idxscan) . "" . &comma_numbers($total_tuple) . "" . &comma_numbers($total_page) . ""; my %infos_tuple = (); my @small = (); foreach my $d (sort keys %{$autovacuum_info{tables}}) { if ((($autovacuum_info{tables}{$d}{tuples}{removed} * 100) / ($total_tuple||1)) > $pie_percentage_limit) { $infos_tuple{$d} = $autovacuum_info{tables}{$d}{tuples}{removed} || 0; } else { $infos_tuple{"Sum tuples removed < $pie_percentage_limit%"} += $autovacuum_info{tables}{$d}{tuples}{removed} || 0; push(@small, $d); } } if ($#small == 0) { $infos_tuple{$small[0]} = $infos_tuple{"Sum tuples removed < $pie_percentage_limit%"}; delete $infos_tuple{"Sum tuples removed < $pie_percentage_limit%"}; } $drawn_graphs{tuplevacuums_graph} = &flotr2_piegraph($graphid++, 'graph_tuplevacuums', 'Tuples removed per tables', %infos_tuple); $vacuum_info = qq{$NODATA} if (!$total_count); $total_count = &comma_numbers($total_count); my $database = ''; if ($main_tuple[0] =~ s/^([^\.]+)\.//) { $database = $1; } print $fh qq{

Tuples removed per table

Key values

  • $main_tuple[0] ($main_tuple[1]) Main table with removed tuples on database $database
  • $total_tuple tuples Total removed
$drawn_graphs{tuplevacuums_graph}
$vacuum_info
Table Number of vacuums Index scans Tuples removed Pages removed
}; delete $drawn_graphs{tuplevacuums_graph}; } sub print_vacuum_page_removed { # VACUUM stats per table my $total_count = 0; my $total_idxscan = 0; my $total_tuple = 0; my $total_page = 0; my $vacuum_info = ''; my @main_tuple = ('unknown',0); my @main_page = ('unknown',0); foreach my $t (sort {$autovacuum_info{tables}{$b}{pages}{removed} <=> $autovacuum_info{tables}{$a}{pages}{removed}} keys %{$autovacuum_info{tables}}) { $vacuum_info .= "$t" . $autovacuum_info{tables}{$t}{vacuums} . "" . $autovacuum_info{tables}{$t}{idxscans} . "" . $autovacuum_info{tables}{$t}{tuples}{removed} . "" . $autovacuum_info{tables}{$t}{pages}{removed} . ""; $total_count += $autovacuum_info{tables}{$t}{vacuums}; $total_idxscan += $autovacuum_info{tables}{$t}{idxscans}; $total_tuple += $autovacuum_info{tables}{$t}{tuples}{removed}; $total_page += $autovacuum_info{tables}{$t}{pages}{removed}; if ($main_page[1] < $autovacuum_info{tables}{$t}{pages}{removed}) { $main_page[0] = $t; $main_page[1] = $autovacuum_info{tables}{$t}{pages}{removed}; } } $vacuum_info .= "Total" . &comma_numbers($total_count) . "" . &comma_numbers($total_idxscan) . "" . &comma_numbers($total_tuple) . "" . &comma_numbers($total_page) . ""; my %infos_page = (); my @small = (); foreach my $d (sort keys %{$autovacuum_info{tables}}) { if ((($autovacuum_info{tables}{$d}{pages}{removed} * 100) / ($total_page || 1)) > $pie_percentage_limit) { $infos_page{$d} = $autovacuum_info{tables}{$d}{pages}{removed} || 0; } else { $infos_page{"Sum pages removed < $pie_percentage_limit%"} += $autovacuum_info{tables}{$d}{pages}{removed} || 0; push(@small, $d); } } if ($#small == 0) { $infos_page{$small[0]} = $infos_page{"Sum pages removed < $pie_percentage_limit%"}; delete $infos_page{"Sum pages removed < $pie_percentage_limit%"}; } $drawn_graphs{pagevacuums_graph} = &flotr2_piegraph($graphid++, 'graph_pagevacuums', 'Tuples removed per tables', %infos_page); $vacuum_info = qq{$NODATA} if (!$total_count); $total_count = &comma_numbers($total_count); my $database = ''; if ($main_page[0] =~ s/^([^\.]+)\.//) { $database = $1; } print $fh qq{

Pages removed per table

Key values

  • $main_page[0] ($main_page[1]) Main table with removed pages on database $database
  • $total_page pages Total removed
$drawn_graphs{pagevacuums_graph}
$vacuum_info
Table Number of vacuums Index scans Tuples removed Pages removed
}; delete $drawn_graphs{pagevacuums_graph}; } sub print_lock_type { my %locktype = (); my $total_count = 0; my $total_duration = 0; my $locktype_info = ''; my @main_locktype = ('unknown',0); foreach my $t (sort keys %lock_info) { $locktype_info .= "$t" . &comma_numbers($lock_info{$t}{count}) . "" . &convert_time($lock_info{$t}{duration}) . "" . &convert_time($lock_info{$t}{duration} / ($lock_info{$t}{count} || 1)) . ""; $total_count += $lock_info{$t}{count}; $total_duration += $lock_info{$t}{duration}; if ($main_locktype[1] < $lock_info{$t}{count}) { $main_locktype[0] = $t; $main_locktype[1] = $lock_info{$t}{count}; } foreach my $o (sort keys %{$lock_info{$t}}) { next if (($o eq 'count') || ($o eq 'duration') || ($o eq 'chronos')); $locktype_info .= "$o" . &comma_numbers($lock_info{$t}{$o}{count}) . "" . &convert_time($lock_info{$t}{$o}{duration}) . "" . &convert_time($lock_info{$t}{$o}{duration} / $lock_info{$t}{$o}{count}) . "\n"; } } if ($total_count > 0) { $locktype_info .= "Total" . &comma_numbers($total_count) . "" . &convert_time($total_duration) . "" . &convert_time($total_duration / ($total_count || 1)) . ""; } else { $locktype_info = qq{$NODATA}; } if ($graph) { my @small = (); foreach my $d (sort keys %lock_info) { if ((($lock_info{$d}{count} * 100) / ($total_count||1)) > $pie_percentage_limit) { $locktype{$d} = $lock_info{$d}{count} || 0; } else { $locktype{"Sum lock types < $pie_percentage_limit%"} += $lock_info{$d}{count} || 0; push(@small, $d); } } if ($#small == 0) { $locktype{$small[0]} = $locktype{"Sum types < $pie_percentage_limit%"}; delete $locktype{"Sum lock types < $pie_percentage_limit%"}; } } $drawn_graphs{lockbytype_graph} = &flotr2_piegraph($graphid++, 'graph_lockbytype', 'Type of locks', %locktype); $total_count = &comma_numbers($total_count); print $fh qq{

Locks

Locks by types

Key values

  • $main_locktype[0] Main Lock Type
  • $total_count locks Total
$drawn_graphs{lockbytype_graph}
$locktype_info
Type Object Count Total Duration Average Duration (s)
}; delete $drawn_graphs{lockbytype_graph}; } sub print_query_type { my %data = (); my $total_queries = 0; my $total_select = 0; my $total_write = 0; foreach my $a (@SQL_ACTION) { $total_queries += $overall_stat{$a}; if ($a eq 'SELECT') { $total_select += $overall_stat{$a}; } elsif ($a ne 'OTHERS') { $total_write += $overall_stat{$a}; } } my $total = $overall_stat{'queries_number'}; my $querytype_info = ''; foreach my $a (@SQL_ACTION) { $querytype_info .= "$a" . &comma_numbers($overall_stat{$a}) . "" . sprintf("%0.2f", ($overall_stat{$a} * 100) / ($total||1)) . "%"; } if (($total - $total_queries) > 0) { $querytype_info .= "OTHERS" . &comma_numbers($total - $total_queries) . "" . sprintf("%0.2f", (($total - $total_queries) * 100) / ($total||1)) . "%"; } $querytype_info = qq{$NODATA} if (!$total); if ($graph && $total) { foreach my $t (@SQL_ACTION) { if ((($overall_stat{$t} * 100) / ($total||1)) > $pie_percentage_limit) { $data{$t} = $overall_stat{$t} || 0; } else { $data{"Sum query types < $pie_percentage_limit%"} += $overall_stat{$t} || 0; } } if (((($total - $total_queries) * 100) / ($total||1)) > $pie_percentage_limit) { $data{'Others'} = $total - $total_queries; } else { $data{"Sum query types < $pie_percentage_limit%"} += $total - $total_queries; } } $drawn_graphs{queriesbytype_graph} = &flotr2_piegraph($graphid++, 'graph_queriesbytype', 'Type of queries', %data); $total_select = &comma_numbers($total_select); $total_write = &comma_numbers($total_write); print $fh qq{

Queries

Queries by type

Key values

  • $total_select Total read queries
  • $total_write Total write queries
$drawn_graphs{queriesbytype_graph}
$querytype_info
Type Count Percentage
}; delete $drawn_graphs{queriesbytype_graph}; } sub print_query_per_database { my %infos = (); my $total_count = 0; my $query_database_info = ''; my @main_database = ('unknown', 0); my @main_database_duration = ('unknown', 0); foreach my $d (sort keys %database_info) { $query_database_info .= "$dTotal" . &comma_numbers($database_info{$d}{count}) . "" . &convert_time($database_info{$d}{duration}) . ""; $total_count += $database_info{$d}{count}; if ($main_database[1] < $database_info{$d}{count}) { $main_database[0] = $d; $main_database[1] = $database_info{$d}{count}; } if ($main_database_duration[1] < $database_info{$d}{duration}) { $main_database_duration[0] = $d; $main_database_duration[1] = $database_info{$d}{duration}; } foreach my $r (sort keys %{$database_info{$d}}) { next if (($r eq 'count') || ($r =~ /duration/)); $query_database_info .= "$r" . &comma_numbers($database_info{$d}{$r}) . "" . &convert_time($database_info{$d}{"$r|duration"}) . ""; } } $query_database_info = qq{$NODATA} if (!$total_count); if ($graph) { my @small = (); foreach my $d (sort keys %database_info) { if ((($database_info{$d}{count} * 100) / ($total_count || 1)) > $pie_percentage_limit) { $infos{$d} = $database_info{$d}{count} || 0; } else { $infos{"Sum queries per databases < $pie_percentage_limit%"} += $database_info{$d}{count} || 0; push(@small, $d); } } if ($#small == 0) { $infos{$small[0]} = $infos{"Sum queries per databases < $pie_percentage_limit%"}; delete $infos{"Sum queries per databases < $pie_percentage_limit%"}; } } $drawn_graphs{queriesbydatabase_graph} = &flotr2_piegraph($graphid++, 'graph_queriesbydatabase', 'Queries per database', %infos); $main_database[1] = &comma_numbers($main_database[1]); $main_database_duration[1] = &convert_time($main_database_duration[1]); print $fh qq{

Queries by database

Key values

  • $main_database[0] Main database
  • $main_database[1] Requests
  • $main_database_duration[1] ($main_database_duration[0])
  • Main time consuming database
$drawn_graphs{queriesbydatabase_graph}
$query_database_info
Database Request type Count Duration
}; delete $drawn_graphs{queriesbydatabase_graph}; } sub print_query_per_application { my %infos = (); my $total_count = 0; my $query_application_info = ''; my @main_application = ('unknown', 0); my @main_application_duration = ('unknown', 0); foreach my $d (sort keys %application_info) { $query_application_info .= "$dTotal" . &comma_numbers($application_info{$d}{count}) . "" . &convert_time($application_info{$d}{duration}) . ""; $total_count += $application_info{$d}{count}; if ($main_application[1] < $application_info{$d}{count}) { $main_application[0] = $d; $main_application[1] = $application_info{$d}{count}; } if ($main_application_duration[1] < $application_info{$d}{duration}) { $main_application_duration[0] = $d; $main_application_duration[1] = $application_info{$d}{duration}; } foreach my $r (sort keys %{$application_info{$d}}) { next if (($r eq 'count') || ($r =~ /duration/)); $query_application_info .= "$r" . &comma_numbers($application_info{$d}{$r}) . "" . &convert_time($application_info{$d}{"$r|duration"}) . ""; } } $query_application_info = qq{$NODATA} if (!$total_count); if ($graph) { my @small = (); foreach my $d (sort keys %application_info) { if ((($application_info{$d}{count} * 100) / ($total_count || 1)) > $pie_percentage_limit) { $infos{$d} = $application_info{$d}{count} || 0; } else { $infos{"Sum queries per applications < $pie_percentage_limit%"} += $application_info{$d}{count} || 0; push(@small, $d); } } if ($#small == 0) { $infos{$small[0]} = $infos{"Sum queries per applications < $pie_percentage_limit%"}; delete $infos{"Sum queries per applications < $pie_percentage_limit%"}; } } $drawn_graphs{queriesbyapplication_graph} = &flotr2_piegraph($graphid++, 'graph_queriesbyapplication', 'Queries per application', %infos); $main_application[1] = &comma_numbers($main_application[1]); $main_application_duration[1] = &convert_time($main_application_duration[1]); print $fh qq{

Queries by application

Key values

  • $main_application[0] Main application
  • $main_application[1] Requests
  • $main_application_duration[1] ($main_application_duration[0])
  • Main time consuming application
$drawn_graphs{queriesbyapplication_graph}
$query_application_info
Application Request type Count Duration
}; delete $drawn_graphs{queriesbyapplication_graph}; } sub print_query_per_user { my %infos = (); my $total_count = 0; my $total_duration = 0; my $query_user_info = ''; my @main_user = ('unknown', 0); my @main_user_duration = ('unknown', 0); foreach my $d (sort keys %user_info) { $query_user_info .= "$dTotal" . &comma_numbers($user_info{$d}{count}) . "" . &convert_time($user_info{$d}{duration}) . ""; $total_count += $user_info{$d}{count}; $total_duration += $user_info{$d}{duration}; if ($main_user[1] < $user_info{$d}{count}) { $main_user[0] = $d; $main_user[1] = $user_info{$d}{count}; } if ($main_user_duration[1] < $user_info{$d}{duration}) { $main_user_duration[0] = $d; $main_user_duration[1] = $user_info{$d}{duration}; } foreach my $r (sort keys %{$user_info{$d}}) { next if (($r eq 'count') || ($r =~ /duration/)); $query_user_info .= "$r" . &comma_numbers($user_info{$d}{$r}) . "" . &convert_time($user_info{$d}{"$r|duration"}) . ""; } } $query_user_info = qq{$NODATA} if (!$total_count); if ($graph) { my %small = (); foreach my $d (sort keys %user_info) { if ((($user_info{$d}{count} * 100) / ($total_count || 1)) > $pie_percentage_limit) { $infos{queries}{$d} = $user_info{$d}{count} || 0; } else { $infos{queries}{"Sum queries per users < $pie_percentage_limit%"} += $user_info{$d}{count} || 0; push(@{$small{queries}}, $d); } if ((($user_info{$d}{duration} * 100) / ($total_duration || 1)) > $pie_percentage_limit) { $infos{duration}{$d} = $user_info{$d}{duration} || 0; } else { $infos{duration}{"Sum duration per users < $pie_percentage_limit%"} += $user_info{$d}{duration} || 0; push(@{$small{duration}}, $d); } } if ($#{$small{queries}} == 0) { $infos{queries}{$small{queries}[0]} = $infos{queries}{"Sum queries per users < $pie_percentage_limit%"}; delete $infos{queries}{"Sum queries per users < $pie_percentage_limit%"}; } if ($#{$small{duration}} == 0){ $infos{duration}{$small{duration}[0]} = $infos{duration}{"Sum duration per users < $pie_percentage_limit%"}; delete $infos{duration}{"Sum duration per users < $pie_percentage_limit%"}; } } $drawn_graphs{queriesbyuser_graph} = &flotr2_piegraph($graphid++, 'graph_queriesbyuser', 'Queries per user', %{$infos{queries}}); $drawn_graphs{durationbyuser_graph} = &flotr2_piegraph($graphid++, 'graph_durationbyuser', 'Duration per user', %{$infos{duration}}); $main_user[1] = &comma_numbers($main_user[1]); $main_user_duration[1] = &convert_time($main_user_duration[1]); print $fh qq{

Queries by user

Key values

  • $main_user[0] Main user
  • $main_user[1] Requests
$drawn_graphs{queriesbyuser_graph}
$query_user_info
User Request type Count Duration
}; delete $drawn_graphs{queriesbyuser_graph}; print $fh qq{

Duration by user

Key values

  • $main_user_duration[1] ($main_user_duration[0]) Main time consuming user
$drawn_graphs{durationbyuser_graph}
$query_user_info
User Request type Count Duration
}; delete $drawn_graphs{durationbyuser_graph}; } sub print_query_per_host { my %infos = (); my $total_count = 0; my $query_host_info = ''; my @main_host = ('unknown', 0); my @main_host_duration = ('unknown', 0); foreach my $d (sort keys %host_info) { $query_host_info .= "$dTotal" . &comma_numbers($host_info{$d}{count}) . "" . &convert_time($host_info{$d}{duration}) . ""; $total_count += $host_info{$d}{count}; if ($main_host[1] < $host_info{$d}{count}) { $main_host[0] = $d; $main_host[1] = $host_info{$d}{count}; } if ($main_host_duration[1] < $host_info{$d}{duration}) { $main_host_duration[0] = $d; $main_host_duration[1] = $host_info{$d}{duration}; } foreach my $r (sort keys %{$host_info{$d}}) { next if (($r eq 'count') || ($r =~ /duration/)); $query_host_info .= "$r" . &comma_numbers($host_info{$d}{$r}) . "" . &convert_time($host_info{$d}{"$r|duration"}) . ""; } } $query_host_info = qq{$NODATA} if (!$total_count); if ($graph) { my @small = (); foreach my $d (sort keys %host_info) { if ((($host_info{$d}{count} * 100) / ($total_count || 1)) > $pie_percentage_limit) { $infos{$d} = $host_info{$d}{count} || 0; } else { $infos{"Sum queries per hosts < $pie_percentage_limit%"} += $host_info{$d}{count} || 0; push(@small, $d); } } if ($#small == 0) { $infos{$small[0]} = $infos{"Sum queries per hosts < $pie_percentage_limit%"}; delete $infos{"Sum queries per hosts < $pie_percentage_limit%"}; } } $drawn_graphs{queriesbyhost_graph} = &flotr2_piegraph($graphid++, 'graph_queriesbyhost', 'Queries per host', %infos); $main_host[1] = &comma_numbers($main_host[1]); $main_host_duration[1] = &convert_time($main_host_duration[1]); print $fh qq{

Queries by host

Key values

  • $main_host[0] Main host
  • $main_host[1] Requests
  • $main_host_duration[1] ($main_host_duration[0])
  • Main time consuming host
$drawn_graphs{queriesbyhost_graph}
$query_host_info
Host Request type Count Duration
}; delete $drawn_graphs{queriesbyhost_graph}; } sub print_lock_queries_report { my @top_locked_queries; foreach my $h (keys %normalyzed_info) { if (exists($normalyzed_info{$h}{locks})) { push (@top_locked_queries, [$h, $normalyzed_info{$h}{locks}{count}, $normalyzed_info{$h}{locks}{wait}, $normalyzed_info{$h}{locks}{minwait}, $normalyzed_info{$h}{locks}{maxwait}]); } } # Most frequent waiting queries (N) @top_locked_queries = sort {$b->[2] <=> $a->[2]} @top_locked_queries; print $fh qq{

Most frequent waiting queries (N)

}; my $rank = 1; for (my $i = 0 ; $i <= $#top_locked_queries ; $i++) { my $count = &comma_numbers($top_locked_queries[$i]->[1]); my $total_time = &convert_time($top_locked_queries[$i]->[2]); my $min_time = &convert_time($top_locked_queries[$i]->[3]); my $max_time = &convert_time($top_locked_queries[$i]->[4]); my $avg_time = &convert_time($top_locked_queries[$i]->[2] / ($top_locked_queries[$i]->[1] || 1)); my $query = &highlight_code($top_locked_queries[$i]->[0]); my $md5 = ''; $md5 = 'md5: ' . md5_hex($top_locked_queries[$i]->[0]) if ($enable_checksum); my $k = $top_locked_queries[$i]->[0]; my $example = qq{

}; $example = '' if (scalar keys %{$normalyzed_info{$k}{samples}} <= 1); print $fh qq{ }; } $rank++; } if ($#top_locked_queries == -1) { print $fh qq{}; } print $fh qq{
Rank Count Total time Min time Max time Avg duration Query
$rank $count $total_time $min_time $max_time $avg_time
$query
$md5 $example
}; if ($normalyzed_info{$k}{count} > 1) { my $idx = 1; foreach my $d (sort {$b <=> $a} keys %{$normalyzed_info{$k}{samples}}) { $query = &highlight_code($normalyzed_info{$k}{samples}{$d}{query}); $md5 = ''; $md5 = 'md5: ' . md5_hex($normalyzed_info{$k}{samples}{$d}{query}) if ($enable_checksum); my $details = "[ Date: $normalyzed_info{$k}{samples}{$d}{date}"; $details .= " - Duration: " . &convert_time($d) if ($normalyzed_info{$k}{samples}{$d}{duration}); $details .= " - Database: $normalyzed_info{$k}{samples}{$d}{db}" if ($normalyzed_info{$k}{samples}{$d}{db}); $details .= " - User: $normalyzed_info{$k}{samples}{$d}{user}" if ($normalyzed_info{$k}{samples}{$d}{user}); $details .= " - Remote: $normalyzed_info{$k}{samples}{$d}{remote}" if ($normalyzed_info{$k}{samples}{$d}{remote}); $details .= " - Application: $normalyzed_info{$k}{samples}{$d}{app}" if ($normalyzed_info{$k}{samples}{$d}{app}); $details .= " - Bind query: yes" if ($normalyzed_info{$k}{samples}{$d}{bind}); $details .= " ]"; my $explain = ''; if ($normalyzed_info{$k}{samples}{$d}{plan}) { my $url = $EXPLAIN_URL . url_escape($normalyzed_info{$k}{samples}{$d}{plan}); $explain = "\n
" . $normalyzed_info{$k}{samples}{$d}{plan} . "
\n"; } print $fh qq{
$query
$md5
$details
$explain }; $idx++; } print $fh qq{

$NODATA
}; @top_locked_queries = (); # Queries that waited the most @top_locked_info = sort {$b->[1] <=> $a->[1]} @top_locked_info; print $fh qq{

Queries that waited the most

}; $rank = 1; for (my $i = 0 ; $i <= $#top_locked_info ; $i++) { my $query = &highlight_code($top_locked_info[$i]->[2]); my $md5 = ''; $md5 = 'md5: ' . md5_hex($top_locked_info[$i]->[2]) if ($enable_checksum); my $details = "[ Date: " . ($top_locked_info[$i]->[1] || ''); $details .= " - Database: $top_locked_info[$i]->[3]" if ($top_locked_info[$i]->[3]); $details .= " - User: $top_locked_info[$i]->[4]" if ($top_locked_info[$i]->[4]); $details .= " - Remote: $top_locked_info[$i]->[5]" if ($top_locked_info[$i]->[5]); $details .= " - Application: $top_locked_info[$i]->[6]" if ($top_locked_info[$i]->[6]); $details .= " - Bind query: yes" if ($top_locked_info[$i]->[7]); $details .= " ]"; my $time = &convert_time($top_locked_info[$i]->[0]); print $fh qq{ }; $rank++; } if ($#top_locked_info == -1) { print $fh qq{}; } print $fh qq{
Rank Wait time Query
$rank $time
$query
$md5
$details
$NODATA
}; } sub print_tempfile_report { my @top_temporary = (); foreach my $h (keys %normalyzed_info) { if (exists($normalyzed_info{$h}{tempfiles})) { push (@top_temporary, [$h, $normalyzed_info{$h}{tempfiles}{count}, $normalyzed_info{$h}{tempfiles}{size}, $normalyzed_info{$h}{tempfiles}{minsize}, $normalyzed_info{$h}{tempfiles}{maxsize}]); } } # Queries generating the most temporary files (N) if ($#top_temporary >= 0) { @top_temporary = sort {$b->[1] <=> $a->[1]} @top_temporary; print $fh qq{

Queries generating the most temporary files (N)

}; my $rank = 1; for (my $i = 0 ; $i <= $#top_temporary ; $i++) { my $count = &comma_numbers($top_temporary[$i]->[1]); my $total_size = &pretty_print_size($top_temporary[$i]->[2]); my $min_size = &pretty_print_size($top_temporary[$i]->[3]); my $max_size = &pretty_print_size($top_temporary[$i]->[4]); my $avg_size = &pretty_print_size($top_temporary[$i]->[2] / ($top_temporary[$i]->[1] || 1)); my $query = &highlight_code($top_temporary[$i]->[0]); my $md5 = ''; $md5 = 'md5: ' . md5_hex($top_temporary[$i]->[0]) if ($enable_checksum); my $example = qq{

}; $example = '' if (scalar keys %{$normalyzed_info{$top_temporary[$i]->[0]}{samples}} == 0); print $fh qq{ }; } $rank++; } print $fh qq{
Rank Count Total size Min size Max size Avg size Query
$rank $count $total_size $min_size $max_size $avg_size
$query
$md5 $example
}; my $k = $top_temporary[$i]->[0]; if ($normalyzed_info{$k}{count} > 1) { my $idx = 1; foreach my $d (sort {$b <=> $a} keys %{$normalyzed_info{$k}{samples}}) { $query = &highlight_code($normalyzed_info{$k}{samples}{$d}{query}); my $md5 = ''; $md5 = 'md5: ' . md5_hex($normalyzed_info{$k}{samples}{$d}{query}) if ($enable_checksum); my $details = "Duration: " . &convert_time($d) . "
"; $details .= "Database: $normalyzed_info{$k}{samples}{$d}{db}
" if ($normalyzed_info{$k}{samples}{$d}{db}); $details .= "User: $normalyzed_info{$k}{samples}{$d}{user}
" if ($normalyzed_info{$k}{samples}{$d}{user}); $details .= "Remote: $normalyzed_info{$k}{samples}{$d}{remote}
" if ($normalyzed_info{$k}{samples}{$d}{remote}); $details .= "Application: $normalyzed_info{$k}{samples}{$d}{app}
" if ($normalyzed_info{$k}{samples}{$d}{app}); $details .= "Bind query: yes
" if ($normalyzed_info{$k}{samples}{$d}{bind}); print $fh qq{
$query
$md5
$details
}; $idx++ } print $fh qq{

}; @top_temporary = (); } # Top queries generating the largest temporary files if ($#top_tempfile_info >= 0) { @top_tempfile_info = sort {$b->[0] <=> $a->[0]} @top_tempfile_info; my $largest = &comma_numbers($top_temporary[0]->[0]); print $fh qq{

Queries generating the largest temporary files

}; my $rank = 1; for (my $i = 0 ; $i <= $#top_tempfile_info ; $i++) { my $size = &pretty_print_size($top_tempfile_info[$i]->[0]); my $details = "[ Date: $top_tempfile_info[$i]->[1]"; $details .= " - Database: $top_tempfile_info[$i]->[3]" if ($top_tempfile_info[$i]->[3]); $details .= " - User: $top_tempfile_info[$i]->[4]" if ($top_tempfile_info[$i]->[4]); $details .= " - Remote: $top_tempfile_info[$i]->[5]" if ($top_tempfile_info[$i]->[5]); $details .= " - Application: $top_tempfile_info[$i]->[6]" if ($top_tempfile_info[$i]->[6]); $details .= " - Bind yes: yes" if ($top_tempfile_info[$i]->[7]); $details .= " ]"; my $query = &highlight_code($top_tempfile_info[$i]->[2]); my $md5 = ''; $md5 = 'md5: ' . md5_hex($top_tempfile_info[$i]->[2]) if ($enable_checksum); print $fh qq{ }; $rank++; } print $fh qq{
Rank Size Query
$rank $size
$query
$md5
$details
}; @top_tempfile_info = (); } } sub print_cancelled_report { my @top_cancelled = (); foreach my $h (keys %normalyzed_info) { if (exists($normalyzed_info{$h}{cancelled})) { push (@top_cancelled, [$h, $normalyzed_info{$h}{cancelled}{count}]); } } # Queries generating the most cancellation (N) if ($#top_cancelled >= 0) { @top_cancelled = sort {$b->[1] <=> $a->[1]} @top_cancelled; print $fh qq{

Queries generating the most cancellation (N)

}; my $rank = 1; for (my $i = 0 ; $i <= $#top_cancelled ; $i++) { my $count = &comma_numbers($top_cancelled[$i]->[1]); my $query = &highlight_code($top_cancelled[$i]->[0]); my $md5 = ''; $md5 = 'md5: ' . md5_hex($top_cancelled[$i]->[0]) if ($enable_checksum); my $example = qq{

}; $example = '' if (scalar keys %{$normalyzed_info{$top_cancelled[$i]->[0]}{samples}} == 0); print $fh qq{ }; } $rank++; } print $fh qq{
Rank Count Query
$rank $count
$query
$md5 $example
}; my $k = $top_cancelled[$i]->[0]; if ($normalyzed_info{$k}{count} >= 1) { my $idx = 1; foreach my $d (sort {$b <=> $a} keys %{$normalyzed_info{$k}{samples}}) { $query = &highlight_code($normalyzed_info{$k}{samples}{$d}{query}); my $md5 = ''; $md5 = 'md5: ' . md5_hex($normalyzed_info{$k}{samples}{$d}{query}) if ($enable_checksum); my $details = "Duration: " . &convert_time($d) . "
"; $details .= "Database: $normalyzed_info{$k}{samples}{$d}{db}
" if ($normalyzed_info{$k}{samples}{$d}{db}); $details .= "User: $normalyzed_info{$k}{samples}{$d}{user}
" if ($normalyzed_info{$k}{samples}{$d}{user}); $details .= "Remote: $normalyzed_info{$k}{samples}{$d}{remote}
" if ($normalyzed_info{$k}{samples}{$d}{remote}); $details .= "Application: $normalyzed_info{$k}{samples}{$d}{app}
" if ($normalyzed_info{$k}{samples}{$d}{app}); $details .= "Bind query: yes
" if ($normalyzed_info{$k}{samples}{$d}{bind}); print $fh qq{
$query
$md5
$details
}; $idx++ } print $fh qq{

}; @top_cancelled = (); } # Top queries generating the most cancellation if ($#top_cancelled_info >= 0) { @top_cancelled_info = sort {$b->[0] <=> $a->[0]} @top_cancelled_info; my $largest = &comma_numbers($top_cancelled[0]->[0]); print $fh qq{

Queries most cancelled

}; my $rank = 1; for (my $i = 0 ; $i <= $#top_cancelled_info ; $i++) { my $count = &comma_numbers($top_cancelled_info[$i]->[0]); my $details = "[ Date: $top_cancelled_info[$i]->[1]"; $details .= " - Database: $top_cancelled_info[$i]->[3]" if ($top_cancelled_info[$i]->[3]); $details .= " - User: $top_cancelled_info[$i]->[4]" if ($top_cancelled_info[$i]->[4]); $details .= " - Remote: $top_cancelled_info[$i]->[5]" if ($top_cancelled_info[$i]->[5]); $details .= " - Application: $top_cancelled_info[$i]->[6]" if ($top_cancelled_info[$i]->[6]); $details .= " - Bind yes: yes" if ($top_cancelled_info[$i]->[7]); $details .= " ]"; my $query = &highlight_code($top_cancelled_info[$i]->[2]); my $md5 = ''; $md5 = 'md5: ' . md5_hex($top_cancelled_info[$i]->[2]) if ($enable_checksum); print $fh qq{ }; $rank++; } print $fh qq{
Rank Number Query
$rank $count
$query
$md5
$details
}; @top_cancelled_info = (); } } sub print_histogram_query_times { my %data = (); my $histogram_info = ''; my $most_range = ''; my $most_range_value = ''; for (my $i = 1; $i <= $#histogram_query_time; $i++) { $histogram_info .= "$histogram_query_time[$i-1]-$histogram_query_time[$i]ms" . &comma_numbers($overall_stat{histogram}{query_time}{$histogram_query_time[$i-1]}) . "" . sprintf("%0.2f", ($overall_stat{histogram}{query_time}{$histogram_query_time[$i-1]} * 100) / ($overall_stat{histogram}{query_total}||1)) . "%"; $data{"$histogram_query_time[$i-1]-$histogram_query_time[$i]ms"} = ($overall_stat{histogram}{query_time}{$histogram_query_time[$i-1]} || 0); if ($overall_stat{histogram}{query_time}{$histogram_query_time[$i-1]} > $most_range_value) { $most_range = "$histogram_query_time[$i-1]-$histogram_query_time[$i]ms"; $most_range_value = $overall_stat{histogram}{query_time}{$histogram_query_time[$i-1]}; } } if ($overall_stat{histogram}{query_total} > 0) { $histogram_info .= " > $histogram_query_time[-1]ms" . &comma_numbers($overall_stat{histogram}{query_time}{'-1'}) . "" . sprintf("%0.2f", ($overall_stat{histogram}{query_time}{'-1'} * 100) / ($overall_stat{histogram}{query_total}||1)) . "%"; $data{"> $histogram_query_time[-1]ms"} = $overall_stat{histogram}{query_time}{"-1"} if ($overall_stat{histogram}{query_time}{"-1"} > 0); if ($overall_stat{histogram}{query_time}{"-1"} > $most_range_value) { $most_range = "> $histogram_query_time[-1]ms"; $most_range_value = $overall_stat{histogram}{query_time}{"-1"}; } } else { $histogram_info = qq{$NODATA}; } $drawn_graphs{histogram_query_times_graph} = &flotr2_duration_histograph($graphid++, 'graph_histogram_query_times', 'Queries', \@histogram_query_time, %data); $most_range_value = &comma_numbers($most_range_value) if ($most_range_value); print $fh qq{

Top Queries

Histogram of query times

Key values

  • $most_range_value $most_range duration
$drawn_graphs{histogram_query_times_graph}
$histogram_info
Range Count Percentage
}; delete $drawn_graphs{histogram_query_times_graph}; } sub print_slowest_individual_queries { print $fh qq{

Slowest individual queries

}; my $idx = 1; for (my $i = 0 ; $i <= $#top_slowest ; $i++) { my $rank = $i + 1; my $duration = &convert_time($top_slowest[$i]->[0]); my $date = $top_slowest[$i]->[1] || ''; my $details = "[ Date: " . ($top_slowest[$i]->[1] || ''); $details .= " - Database: $top_slowest[$i]->[3]" if ($top_slowest[$i]->[3]); $details .= " - User: $top_slowest[$i]->[4]" if ($top_slowest[$i]->[4]); $details .= " - Remote: $top_slowest[$i]->[5]" if ($top_slowest[$i]->[5]); $details .= " - Application: $top_slowest[$i]->[6]" if ($top_slowest[$i]->[6]); $details .= " - Bind query: yes" if ($top_slowest[$i]->[7]); $details .= " ]"; my $explain = ''; if ($top_slowest[$i]->[8]) { my $url = $EXPLAIN_URL . url_escape($top_slowest[$i]->[8]); $explain = "\n
" . $top_slowest[$i]->[8] . "
\n"; } my $query = &highlight_code($top_slowest[$i]->[2]); my $md5 = ''; $md5 = 'md5: ' . md5_hex($top_slowest[$i]->[2]) if ($enable_checksum); print $fh qq{ }; $idx++; } if ($#top_slowest == -1) { print $fh qq{}; } print $fh qq{
Rank Duration Query
$rank $duration
$query
$md5
$details
$explain
$NODATA
}; } sub print_time_consuming { print $fh qq{

Time consuming queries

}; my $rank = 1; my $found = 0; foreach my $k (sort {$normalyzed_info{$b}{duration} <=> $normalyzed_info{$a}{duration}} keys %normalyzed_info) { next if (!$normalyzed_info{$k}{count} || !exists $normalyzed_info{$k}{duration}); last if ($rank > $top); $found++; $normalyzed_info{$k}{average} = $normalyzed_info{$k}{duration} / $normalyzed_info{$k}{count}; my $duration = &convert_time($normalyzed_info{$k}{duration}); my $count = &comma_numbers($normalyzed_info{$k}{count}); my $min = &convert_time($normalyzed_info{$k}{min}); my $max = &convert_time($normalyzed_info{$k}{max}); my $avg = &convert_time($normalyzed_info{$k}{average}); my $query = &highlight_code($k); my $md5 = ''; $md5 = 'md5: ' . md5_hex($k) if ($enable_checksum); my $details = ''; my %hourly_count = (); my %hourly_duration = (); my $days = 0; foreach my $d (sort keys %{$normalyzed_info{$k}{chronos}}) { $d =~ /^(\d{4})(\d{2})(\d{2})$/; $days++; my $zday = "$abbr_month{$2} $3"; foreach my $h (sort keys %{$normalyzed_info{$k}{chronos}{$d}}) { $normalyzed_info{$k}{chronos}{$d}{$h}{average} = $normalyzed_info{$k}{chronos}{$d}{$h}{duration} / ($normalyzed_info{$k}{chronos}{$d}{$h}{count} || 1); $details .= ""; $zday = ""; foreach my $m (sort keys %{$normalyzed_info{$k}{chronos}{$d}{$h}{min}}) { my $rd = &average_per_minutes($m, $histo_avg_minutes); $hourly_count{"$h:$rd"} += $normalyzed_info{$k}{chronos}{$d}{$h}{min}{$m}; $hourly_duration{"$h:$rd"} += ($normalyzed_info{$k}{chronos}{$d}{$h}{min_duration}{$m} || 0); } if ($#histo_avgs > 0) { foreach my $rd (@histo_avgs) { next if (!exists $hourly_count{"$h:$rd"}); $details .= ""; } } } } # Set graph dataset my %graph_data = (); # we need a start date for flotr2 graph, we don't care of it as we just display HH:MM my $etime = timegm_nocheck(0, 0, 0, 18, 4, 80) * 1000; my $ctime = 0; foreach my $h ("00" .. "23") { foreach my $rd (@histo_avgs) { $ctime = (($h*3600)+($rd*60))*1000 + $etime; $graph_data{count} .= "[$ctime, " . (int($hourly_count{"$h:$rd"}/$days) || 0) . "],"; $graph_data{duration} .= "[$ctime, " . (int($hourly_duration{"$h:$rd"} / ($hourly_count{"$h:$rd"} || 1)) || 0) . "],"; } } $graph_data{count} =~ s/,$//; $graph_data{duration} =~ s/,$//; %hourly_count = (); %hourly_duration = (); $ctime = timegm_nocheck(0, 0, 0, 19, 4, 80) * 1000; my $users_involved = ''; if (scalar keys %{$normalyzed_info{$k}{users}} > 0) { $users_involved = qq{}; } my $apps_involved = ''; if (scalar keys %{$normalyzed_info{$k}{apps}} > 0) { $apps_involved = qq{}; } my $query_histo = &flotr2_histograph($graphid++, 'timeconsuming_graph_'.$rank, $graph_data{count}, $graph_data{duration}, 'Avg. queries', 'Avg. duration', $etime, $ctime); print $fh qq{ }; $rank++; } if (!$found) { print $fh qq{}; } print $fh qq{
Rank Total duration Times executed Min duration Max duration Avg duration Query
$zday$h" . &comma_numbers($normalyzed_info{$k}{chronos}{$d}{$h}{count}) . "" . &convert_time($normalyzed_info{$k}{chronos}{$d}{$h}{duration}) . "" . &convert_time($normalyzed_info{$k}{chronos}{$d}{$h}{average}) . "
$zday$h:$rd" . &comma_numbers($hourly_count{"$h:$rd"}) . "" . &convert_time($hourly_duration{"$h:$rd"}) . "" . &convert_time($hourly_duration{"$h:$rd"}/($hourly_count{"$h:$rd"}||1)) . "
$rank $duration $count

Details

$min $max $avg
$query
$md5

Times Reported Time consuming queries #$rank

$query_histo $details
Day Hour Count Duration Avg duration

$users_involved $apps_involved

}; if (scalar keys %{$normalyzed_info{$k}{users}} > 0) { print $fh qq{
}; my $idx = 1; foreach my $u (sort {$normalyzed_info{$k}{users}{$b}{duration} <=> $normalyzed_info{$k}{users}{$a}{duration}} keys %{$normalyzed_info{$k}{users}}) { if ($normalyzed_info{$k}{users}{$u}{duration} > 0) { my $details = "[User: $u"; $details .= " - Total duration: ".&convert_time($normalyzed_info{$k}{users}{$u}{duration}); $details .= " - Times executed: $normalyzed_info{$k}{users}{$u}{count}"; $details .= " ]\n"; print $fh qq{
$details
}; $idx++; } } print $fh qq{

}; } if (scalar keys %{$normalyzed_info{$k}{apps}} > 0) { print $fh qq{
}; my $idx = 1; foreach my $u (sort {$normalyzed_info{$k}{apps}{$b}{duration} <=> $normalyzed_info{$k}{apps}{$a}{duration}} keys %{$normalyzed_info{$k}{apps}}) { if ($normalyzed_info{$k}{apps}{$u}{duration} > 0) { my $details = "[Application: $u"; $details .= " - Total duration: ".&convert_time($normalyzed_info{$k}{apps}{$u}{duration}); $details .= " - Times executed: $normalyzed_info{$k}{apps}{$u}{count}"; $details .= " ]\n"; print $fh qq{
$details
}; $idx++; } } print $fh qq{

}; } print $fh qq{
}; my $idx = 1; foreach my $d (sort {$b <=> $a} keys %{$normalyzed_info{$k}{samples}}) { my $details = "[ Date: $normalyzed_info{$k}{samples}{$d}{date}"; $details .= " - Duration: " . &convert_time($d); $details .= " - Database: $normalyzed_info{$k}{samples}{$d}{db}" if ($normalyzed_info{$k}{samples}{$d}{db}); $details .= " - User: $normalyzed_info{$k}{samples}{$d}{user}" if ($normalyzed_info{$k}{samples}{$d}{user}); $details .= " - Remote: $normalyzed_info{$k}{samples}{$d}{remote}" if ($normalyzed_info{$k}{samples}{$d}{remote}); $details .= " - Application: $normalyzed_info{$k}{samples}{$d}{app}" if ($normalyzed_info{$k}{samples}{$d}{app}); $details .= " - Bind query: yes" if ($normalyzed_info{$k}{samples}{$d}{bind}); $details .= " ]"; my $explain = ''; if ($normalyzed_info{$k}{samples}{$d}{plan}) { my $url = $EXPLAIN_URL . url_escape($normalyzed_info{$k}{samples}{$d}{plan}); $explain = "\n
" . $normalyzed_info{$k}{samples}{$d}{plan} . "
\n"; } $query = &highlight_code($normalyzed_info{$k}{samples}{$d}{query}); my $md5 = ''; $md5 = 'md5: ' . md5_hex($normalyzed_info{$k}{samples}{$d}{query}) if ($enable_checksum); print $fh qq{
$query
$md5
$details
$explain }; $idx++; } print $fh qq{

$NODATA
}; } sub print_most_frequent { print $fh qq{

Most frequent queries (N)

}; my $rank = 1; foreach my $k (sort {$normalyzed_info{$b}{count} <=> $normalyzed_info{$a}{count}} keys %normalyzed_info) { next if (!$normalyzed_info{$k}{count}); last if ($rank > $top); $normalyzed_info{$k}{average} = $normalyzed_info{$k}{duration} / $normalyzed_info{$k}{count}; my $duration = &convert_time($normalyzed_info{$k}{duration}); my $count = &comma_numbers($normalyzed_info{$k}{count}); my $min = &convert_time($normalyzed_info{$k}{min}); my $max = &convert_time($normalyzed_info{$k}{max}); my $avg = &convert_time($normalyzed_info{$k}{average}); my $query = &highlight_code($k); my $md5 = ''; $md5 = 'md5: ' . md5_hex($k) if ($enable_checksum); my %hourly_count = (); my %hourly_duration = (); my $days = 0; my $details = ''; foreach my $d (sort keys %{$normalyzed_info{$k}{chronos}}) { $d =~ /^\d{4}(\d{2})(\d{2})$/; $days++; my $zday = "$abbr_month{$1} $2"; foreach my $h (sort keys %{$normalyzed_info{$k}{chronos}{$d}}) { $normalyzed_info{$k}{chronos}{$d}{$h}{average} = $normalyzed_info{$k}{chronos}{$d}{$h}{duration} / $normalyzed_info{$k}{chronos}{$d}{$h}{count}; $details .= ""; $zday = ""; foreach my $m (sort keys %{$normalyzed_info{$k}{chronos}{$d}{$h}{min}}) { my $rd = &average_per_minutes($m, $histo_avg_minutes); $hourly_count{"$h:$rd"} += $normalyzed_info{$k}{chronos}{$d}{$h}{min}{$m}; $hourly_duration{"$h:$rd"} += ($normalyzed_info{$k}{chronos}{$d}{$h}{min_duration}{$m} || 0); } if ($#histo_avgs > 0) { foreach my $rd (@histo_avgs) { next if (!exists $hourly_count{"$h:$rd"}); $details .= ""; } } } } # Set graph dataset my %graph_data = (); # we need a start date for flotr2 graph, we don't care of it as we just display HH:MM my $etime = timegm_nocheck(0, 0, 0, 18, 4, 80) * 1000; my $ctime = 0; foreach my $h ("00" .. "23") { foreach my $rd (@histo_avgs) { $ctime = (($h*3600)+($rd*60))*1000 + $etime; $graph_data{count} .= "[$ctime, " . (int($hourly_count{"$h:$rd"}/$days) || 0) . "],"; $graph_data{duration} .= "[$ctime, " . (int($hourly_duration{"$h:$rd"} / ($hourly_count{"$h:$rd"} || 1)) || 0) . "],"; } } $graph_data{count} =~ s/,$//; $graph_data{duration} =~ s/,$//; %hourly_count = (); %hourly_duration = (); $ctime = timegm_nocheck(0, 0, 0, 19, 4, 80) * 1000; my $query_histo = &flotr2_histograph($graphid++, 'mostfrequent_graph_'.$rank, $graph_data{count}, $graph_data{duration}, 'Avg. queries', 'Avg. duration', $etime, $ctime); my $users_involved = ''; if (scalar keys %{$normalyzed_info{$k}{users}} > 0) { $users_involved = qq{}; } my $apps_involved = ''; if (scalar keys %{$normalyzed_info{$k}{apps}} > 0) { $apps_involved = qq{}; } print $fh qq{ }; $rank++; } if (scalar keys %normalyzed_info == 0) { print $fh qq{}; } print $fh qq{
Rank Times executed Total duration Min duration Max duration Avg duration Query
$zday$h" . &comma_numbers($normalyzed_info{$k}{chronos}{$d}{$h}{count}) . "" . &convert_time($normalyzed_info{$k}{chronos}{$d}{$h}{duration}) . "" . &convert_time($normalyzed_info{$k}{chronos}{$d}{$h}{average}) . "
$zday$h:$rd" . &comma_numbers($hourly_count{"$h:$rd"}) . "" . &convert_time($hourly_duration{"$h:$rd"}) . "" . &convert_time($hourly_duration{"$h:$rd"}/($hourly_count{"$h:$rd"}||1)) . "
$rank $count

Details

$duration $min $max $avg
$query
$md5

Times Reported Time consuming queries #$rank

$query_histo $details
Day Hour Count Duration Avg duration

$users_involved $apps_involved

}; if (scalar keys %{$normalyzed_info{$k}{users}} > 0) { print $fh qq{
}; my $idx = 1; foreach my $u (sort {$normalyzed_info{$k}{users}{$b}{duration} <=> $normalyzed_info{$k}{users}{$a}{duration}} keys %{$normalyzed_info{$k}{users}}) { if ($normalyzed_info{$k}{users}{$u}{duration} > 0) { my $details = "[User: $u"; $details .= " - Total duration: ".&convert_time($normalyzed_info{$k}{users}{$u}{duration}); $details .= " - Times executed: $normalyzed_info{$k}{users}{$u}{count}"; $details .= " ]\n"; print $fh qq{
$details
}; $idx++; } } print $fh qq{

}; } if (scalar keys %{$normalyzed_info{$k}{apps}} > 0) { print $fh qq{
}; my $idx = 1; foreach my $u (sort {$normalyzed_info{$k}{apps}{$b}{duration} <=> $normalyzed_info{$k}{apps}{$a}{duration}} keys %{$normalyzed_info{$k}{apps}}) { if ($normalyzed_info{$k}{apps}{$u}{duration} > 0) { my $details = "[Application: $u"; $details .= " - Total duration: ".&convert_time($normalyzed_info{$k}{apps}{$u}{duration}); $details .= " - Times executed: $normalyzed_info{$k}{apps}{$u}{count}"; $details .= " ]\n"; print $fh qq{
$details
}; $idx++; } } print $fh qq{

}; } print $fh qq{
}; my $idx = 1; foreach my $d (sort {$b <=> $a} keys %{$normalyzed_info{$k}{samples}}) { my $details = "[ Date: $normalyzed_info{$k}{samples}{$d}{date}"; $details .= " - Duration: " . &convert_time($d); $details .= " - Database: $normalyzed_info{$k}{samples}{$d}{db}" if ($normalyzed_info{$k}{samples}{$d}{db}); $details .= " - User: $normalyzed_info{$k}{samples}{$d}{user}" if ($normalyzed_info{$k}{samples}{$d}{user}); $details .= " - Remote: $normalyzed_info{$k}{samples}{$d}{remote}" if ($normalyzed_info{$k}{samples}{$d}{remote}); $details .= " - Application: $normalyzed_info{$k}{samples}{$d}{app}" if ($normalyzed_info{$k}{samples}{$d}{app}); $details .= " - Bind query: yes" if ($normalyzed_info{$k}{samples}{$d}{bind}); $details .= " ]"; my $explain = ''; if ($normalyzed_info{$k}{samples}{$d}{plan}) { my $url = $EXPLAIN_URL . url_escape($normalyzed_info{$k}{samples}{$d}{plan}); $explain = "\n
" . $normalyzed_info{$k}{samples}{$d}{plan} . "
"; } $query = &highlight_code($normalyzed_info{$k}{samples}{$d}{query}); my $md5 = ''; $md5 = 'md5: ' . md5_hex($normalyzed_info{$k}{samples}{$d}{query}) if ($enable_checksum); print $fh qq{
$query
$md5
$details
$explain }; $idx++; } print $fh qq{

$NODATA
}; } sub print_slowest_queries { print $fh qq{

Normalized slowest queries (N)

}; my $rank = 1; my $found = 0; foreach my $k (sort {$normalyzed_info{$b}{average} <=> $normalyzed_info{$a}{average}} keys %normalyzed_info) { next if (!$k || !$normalyzed_info{$k}{count} || !exists $normalyzed_info{$k}{duration}); last if ($rank > $top); $found++; $normalyzed_info{$k}{average} = $normalyzed_info{$k}{duration} / $normalyzed_info{$k}{count}; my $duration = &convert_time($normalyzed_info{$k}{duration}); my $count = &comma_numbers($normalyzed_info{$k}{count}); my $min = &convert_time($normalyzed_info{$k}{min}); my $max = &convert_time($normalyzed_info{$k}{max}); my $avg = &convert_time($normalyzed_info{$k}{average}); my $query = &highlight_code($k); my $md5 = ''; $md5 = 'md5: ' . md5_hex($k) if ($enable_checksum); my $details = ''; my %hourly_count = (); my %hourly_duration = (); my $days = 0; foreach my $d (sort keys %{$normalyzed_info{$k}{chronos}}) { my $c = 1; $d =~ /^\d{4}(\d{2})(\d{2})$/; $days++; my $zday = "$abbr_month{$1} $2"; foreach my $h (sort keys %{$normalyzed_info{$k}{chronos}{$d}}) { $normalyzed_info{$k}{chronos}{$d}{$h}{average} = $normalyzed_info{$k}{chronos}{$d}{$h}{duration} / $normalyzed_info{$k}{chronos}{$d}{$h}{count}; $details .= ""; $zday = ""; foreach my $m (sort keys %{$normalyzed_info{$k}{chronos}{$d}{$h}{min}}) { my $rd = &average_per_minutes($m, $histo_avg_minutes); $hourly_count{"$h:$rd"} += $normalyzed_info{$k}{chronos}{$d}{$h}{min}{$m}; $hourly_duration{"$h:$rd"} += ($normalyzed_info{$k}{chronos}{$d}{$h}{min_duration}{$m} || 0); } if ($#histo_avgs > 0) { foreach my $rd (@histo_avgs) { next if (!exists $hourly_count{"$h:$rd"}); $details .= ""; } } } } # Set graph dataset my %graph_data = (); # we need a start date for flotr2 graph, we don't care of it as we just display HH:MM my $etime = timegm_nocheck(0, 0, 0, 18, 4, 80) * 1000; my $ctime = 0; foreach my $h ("00" .. "23") { foreach my $rd (@histo_avgs) { $ctime = (($h*3600)+($rd*60))*1000 + $etime; $graph_data{count} .= "[$ctime, " . (int($hourly_count{"$h:$rd"}/$days) || 0) . "],"; $graph_data{duration} .= "[$ctime, " . (int($hourly_duration{"$h:$rd"} / ($hourly_count{"$h:$rd"} || 1)) || 0) . "],"; } } $graph_data{count} =~ s/,$//; $graph_data{duration} =~ s/,$//; %hourly_count = (); %hourly_duration = (); $ctime = timegm_nocheck(0, 0, 0, 19, 4, 80) * 1000; my $query_histo = &flotr2_histograph($graphid++, 'normalizedslowest_graph_'.$rank, $graph_data{count}, $graph_data{duration}, 'Avg. queries', 'Avg. duration', $etime, $ctime); my $users_involved = ''; if (scalar keys %{$normalyzed_info{$k}{users}} > 0) { $users_involved = qq{}; } my $apps_involved = ''; if (scalar keys %{$normalyzed_info{$k}{apps}} > 0) { $apps_involved = qq{}; } print $fh qq{ }; $rank++; } if (!$found) { print $fh qq{}; } print $fh qq{
Rank Min duration Max duration Avg duration Times executed Total duration Query
$zday$h" . &comma_numbers($normalyzed_info{$k}{chronos}{$d}{$h}{count}) . "" . &convert_time($normalyzed_info{$k}{chronos}{$d}{$h}{duration}) . "" . &convert_time($normalyzed_info{$k}{chronos}{$d}{$h}{average}) . "
$zday$h:$rd" . &comma_numbers($hourly_count{"$h:$rd"}) . "" . &convert_time($hourly_duration{"$h:$rd"}) . "" . &convert_time($hourly_duration{"$h:$rd"}/($hourly_count{"$h:$rd"}||1)) . "
$rank $min $max $avg $count

Details

$duration
$query
$md5

Times Reported Time consuming queries #$rank

$query_histo $details
Day Hour Count Duration Avg duration

$users_involved

}; if (scalar keys %{$normalyzed_info{$k}{users}} > 0) { print $fh qq{
}; my $idx = 1; foreach my $u (sort {$normalyzed_info{$k}{users}{$b}{duration} <=> $normalyzed_info{$k}{users}{$a}{duration}} keys %{$normalyzed_info{$k}{users}}) { if ($normalyzed_info{$k}{users}{$u}{duration} > 0) { my $details = "[User: $u"; $details .= " - Total duration: ".&convert_time($normalyzed_info{$k}{users}{$u}{duration}); $details .= " - Times executed: $normalyzed_info{$k}{users}{$u}{count}"; $details .= " ]\n"; print $fh qq{
$details
}; $idx++; } } print $fh qq{

}; } if (scalar keys %{$normalyzed_info{$k}{apps}} > 0) { print $fh qq{
}; my $idx = 1; foreach my $u (sort {$normalyzed_info{$k}{apps}{$b}{duration} <=> $normalyzed_info{$k}{apps}{$a}{duration}} keys %{$normalyzed_info{$k}{apps}}) { if ($normalyzed_info{$k}{apps}{$u}{duration} > 0) { my $details = "[Application: $u"; $details .= " - Total duration: ".&convert_time($normalyzed_info{$k}{apps}{$u}{duration}); $details .= " - Times executed: $normalyzed_info{$k}{apps}{$u}{count}"; $details .= " ]\n"; print $fh qq{
$details
}; $idx++; } } print $fh qq{

}; } print $fh qq{
}; my $idx = 1; foreach my $d (sort {$b <=> $a} keys %{$normalyzed_info{$k}{samples}}) { my $details = "[ Date: $normalyzed_info{$k}{samples}{$d}{date}"; $details .= " - Duration: " . &convert_time($d); $details .= " - Database: $normalyzed_info{$k}{samples}{$d}{db}" if ($normalyzed_info{$k}{samples}{$d}{db}); $details .= " - User: $normalyzed_info{$k}{samples}{$d}{user}" if ($normalyzed_info{$k}{samples}{$d}{user}); $details .= " - Remote: $normalyzed_info{$k}{samples}{$d}{remote}" if ($normalyzed_info{$k}{samples}{$d}{remote}); $details .= " - Application: $normalyzed_info{$k}{samples}{$d}{app}" if ($normalyzed_info{$k}{samples}{$d}{app}); $details .= " - Bind query: yes" if ($normalyzed_info{$k}{samples}{$d}{bind}); $details .= " ]"; my $explain = ''; if ($normalyzed_info{$k}{samples}{$d}{plan}) { my $url = $EXPLAIN_URL . url_escape($normalyzed_info{$k}{samples}{$d}{plan}); $explain = "\n
" . $normalyzed_info{$k}{samples}{$d}{plan} . "
\n"; } $query = &highlight_code($normalyzed_info{$k}{samples}{$d}{query}); my $md5 = ''; $md5 = 'md5: ' . md5_hex($normalyzed_info{$k}{samples}{$d}{query}) if ($enable_checksum); print $fh qq{
$query
$md5
$details
$explain }; $idx++; } print $fh qq{

$NODATA
}; } sub dump_as_html { my $uri = shift; # Dump the html header &html_header($uri); if (!$error_only) { # Overall statistics print $fh qq{
  • }; &print_overall_statistics(); # Set graphs limits $overall_stat{'first_log_ts'} =~ /^(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)/; $t_min = timegm_nocheck(0, $5, $4, $3, $2 - 1, $1) * 1000; $t_min -= ($avg_minutes * 60000); $overall_stat{'last_log_ts'} =~ /^(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)/; $t_max = timegm_nocheck(59, $5, $4, $3, $2 - 1, $1) * 1000; $t_max += ($avg_minutes * 60000); if (!$disable_hourly) { # Build graphs based on hourly stat &compute_query_graphs(); # Show global SQL traffic &print_sql_traffic(); # Show hourly statistics &print_general_activity(); } if (!$disable_connection) { print $fh qq{
  • Connections

    }; # Draw connections information &print_established_connection() if (!$disable_hourly); # Show per database/user connections &print_database_connection() if (exists $connection_info{database}); # Show per user connections &print_user_connection() if (exists $connection_info{user}); # Show per client ip connections &print_host_connection() if (exists $connection_info{host}); } # Show session per database statistics if (!$disable_session) { print $fh qq{
  • Sessions

    }; # Show number of simultaneous sessions &print_simultaneous_session(); # Show histogram for session times &print_histogram_session_times(); # Show per database sessions &print_database_session(); # Show per user sessions &print_user_session(); # Show per host sessions &print_host_session(); # Show per application sessions &print_app_session(); } # Display checkpoint and temporary files report if (!$disable_checkpoint) { print $fh qq{
  • }; &print_checkpoint(); } if (!$disable_temporary) { print $fh qq{
  • }; # Show temporary files detailed information &print_temporary_file(); # Show information about queries generating temporary files &print_tempfile_report(); } if (!$disable_autovacuum) { print $fh qq{
  • }; # Show detailed vacuum/analyse information &print_vacuum(); } if (!$disable_lock) { print $fh qq{
  • }; # Lock stats per type &print_lock_type(); # Show lock wait detailed information &print_lock_queries_report(); } if (!$disable_query) { print $fh qq{
  • }; # INSERT/DELETE/UPDATE/SELECT repartition if (!$disable_type) { &print_query_type(); # Show requests per database &print_query_per_database(); # Show requests per user &print_query_per_user(); # Show requests per host &print_query_per_host(); # Show requests per application &print_query_per_application(); ; # Show cancelled queries detailed information &print_cancelled_queries(); # Show information about cancelled queries &print_cancelled_report(); } print $fh qq{
  • }; # Show histogram for query times &print_histogram_query_times(); # Show top information &print_slowest_individual_queries(); # Show queries that took up the most time &print_time_consuming(); # Show most frequent queries &print_most_frequent(); # Print normalized slowest queries &print_slowest_queries } } # Show errors report if (!$disable_error) { if (!$error_only) { print $fh qq{
  • }; } else { print $fh qq{
  • }; } # Show log level distribution &print_log_level(); # Show Most Frequent Errors/Events &show_error_as_html(); } # Dump the html footer &html_footer(); } sub url_escape { my $toencode = shift; return if (!$toencode); utf8::encode($toencode) if (($] >= 5.008) && utf8::is_utf8($toencode)); if (EBCDIC) { $toencode =~ s/([^a-zA-Z0-9_.~-])/uc sprintf("%%%02x",$E2A[ord($1)])/eg; } else { $toencode =~ s/([^a-zA-Z0-9_.~-])/uc sprintf("%%%02x",ord($1))/eg; } return $toencode; } sub escape_html { $_[0] =~ s/<([\/a-zA-Z][\s\t\>]*)/\<$1/sg; return $_[0]; } sub print_log_level { my %infos = (); # Some messages have seen their log level change during log parsing. # Set the real log level count back foreach my $k (sort {$error_info{$b}{count} <=> $error_info{$a}{count}} keys %error_info) { next if (!$error_info{$k}{count}); if ($error_info{$k}{count} > 1) { for (my $i = 0 ; $i <= $#{$error_info{$k}{date}} ; $i++) { if ( ($error_info{$k}{error}[$i] =~ s/ERROR: (parameter "[^"]+" changed to)/LOG: $1/) || ($error_info{$k}{error}[$i] =~ s/ERROR: (database system was shut down)/LOG: $1/) || ($error_info{$k}{error}[$i] =~ s/ERROR: (database system was interrupted while in recovery)/LOG: $1/) || ($error_info{$k}{error}[$i] =~ s/ERROR: (recovery has paused)/LOG: $1/)) { $logs_type{ERROR}--; $logs_type{LOG}++; } } } else { if ( ($error_info{$k}{error}[0] =~ s/ERROR: (parameter "[^"]+" changed to)/LOG: $1/) || ($error_info{$k}{error}[0] =~ s/ERROR: (database system was shut down)/LOG: $1/) || ($error_info{$k}{error}[0] =~ s/ERROR: (database system was interrupted while in recovery)/LOG: $1/) || ($error_info{$k}{error}[0] =~ s/ERROR: (recovery has paused)/LOG: $1/)) { $logs_type{ERROR}--; $logs_type{LOG}++; } } } # Show log types my $total_logs = 0; foreach my $d (sort keys %logs_type) { $total_logs += $logs_type{$d}; } my $logtype_info = ''; foreach my $d (sort keys %logs_type) { next if (!$logs_type{$d}); $logtype_info .= "$d" . &comma_numbers($logs_type{$d}) . "" . sprintf("%0.2f", ($logs_type{$d} * 100) / ($total_logs||1)) . "%"; } my %graph_data = (); my %max_events = (); if ($graph) { my @small = (); foreach my $d (sort keys %logs_type) { if ((($logs_type{$d} * 100) / ($total_logs || 1)) > $pie_percentage_limit) { $infos{$d} = $logs_type{$d} || 0; } else { $infos{"Sum log types < $pie_percentage_limit%"} += $logs_type{$d} || 0; push(@small, $d); } } if ($#small == 0) { $infos{$small[0]} = $infos{"Sum log types < $pie_percentage_limit%"}; delete $infos{"Sum log types < $pie_percentage_limit%"}; } foreach my $l (qw(FATAL WARNING ERROR PANIC)) { $max_events{$l} = 0; } foreach my $tm (sort {$a <=> $b} keys %per_minute_info) { $tm =~ /(\d{4})(\d{2})(\d{2})/; my $y = $1 - 1900; my $mo = $2 - 1; my $d = $3; foreach my $h ("00" .. "23") { next if (!exists $per_minute_info{$tm}{$h}); my %e_dataavg = (); foreach my $m ("00" .. "59") { next if (!exists $per_minute_info{$tm}{$h}{$m}); my $rd = &average_per_minutes($m, $avg_minutes); if (exists $per_minute_info{$tm}{$h}{$m}{log_level}) { # Average per minute foreach my $l (qw(FATAL WARNING ERROR PANIC)) { $e_dataavg{$l}{"$rd"} += ($per_minute_info{$tm}{$h}{$m}{log_level}{$l} || 0); $max_events{$l} += ($per_minute_info{$tm}{$h}{$m}{log_level}{$l} || 0); } delete $per_minute_info{$tm}{$h}{$m}{log_level}; } } foreach my $rd (@avgs) { my $t = timegm_nocheck(0, $rd, $h, $d, $mo, $y) * 1000; next if ($t < $t_min); last if ($t > $t_max); if (scalar keys %e_dataavg> 0) { foreach my $l (qw(FATAL ERROR PANIC WARNING)) { $graph_data{$l} .= "[$t, " . ($e_dataavg{$l}{"$rd"} || 0) . "],"; } } } } } foreach (keys %graph_data) { $graph_data{$_} =~ s/,$//; } } $drawn_graphs{'eventspersecond_graph'} = &flotr2_graph( $graphid++, 'eventspersecond_graph', $graph_data{'PANIC'}, $graph_data{FATAL}, $graph_data{'ERROR'}, 'Errors per ' . $avg_minutes . ' minutes', 'Errors per ' . $avg_minutes . ' minutes', 'PANIC', 'FATAL', 'ERROR', '', $graph_data{'WARNING'}, 'WARNING' ); $drawn_graphs{logstype_graph} = &flotr2_piegraph($graphid++, 'graph_logstype', 'Logs per type', %infos); if (!$total_logs) { $logtype_info = qq{$NODATA}; } $logs_type{ERROR} ||= 0; $logs_type{FATAL} ||= 0; $total_logs = &comma_numbers($total_logs); print $fh qq{

    Events

    Log levels

    Key values

    • $total_logs Log entries
    $drawn_graphs{logstype_graph}
    $logtype_info
    Type Count Percentage

    Events distribution

    Key values

    • $max_events{PANIC} PANIC entries
    • $max_events{FATAL} FATAL entries
    • $max_events{ERROR} ERROR entries
    • $max_events{WARNING} WARNING entries

    Errors per $avg_minutes minutes

    $drawn_graphs{'eventspersecond_graph'}
    }; delete $drawn_graphs{logstype_graph}; delete $drawn_graphs{'eventspersecond_graph'}; } sub show_error_as_html { my $main_error = 0; my $total = 0; foreach my $k (sort {$error_info{$b}{count} <=> $error_info{$a}{count}} keys %error_info) { next if (!$error_info{$k}{count}); $main_error = &comma_numbers($error_info{$k}{count}) if (!$main_error); $total += $error_info{$k}{count}; } $total = &comma_numbers($total); print $fh qq{

    Most Frequent Errors/Events

    Key values

    • $main_error Max number of times the same event was reported
    • $total Total events found
    }; my $rank = 1; foreach my $k (sort {$error_info{$b}{count} <=> $error_info{$a}{count}} keys %error_info) { next if (!$error_info{$k}{count}); my $count = &comma_numbers($error_info{$k}{count}); my $msg = $k; $msg =~ s/ERROR: (parameter "[^"]+" changed to)/LOG: $1/; $msg =~ s/ERROR: (database system was shut down)/LOG: $1/; $msg =~ s/ERROR: (database system was interrupted while in recovery)/LOG: $1/; $msg =~ s/ERROR: (recovery has paused)/LOG: $1/; my $error_level_class = 'text-error'; if ($msg =~ /^WARNING: /) { $error_level_class = 'text-warning'; } elsif ($msg =~ /^LOG: /) { $error_level_class = 'text-success'; } elsif ($msg =~ /^HINT: /) { $error_level_class = 'text-info'; } elsif ($msg =~ /^FATAL: /) { $error_level_class = 'text-fatal'; } elsif ($msg =~ /^PANIC: /) { $error_level_class = 'text-panic'; } my $details = ''; my %hourly_count = (); my $days = 0; foreach my $d (sort keys %{$error_info{$k}{chronos}}) { my $c = 1; $d =~ /^\d{4}(\d{2})(\d{2})$/; $days++; my $zday = "$abbr_month{$1} $2"; foreach my $h (sort keys %{$error_info{$k}{chronos}{$d}}) { $details .= ""; $zday = ""; foreach my $m (sort keys %{$error_info{$k}{chronos}{$d}{$h}{min}}) { my $rd = &average_per_minutes($m, $histo_avg_minutes); $hourly_count{"$h:$rd"} += $error_info{$k}{chronos}{$d}{$h}{min}{$m}; } if ($#histo_avgs > 0) { foreach my $rd (@histo_avgs) { next if (!exists $hourly_count{"$h:$rd"}); $details .= ""; } } } } # Set graph dataset my %graph_data = (); # we need a start date for flotr2 graph, we don't care of it as we just display HH:MM my $etime = timegm_nocheck(0, 0, 0, 18, 4, 80) * 1000; my $ctime = 0; foreach my $h ("00" .. "23") { foreach my $rd (@histo_avgs) { $ctime = (($h*3600)+($rd*60))*1000 + $etime; $graph_data{count} .= "[$ctime, " . (int($hourly_count{"$h:$rd"}/$days) || 0) . "],"; } } $graph_data{count} =~ s/,$//; %hourly_count = (); $ctime = timegm_nocheck(0, 0, 0, 19, 4, 80) * 1000; my $error_histo = &flotr2_histograph($graphid++, 'error_graph_'.$rank, $graph_data{count}, '', 'Avg. events', '', $etime, $ctime); # Escape HTML code in error message $msg = &escape_html($msg); print $fh qq{ }; $rank++; } if (scalar keys %error_info == 0) { print $fh qq{}; } print $fh qq{
    Rank Times reported Error
    $zday$h" . &comma_numbers($error_info{$k}{chronos}{$d}{$h}{count}) . "
    $zday$h:$rd" . &comma_numbers($hourly_count{"$h:$rd"}) . "
    $rank $count

    Details

    $msg

    Times Reported Most Frequent Error / Event #$rank

    $error_histo $details
    Day Hour Count

    }; print $fh qq{

    } if (($sample > 0) && ($#{$error_info{$k}{date}} >= 0)); print $fh qq{
    }; for (my $i = 0 ; $i <= $#{$error_info{$k}{date}} ; $i++) { last if (($sample > 0) && ($i == $sample)); # Escape HTML code in error message my $message = &escape_html($error_info{$k}{error}[$i]); my $details = "Date: " . $error_info{$k}{date}[$i] . "\n"; if ($error_info{$k}{detail}[$i]) { $details .= "Detail: " . &escape_html($error_info{$k}{detail}[$i]) . "
    "; } if ($error_info{$k}{context}[$i]) { $details .= "Context: " . &escape_html($error_info{$k}{context}[$i]) . "
    "; } if ($error_info{$k}{hint}[$i]) { $details .= "Hint: " . &escape_html($error_info{$k}{hint}[$i]) . "
    "; } if ($error_info{$k}{statement}[$i]) { $details .= "Statement: " . &escape_html($error_info{$k}{statement}[$i]) . "
    "; } if ($error_info{$k}{db}[$i]) { $details .= "Database: $error_info{$k}{db}[$i] User: $error_info{$k}{user}[$i] Remote: $error_info{$k}{remote}[$i]
    "; } print $fh qq{
    $message
    $details
    }; } print $fh qq{

    $NODATA
    }; } sub load_stats { my $fd = shift; my %stats = %{ fd_retrieve($fd) }; my %_overall_stat = %{$stats{overall_stat}}; my %_overall_checkpoint = %{$stats{overall_checkpoint}}; my %_normalyzed_info = %{$stats{normalyzed_info}}; my %_error_info = %{$stats{error_info}}; my %_connection_info = %{$stats{connection_info}}; my %_database_info = %{$stats{database_info}}; my %_application_info = %{$stats{application_info}}; my %_user_info = %{$stats{user_info}}; my %_host_info = %{$stats{host_info}}; my %_checkpoint_info = %{$stats{checkpoint_info}}; my %_session_info = %{$stats{session_info}}; my %_tempfile_info = %{$stats{tempfile_info}}; my %_cancelled_info = %{$stats{cancelled_info}}; my %_logs_type = %{$stats{logs_type}}; my %_lock_info = %{$stats{lock_info}}; my %_per_minute_info = %{$stats{per_minute_info}}; my @_top_slowest = @{$stats{top_slowest}}; my $_nlines = $stats{nlines}; my $_first_log_timestamp = $stats{first_log_timestamp}; my $_last_log_timestamp = $stats{last_log_timestamp}; my @_log_files = @{$stats{log_files}}; my %_autovacuum_info = %{$stats{autovacuum_info}}; my %_autoanalyze_info = %{$stats{autoanalyze_info}}; my @_top_locked_info = @{$stats{top_locked_info}}; my @_top_tempfile_info = @{$stats{top_tempfile_info}}; my @_top_cancelled_info = @{$stats{top_cancelled_info}}; ### overall_stat ### $overall_stat{queries_number} += $_overall_stat{queries_number}; if ($_overall_stat{'first_log_ts'}) { $overall_stat{'first_log_ts'} = $_overall_stat{'first_log_ts'} if (!$overall_stat{'first_log_ts'} || ($overall_stat{'first_log_ts'} gt $_overall_stat{'first_log_ts'})); } $overall_stat{'last_log_ts'} = $_overall_stat{'last_log_ts'} if not $overall_stat{'last_log_ts'} or $overall_stat{'last_log_ts'} lt $_overall_stat{'last_log_ts'}; if ($_overall_stat{'first_query_ts'}) { $overall_stat{'first_query_ts'} = $_overall_stat{'first_query_ts'} if (!$overall_stat{'first_query_ts'} || ($overall_stat{'first_query_ts'} gt $_overall_stat{'first_query_ts'})); } $overall_stat{'last_query_ts'} = $_overall_stat{'last_query_ts'} if not $overall_stat{'last_query_ts'} or $overall_stat{'last_query_ts'} lt $_overall_stat{'last_query_ts'}; $overall_stat{errors_number} += $_overall_stat{errors_number}; $overall_stat{queries_duration} += $_overall_stat{queries_duration}; $overall_stat{DELETE} += $_overall_stat{DELETE} if exists $_overall_stat{DELETE}; $overall_stat{UPDATE} += $_overall_stat{UPDATE} if exists $_overall_stat{UPDATE}; $overall_stat{INSERT} += $_overall_stat{INSERT} if exists $_overall_stat{INSERT}; $overall_stat{SELECT} += $_overall_stat{SELECT} if exists $_overall_stat{SELECT}; $overall_checkpoint{checkpoint_warning} += $_overall_checkpoint{checkpoint_warning}; $overall_checkpoint{checkpoint_write} = $_overall_checkpoint{checkpoint_write} if ($_overall_checkpoint{checkpoint_write} > $overall_checkpoint{checkpoint_write}); $overall_checkpoint{checkpoint_sync} = $_overall_checkpoint{checkpoint_sync} if ($_overall_checkpoint{checkpoint_sync} > $overall_checkpoint{checkpoint_sync}); foreach my $k (keys %{$_overall_stat{peak}}) { $overall_stat{peak}{$k}{query} += $_overall_stat{peak}{$k}{query}; $overall_stat{peak}{$k}{select} += $_overall_stat{peak}{$k}{select}; $overall_stat{peak}{$k}{write} += $_overall_stat{peak}{$k}{write}; $overall_stat{peak}{$k}{connection} += $_overall_stat{peak}{$k}{connection}; $overall_stat{peak}{$k}{session} += $_overall_stat{peak}{$k}{session}; $overall_stat{peak}{$k}{tempfile_size} += $_overall_stat{peak}{$k}{tempfile_size}; $overall_stat{peak}{$k}{tempfile_count} += $_overall_stat{peak}{$k}{tempfile_count}; $overall_stat{peak}{$k}{cancelled_size} += $_overall_stat{peak}{$k}{cancelled_size}; $overall_stat{peak}{$k}{cancelled_count} += $_overall_stat{peak}{$k}{cancelled_count}; } foreach my $k (keys %{$_overall_stat{histogram}{query_time}}) { $overall_stat{histogram}{query_time}{$k} += $_overall_stat{histogram}{query_time}{$k}; } $overall_stat{histogram}{query_total} += $_overall_stat{histogram}{total}; $overall_stat{histogram}{query_total} += $_overall_stat{histogram}{query_total}; foreach my $k (keys %{$_overall_stat{histogram}{session_time}}) { $overall_stat{histogram}{session_time}{$k} += $_overall_stat{histogram}{session_time}{$k}; } $overall_stat{histogram}{session_total} += $_overall_stat{histogram}{session_total}; foreach my $k ('prepare', 'bind','execute') { $overall_stat{$k} += $_overall_stat{$k}; } foreach my $k (keys %{$_overall_checkpoint{peak}}) { $overall_checkpoint{peak}{$k}{checkpoint_wbuffer} += $_overall_checkpoint{peak}{$k}{checkpoint_wbuffer}; $overall_checkpoint{peak}{$k}{walfile_usage} += $_overall_checkpoint{peak}{$k}{walfile_usage}; } ### Logs level ### foreach my $l (qw(LOG WARNING ERROR FATAL PANIC DETAIL HINT STATEMENT CONTEXT)) { $logs_type{$l} += $_logs_type{$l} if exists $_logs_type{$l}; } ### database_info ### foreach my $db (keys %_database_info) { foreach my $k (keys %{ $_database_info{$db} }) { $database_info{$db}{$k} += $_database_info{$db}{$k}; } } ### application_info ### foreach my $app (keys %_application_info) { foreach my $k (keys %{ $_application_info{$app} }) { $application_info{$app}{$k} += $_application_info{$app}{$k}; } } ### user_info ### foreach my $u (keys %_user_info) { foreach my $k (keys %{ $_user_info{$u} }) { $user_info{$u}{$k} += $_user_info{$u}{$k}; } } ### host_info ### foreach my $h (keys %_host_info) { foreach my $k (keys %{ $_host_info{$h} }) { $host_info{$h}{$k} += $_host_info{$h}{$k}; } } ### connection_info ### foreach my $db (keys %{ $_connection_info{database} }) { $connection_info{database}{$db} += $_connection_info{database}{$db}; } foreach my $db (keys %{ $_connection_info{database_user} }) { foreach my $user (keys %{ $_connection_info{database_user}{$db} }) { $connection_info{database_user}{$db}{$user} += $_connection_info{database_user}{$db}{$user}; } } foreach my $user (keys %{ $_connection_info{user} }) { $connection_info{user}{$user} += $_connection_info{user}{$user}; } foreach my $host (keys %{ $_connection_info{host} }) { $connection_info{host}{$host} += $_connection_info{host}{$host}; } $connection_info{count} += $_connection_info{count}; foreach my $day (keys %{ $_connection_info{chronos} }) { foreach my $hour (keys %{ $_connection_info{chronos}{$day} }) { $connection_info{chronos}{$day}{$hour}{count} += $_connection_info{chronos}{$day}{$hour}{count} ############################################################################### # May be used in the future to display more detailed information on connection # # foreach my $db (keys %{ $_connection_info{chronos}{$day}{$hour}{database} }) { # $connection_info{chronos}{$day}{$hour}{database}{$db} += $_connection_info{chronos}{$day}{$hour}{database}{$db}; # } # # foreach my $db (keys %{ $_connection_info{chronos}{$day}{$hour}{database_user} }) { # foreach my $user (keys %{ $_connection_info{chronos}{$day}{$hour}{database_user}{$db} }) { # $connection_info{chronos}{$day}{$hour}{database_user}{$db}{$user} += # $_connection_info{chronos}{$day}{$hour}{database_user}{$db}{$user}; # } # } # # foreach my $user (keys %{ $_connection_info{chronos}{$day}{$hour}{user} }) { # $connection_info{chronos}{$day}{$hour}{user}{$user} += # $_connection_info{chronos}{$day}{$hour}{user}{$user}; # } # # foreach my $host (keys %{ $_connection_info{chronos}{$day}{$hour}{host} }) { # $connection_info{chronos}{$day}{$hour}{host}{$host} += # $_connection_info{chronos}{$day}{$hour}{host}{$host}; # } ############################################################################### } } ### log_files ### foreach my $f (@_log_files) { push(@log_files, $f) if (!grep(m#^$f$#, @_log_files)); } ### error_info ### foreach my $q (keys %_error_info) { $error_info{$q}{count} += $_error_info{$q}{count}; foreach my $day (keys %{ $_error_info{$q}{chronos} }) { foreach my $hour (keys %{$_error_info{$q}{chronos}{$day}}) { $error_info{$q}{chronos}{$day}{$hour}{count} += $_error_info{$q}{chronos}{$day}{$hour}{count}; foreach my $min (keys %{$_error_info{$q}{chronos}{$day}{$hour}{min}}) { $error_info{$q}{chronos}{$day}{$hour}{min}{$min} += $_error_info{$q}{chronos}{$day}{$hour}{min}{$min}; } } } for (my $i = 0; $i <= $#{$_error_info{$q}{date}}; $i++) { &set_top_error_sample( $q, $_error_info{$q}{date}[$i], $_error_info{$q}{error}[$i], $_error_info{$q}{detail}[$i], $_error_info{$q}{context}[$i], $_error_info{$q}{statement}[$i], $_error_info{$q}{hint}[$i], $_error_info{$q}{db}[$i], $_error_info{$q}{user}[$i], $_error_info{$q}{app}[$i], $_error_info{$q}{remote}[$i] ); } } ### per_minute_info ### foreach my $day (keys %_per_minute_info) { foreach my $hour (keys %{ $_per_minute_info{$day} }) { foreach my $min (keys %{ $_per_minute_info{$day}{$hour} }) { $per_minute_info{$day}{$hour}{$min}{connection}{count} += ($_per_minute_info{$day}{$hour}{$min}{connection}{count} || 0); $per_minute_info{$day}{$hour}{$min}{session}{count} += ($_per_minute_info{$day}{$hour}{$min}{session}{count} || 0); $per_minute_info{$day}{$hour}{$min}{query}{count} += ($_per_minute_info{$day}{$hour}{$min}{query}{count} || 0); $per_minute_info{$day}{$hour}{$min}{query}{duration} += $_per_minute_info{$day}{$hour}{$min}{query}{duration}; $per_minute_info{$day}{$hour}{$min}{query}{min} = $_per_minute_info{$day}{$hour}{$min}{query}{min} if (!exists $per_minute_info{$day}{$hour}{$min}{query}{min} || ($per_minute_info{$day}{$hour}{$min}{query}{min} > $_per_minute_info{$day}{$hour}{$min}{query}{min})); $per_minute_info{$day}{$hour}{$min}{query}{max} = $_per_minute_info{$day}{$hour}{$min}{query}{max} if (!exists $per_minute_info{$day}{$hour}{$min}{query}{max} || ($per_minute_info{$day}{$hour}{$min}{query}{max} < $_per_minute_info{$day}{$hour}{$min}{query}{max})); foreach my $sec (keys %{ $_per_minute_info{$day}{$hour}{$min}{connection}{second} }) { $per_minute_info{$day}{$hour}{$min}{connection}{second}{$sec} += ($_per_minute_info{$day}{$hour}{$min}{connection}{second}{$sec} || 0); } foreach my $sec (keys %{ $_per_minute_info{$day}{$hour}{$min}{session}{second} }) { $per_minute_info{$day}{$hour}{$min}{session}{second}{$sec} += ($_per_minute_info{$day}{$hour}{$min}{session}{second}{$sec} || 0); } foreach my $sec (keys %{ $_per_minute_info{$day}{$hour}{$min}{query}{second} }) { $per_minute_info{$day}{$hour}{$min}{query}{second}{$sec} += ($_per_minute_info{$day}{$hour}{$min}{query}{second}{$sec} || 0); } foreach my $action (@SQL_ACTION) { next if (!exists $_per_minute_info{$day}{$hour}{$min}{$action}); $per_minute_info{$day}{$hour}{$min}{$action}{count} += ($_per_minute_info{$day}{$hour}{$min}{$action}{count} || 0); $per_minute_info{$day}{$hour}{$min}{$action}{duration} += ($_per_minute_info{$day}{$hour}{$min}{$action}{duration} || 0); foreach my $sec (keys %{ $_per_minute_info{$day}{$hour}{$min}{$action}{second} }) { $per_minute_info{$day}{$hour}{$min}{$action}{second}{$sec} += ($_per_minute_info{$day}{$hour}{$min}{$action}{second}{$sec} || 0); } } foreach my $k ('prepare', 'bind','execute') { if (exists $_per_minute_info{$day}{$hour}{$min}{$k}) { $per_minute_info{$day}{$hour}{$min}{$k} += $_per_minute_info{$day}{$hour}{$min}{$k}; } } foreach my $log (keys %{ $_per_minute_info{$day}{$hour}{$min}{log_level} }) { $per_minute_info{$day}{$hour}{$min}{log_level}{$log} += ($_per_minute_info{$day}{$hour}{$min}{log_level}{$log} || 0); } $per_minute_info{$day}{$hour}{$min}{cancelled}{count} += $_per_minute_info{$day}{$hour}{$min}{cancelled}{count} if defined $_per_minute_info{$day}{$hour}{$min}{cancelled}{count}; $per_minute_info{$day}{$hour}{$min}{tempfile}{count} += $_per_minute_info{$day}{$hour}{$min}{tempfile}{count} if defined $_per_minute_info{$day}{$hour}{$min}{tempfile}{count}; $per_minute_info{$day}{$hour}{$min}{tempfile}{size} += $_per_minute_info{$day}{$hour}{$min}{tempfile}{size} if defined $_per_minute_info{$day}{$hour}{$min}{tempfile}{size}; $per_minute_info{$day}{$hour}{$min}{checkpoint}{file_removed} += $_per_minute_info{$day}{$hour}{$min}{checkpoint}{file_removed}; $per_minute_info{$day}{$hour}{$min}{checkpoint}{sync} += $_per_minute_info{$day}{$hour}{$min}{checkpoint}{sync}; $per_minute_info{$day}{$hour}{$min}{checkpoint}{wbuffer} += $_per_minute_info{$day}{$hour}{$min}{checkpoint}{wbuffer}; $per_minute_info{$day}{$hour}{$min}{checkpoint}{file_recycled} += $_per_minute_info{$day}{$hour}{$min}{checkpoint}{file_recycled}; $per_minute_info{$day}{$hour}{$min}{checkpoint}{total} += $_per_minute_info{$day}{$hour}{$min}{checkpoint}{total}; $per_minute_info{$day}{$hour}{$min}{checkpoint}{file_added} += $_per_minute_info{$day}{$hour}{$min}{checkpoint}{file_added}; $per_minute_info{$day}{$hour}{$min}{checkpoint}{write} += $_per_minute_info{$day}{$hour}{$min}{checkpoint}{write}; $per_minute_info{$day}{$hour}{$min}{autovacuum}{count} += $_per_minute_info{$day}{$hour}{$min}{autovacuum}{count}; $per_minute_info{$day}{$hour}{$min}{autoanalyze}{count} += $_per_minute_info{$day}{$hour}{$min}{autoanalyze}{count}; $per_minute_info{$day}{$hour}{$min}{checkpoint}{sync_files} += $_per_minute_info{$day}{$hour}{$min}{checkpoint}{sync_files}; $per_minute_info{$day}{$hour}{$min}{checkpoint}{sync_avg} += $_per_minute_info{$day}{$hour}{$min}{checkpoint}{sync_avg}; $per_minute_info{$day}{$hour}{$min}{checkpoint}{sync_longest} = $_per_minute_info{$day}{$hour}{$min}{checkpoint}{sync_longest} if ($_per_minute_info{$day}{$hour}{$min}{checkpoint}{sync_longest} > $per_minute_info{$day}{$hour}{$min}{checkpoint}{sync_longest}); } } } ### lock_info ### foreach my $lock (keys %_lock_info) { $lock_info{$lock}{count} += $_lock_info{$lock}{count}; foreach my $day (keys %{ $_lock_info{chronos} }) { foreach my $hour (keys %{ $_lock_info{chronos}{$day} }) { $lock_info{chronos}{$day}{$hour}{count} += $_lock_info{chronos}{$day}{$hour}{count}; $lock_info{chronos}{$day}{$hour}{duration} += $_lock_info{chronos}{$day}{$hour}{duration}; } } $lock_info{$lock}{duration} += $_lock_info{$lock}{duration}; foreach my $type (keys %{$_lock_info{$lock}}) { next if $type =~ /^(count|chronos|duration)$/; $lock_info{$lock}{$type}{count} += $_lock_info{$lock}{$type}{count}; $lock_info{$lock}{$type}{duration} += $_lock_info{$lock}{$type}{duration}; } } ### nlines ### $nlines += $_nlines; ### normalyzed_info ### foreach my $stmt (keys %_normalyzed_info) { foreach my $dt (keys %{$_normalyzed_info{$stmt}{samples}} ) { foreach my $k (keys %{$_normalyzed_info{$stmt}{samples}{$dt}} ) { $normalyzed_info{$stmt}{samples}{$dt}{$k} = $_normalyzed_info{$stmt}{samples}{$dt}{$k}; } } # Keep only the top N samples my $i = 1; foreach my $k (sort {$b <=> $a} keys %{$normalyzed_info{$stmt}{samples}}) { if ($i > $sample) { delete $normalyzed_info{$stmt}{samples}{$k}; } $i++; } $normalyzed_info{$stmt}{count} += $_normalyzed_info{$stmt}{count}; # Set min / max duration for this query if (!exists $normalyzed_info{$stmt}{min} || ($normalyzed_info{$stmt}{min} > $_normalyzed_info{$stmt}{min})) { $normalyzed_info{$stmt}{min} = $_normalyzed_info{$stmt}{min}; } if (!exists $normalyzed_info{$stmt}{max} || ($normalyzed_info{$stmt}{max} < $_normalyzed_info{$stmt}{max})) { $normalyzed_info{$stmt}{max} = $_normalyzed_info{$stmt}{max}; } foreach my $day (keys %{$_normalyzed_info{$stmt}{chronos}} ) { foreach my $hour (keys %{$_normalyzed_info{$stmt}{chronos}{$day}} ) { $normalyzed_info{$stmt}{chronos}{$day}{$hour}{count} += $_normalyzed_info{$stmt}{chronos}{$day}{$hour}{count}; $normalyzed_info{$stmt}{chronos}{$day}{$hour}{duration} += $_normalyzed_info{$stmt}{chronos}{$day}{$hour}{duration}; foreach my $min (keys %{$_normalyzed_info{$stmt}{chronos}{$day}{$hour}{min}} ) { $normalyzed_info{$stmt}{chronos}{$day}{$hour}{min}{$min} += $_normalyzed_info{$stmt}{chronos}{$day}{$hour}{min}{$min}; } foreach my $min (keys %{$_normalyzed_info{$stmt}{chronos}{$day}{$hour}{min_duration}} ) { $normalyzed_info{$stmt}{chronos}{$day}{$hour}{min_duration}{$min} += $_normalyzed_info{$stmt}{chronos}{$day}{$hour}{min_duration}{$min}; } } } $normalyzed_info{$stmt}{duration} += $_normalyzed_info{$stmt}{duration}; if (exists $_normalyzed_info{$stmt}{locks}) { $normalyzed_info{$stmt}{locks}{count} += $_normalyzed_info{$stmt}{locks}{count}; $normalyzed_info{$stmt}{locks}{wait} += $_normalyzed_info{$stmt}{locks}{wait}; if (!exists $normalyzed_info{$stmt}{locks}{minwait} || ($normalyzed_info{$stmt}{locks}{minwait} > $_normalyzed_info{$stmt}{locks}{minwait})) { $normalyzed_info{$stmt}{locks}{minwait} = $_normalyzed_info{$stmt}{locks}{minwait}; } if (!exists $normalyzed_info{$stmt}{locks}{maxwait} || ($normalyzed_info{$stmt}{locks}{maxwait} < $_normalyzed_info{$stmt}{locks}{maxwait})) { $normalyzed_info{$stmt}{locks}{maxwait} = $_normalyzed_info{$stmt}{locks}{maxwait}; } } if (exists $_normalyzed_info{$stmt}{tempfiles}) { $normalyzed_info{$stmt}{tempfiles}{count} += $_normalyzed_info{$stmt}{tempfiles}{count}; $normalyzed_info{$stmt}{tempfiles}{size} += $_normalyzed_info{$stmt}{tempfiles}{size}; if (!exists $normalyzed_info{$stmt}{tempfiles}{minsize} || ($normalyzed_info{$stmt}{tempfiles}{minsize} > $_normalyzed_info{$stmt}{tempfiles}{minsize})) { $normalyzed_info{$stmt}{tempfiles}{minsize} = $_normalyzed_info{$stmt}{tempfiles}{minsize}; } if (!exists $normalyzed_info{$stmt}{tempfiles}{maxsize} || ($normalyzed_info{$stmt}{tempfiles}{maxsize} < $_normalyzed_info{$stmt}{tempfiles}{maxsize})) { $normalyzed_info{$stmt}{tempfiles}{maxsize} = $_normalyzed_info{$stmt}{tempfiles}{maxsize}; } } if (exists $_normalyzed_info{$stmt}{cancelled}) { $normalyzed_info{$stmt}{cancelled}{count} += $_normalyzed_info{$stmt}{cancelled}{count}; } foreach my $u (keys %{$_normalyzed_info{$stmt}{users}} ) { foreach my $k (keys %{$_normalyzed_info{$stmt}{users}{$u}} ) { $normalyzed_info{$stmt}{users}{$u}{$k} += $_normalyzed_info{$stmt}{users}{$u}{$k}; } } foreach my $u (keys %{$_normalyzed_info{$stmt}{apps}} ) { foreach my $k (keys %{$_normalyzed_info{$stmt}{apps}{$u}} ) { $normalyzed_info{$stmt}{apps}{$u}{$k} += $_normalyzed_info{$stmt}{apps}{$u}{$k}; } } } ### session_info ### foreach my $db (keys %{ $_session_info{database}}) { $session_info{database}{$db}{count} += $_session_info{database}{$db}{count}; $session_info{database}{$db}{duration} += $_session_info{database}{$db}{duration}; } $session_info{count} += $_session_info{count}; foreach my $day (keys %{ $_session_info{chronos}}) { foreach my $hour (keys %{ $_session_info{chronos}{$day}}) { $session_info{chronos}{$day}{$hour}{count} += $_session_info{chronos}{$day}{$hour}{count}; $session_info{chronos}{$day}{$hour}{duration} += $_session_info{chronos}{$day}{$hour}{duration}; } } foreach my $user (keys %{ $_session_info{user}}) { $session_info{user}{$user}{count} += $_session_info{user}{$user}{count}; $session_info{user}{$user}{duration} += $_session_info{user}{$user}{duration}; } $session_info{duration} += $_session_info{duration}; foreach my $host (keys %{ $_session_info{host}}) { $session_info{host}{$host}{count} += $_session_info{host}{$host}{count}; $session_info{host}{$host}{duration} += $_session_info{host}{$host}{duration}; } foreach my $app (keys %{ $_session_info{app}}) { $session_info{app}{$app}{count} += $_session_info{app}{$app}{count}; $session_info{app}{$app}{duration} += $_session_info{app}{$app}{duration}; } ### tempfile_info ### $tempfile_info{count} += $_tempfile_info{count} if defined $_tempfile_info{count}; $tempfile_info{size} += $_tempfile_info{size} if defined $_tempfile_info{size}; $tempfile_info{maxsize} = $_tempfile_info{maxsize} if defined $_tempfile_info{maxsize} and ( not defined $tempfile_info{maxsize} or $tempfile_info{maxsize} < $_tempfile_info{maxsize} ); ### top_slowest ### my @tmp_top_slowest = sort {$b->[0] <=> $a->[0]} (@top_slowest, @_top_slowest); @top_slowest = (); for (my $i = 0; $i <= $#tmp_top_slowest; $i++) { push(@top_slowest, $tmp_top_slowest[$i]); last if ($i == $end_top); } ### top_locked ### my @tmp_top_locked_info = sort {$b->[0] <=> $a->[0]} (@top_locked_info, @_top_locked_info); @top_locked_info = (); for (my $i = 0; $i <= $#tmp_top_locked_info; $i++) { push(@top_locked_info, $tmp_top_locked_info[$i]); last if ($i == $end_top); } ### top_tempfile ### my @tmp_top_tempfile_info = sort {$b->[0] <=> $a->[0]} (@top_tempfile_info, @_top_tempfile_info); @top_tempfile_info = (); for (my $i = 0; $i <= $#tmp_top_tempfile_info; $i++) { push(@top_tempfile_info, $tmp_top_tempfile_info[$i]); last if ($i == $end_top); } ### checkpoint_info ### $checkpoint_info{file_removed} += $_checkpoint_info{file_removed}; $checkpoint_info{sync} += $_checkpoint_info{sync}; $checkpoint_info{wbuffer} += $_checkpoint_info{wbuffer}; $checkpoint_info{file_recycled} += $_checkpoint_info{file_recycled}; $checkpoint_info{total} += $_checkpoint_info{total}; $checkpoint_info{file_added} += $_checkpoint_info{file_added}; $checkpoint_info{write} += $_checkpoint_info{write}; #### Autovacuum info #### $autovacuum_info{count} += $_autovacuum_info{count}; foreach my $day (keys %{ $_autovacuum_info{chronos} }) { foreach my $hour (keys %{ $_autovacuum_info{chronos}{$day} }) { $autovacuum_info{chronos}{$day}{$hour}{count} += $_autovacuum_info{chronos}{$day}{$hour}{count}; } } foreach my $table (keys %{ $_autovacuum_info{tables} }) { $autovacuum_info{tables}{$table}{vacuums} += $_autovacuum_info{tables}{$table}{vacuums}; $autovacuum_info{tables}{$table}{idxscans} += $_autovacuum_info{tables}{$table}{idxscans}; $autovacuum_info{tables}{$table}{tuples}{removed} += $_autovacuum_info{tables}{$table}{tuples}{removed}; $autovacuum_info{tables}{$table}{pages}{removed} += $_autovacuum_info{tables}{$table}{pages}{removed}; } if ($_autovacuum_info{peak}{system_usage}{elapsed} > $autovacuum_info{peak}{system_usage}{elapsed}) { $autovacuum_info{peak}{system_usage}{elapsed} = $_autovacuum_info{peak}{system_usage}{elapsed}; $autovacuum_info{peak}{system_usage}{table} = $_autovacuum_info{peak}{system_usage}{table}; $autovacuum_info{peak}{system_usage}{date} = $_autovacuum_info{peak}{system_usage}{date}; } #### Autoanalyze info #### $autoanalyze_info{count} += $_autoanalyze_info{count}; foreach my $day (keys %{ $_autoanalyze_info{chronos} }) { foreach my $hour (keys %{ $_autoanalyze_info{chronos}{$day} }) { $autoanalyze_info{chronos}{$day}{$hour}{count} += $_autoanalyze_info{chronos}{$day}{$hour}{count}; } } foreach my $table (keys %{ $_autoanalyze_info{tables} }) { $autoanalyze_info{tables}{$table}{analyzes} += $_autoanalyze_info{tables}{$table}{analyzes}; } if ($_autoanalyze_info{peak}{system_usage}{elapsed} > $autoanalyze_info{peak}{system_usage}{elapsed}) { $autoanalyze_info{peak}{system_usage}{elapsed} = $_autoanalyze_info{peak}{system_usage}{elapsed}; $autoanalyze_info{peak}{system_usage}{table} = $_autoanalyze_info{peak}{system_usage}{table}; $autoanalyze_info{peak}{system_usage}{date} = $_autoanalyze_info{peak}{system_usage}{date}; } return; } sub dump_as_binary { my $lfh = shift(); store_fd({ 'overall_stat' => \%overall_stat, 'overall_checkpoint' => \%overall_checkpoint, 'normalyzed_info' => \%normalyzed_info, 'error_info' => \%error_info, 'connection_info' => \%connection_info, 'database_info' => \%database_info, 'application_info' => \%application_info, 'user_info' => \%user_info, 'host_info' => \%host_info, 'checkpoint_info' => \%checkpoint_info, 'session_info' => \%session_info, 'tempfile_info' => \%tempfile_info, 'error_info' => \%error_info, 'logs_type' => \%logs_type, 'lock_info' => \%lock_info, 'per_minute_info' => \%per_minute_info, 'top_slowest' => \@top_slowest, 'nlines' => $nlines, 'log_files' => \@log_files, 'autovacuum_info' => \%autovacuum_info, 'autoanalyze_info' => \%autoanalyze_info, 'top_tempfile_info' => \@top_tempfile_info, 'top_locked_info' => \@top_locked_info, }, $lfh) || die ("Couldn't save binary data to «$outfile»!\n"); } sub dump_error_as_json { my $json = encode_json({ 'error_info' => \%error_info, }) || die ("Encode object to JSON failed!\n"); print $fh $json; } sub dump_as_json { my $json = encode_json({ 'overall_stat' => \%overall_stat, 'overall_checkpoint' => \%overall_checkpoint, 'normalyzed_info' => \%normalyzed_info, 'error_info' => \%error_info, 'connection_info' => \%connection_info, 'database_info' => \%database_info, 'application_info' => \%application_info, 'user_info' => \%user_info, 'host_info' => \%host_info, 'checkpoint_info' => \%checkpoint_info, 'session_info' => \%session_info, 'tempfile_info' => \%tempfile_info, 'error_info' => \%error_info, 'logs_type' => \%logs_type, 'lock_info' => \%lock_info, 'per_minute_info' => \%per_minute_info, 'top_slowest' => \@top_slowest, 'nlines' => $nlines, 'log_files' => \@log_files, 'autovacuum_info' => \%autovacuum_info, 'autoanalyze_info' => \%autoanalyze_info, 'top_tempfile_info' => \@top_tempfile_info, 'top_locked_info' => \@top_locked_info, }) || die ("Encode object to JSON failed!\n"); print $fh $json; } # Highlight SQL code sub highlight_code { my $code = shift; # Escape HTML code into SQL values $code = &escape_html($code); # Do not try to prettify queries longer # than 10KB as this will take too much time return $code if (length($code) > $MAX_QUERY_LENGTH); # prettify SQL query if (!$noprettify) { $sql_prettified->query($code); $code = $sql_prettified->beautify; } return $code if ($nohighlight); my $i = 0; my @qqcode = (); while ($code =~ s/("[^\"]*")/QQCODEY${i}A/s) { push(@qqcode, $1); $i++; } $i = 0; my @qcode = (); while ($code =~ s/('[^\']*')/QCODEY${i}B/s) { push(@qcode, $1); $i++; } foreach my $x (keys %SYMBOLS) { $code =~ s/$x/\$\$PGBGYA\$\$$SYMBOLS{$x}\$\$PGBGYB\$\$/gs; } for (my $x = 0 ; $x <= $#KEYWORDS1 ; $x++) { #$code =~ s/\b$KEYWORDS1[$x]\b/$KEYWORDS1[$x]<\/span>/igs; $code =~ s/(?$KEYWORDS1[$x]<\/span>/igs; } for (my $x = 0 ; $x <= $#KEYWORDS2 ; $x++) { $code =~ s/(?$KEYWORDS2[$x]<\/span>/igs; } for (my $x = 0 ; $x <= $#KEYWORDS3 ; $x++) { $code =~ s/\b$KEYWORDS3[$x]\b/$KEYWORDS3[$x]<\/span>/igs; } for (my $x = 0 ; $x <= $#BRACKETS ; $x++) { $code =~ s/($BRACKETS[$x])/$1<\/span>/igs; } $code =~ s/\$\$PGBGYA\$\$([^\$]+)\$\$PGBGYB\$\$/$1<\/span>/gs; $code =~ s/\b(\d+)\b/$1<\/span>/igs; for (my $x = 0; $x <= $#qcode; $x++) { $code =~ s/QCODEY${x}B/$qcode[$x]/s; } for (my $x = 0; $x <= $#qqcode; $x++) { $code =~ s/QQCODEY${x}A/$qqcode[$x]/s; } $code =~ s/('[^']*')/$1<\/span>/gs; $code =~ s/(`[^`]*`)/$1<\/span>/gs; return $code; } sub compute_arg_list { # Some command line arguments can be used multiple times or written # as a comma-separated list. # For example: --dbuser=postgres --dbuser=joe or --dbuser=postgres,joe # So we have to aggregate all the possible values my @tmp = (); foreach my $v (@exclude_user) { push(@tmp, split(/,/, $v)); } @exclude_user = (); push(@exclude_user, @tmp); @tmp = (); foreach my $v (@dbname) { push(@tmp, split(/,/, $v)); } @dbname = (); push(@dbname, @tmp); @tmp = (); foreach my $v (@dbuser) { push(@tmp, split(/,/, $v)); } @dbuser = (); push(@dbuser, @tmp); @tmp = (); foreach my $v (@dbclient) { push(@tmp, split(/,/, $v)); } @dbclient = (); push(@dbclient, @tmp); @tmp = (); foreach my $v (@dbappname) { push(@tmp, split(/,/, $v)); } @dbappname = (); push(@dbappname, @tmp); @tmp = (); foreach my $v (@exclude_appname) { push(@tmp, split(/,/, $v)); } @exclude_appname = (); push(@exclude_appname, @tmp); @tmp = (); foreach my $v (@exclude_line) { push(@tmp, split(/,/, $v)); } @exclude_line = (); push(@exclude_line, @tmp); } sub validate_log_line { my ($t_pid) = @_; # Look at particular cases of vacuum/analyze that have the database # name inside the log message so that they could be associated if ($prefix_vars{'t_query'} =~ / of table "([^\.]+)\.[^\.]+\.[^\.]+":/) { $prefix_vars{'t_dbname'} = $1; } # Check user and/or database if required if ($#dbname >= 0) { # Log line does not match the required dbname if (!$prefix_vars{'t_dbname'} || !grep(/^$prefix_vars{'t_dbname'}$/i, @dbname)) { delete $current_sessions{$prefix_vars{'t_pid'}}; return 0; } } if ($#dbuser >= 0) { # Log line does not match the required dbuser if (!$prefix_vars{'t_dbuser'} || !grep(/^$prefix_vars{'t_dbuser'}$/i, @dbuser)) { delete $current_sessions{$prefix_vars{'t_pid'}}; return 0; } } if ($#dbclient >= 0) { # Log line does not match the required dbclient if (!$prefix_vars{'t_client'} || !grep(/^$prefix_vars{'t_client'}$/i, @dbclient)) { delete $current_sessions{$prefix_vars{'t_pid'}}; return 0; } } if ($#dbappname >= 0) { # Log line does not match the required dbname if (!$prefix_vars{'t_appname'} || !grep(/^\Q$prefix_vars{'t_appname'}\E$/i, @dbappname)) { delete $current_sessions{$prefix_vars{'t_pid'}}; return 0; } } if ($#exclude_user >= 0) { # Log line matches the excluded dbuser if ($prefix_vars{'t_dbuser'} && grep(/^$prefix_vars{'t_dbuser'}$/i, @exclude_user)) { delete $current_sessions{$prefix_vars{'t_pid'}}; return 0; } } if ($#exclude_appname >= 0) { # Log line matches the excluded appname if ($prefix_vars{'t_appname'} && grep(/^\Q$prefix_vars{'t_appname'}\E$/i, @exclude_appname)) { delete $current_sessions{$prefix_vars{'t_pid'}}; return 0; } } return 1; } sub parse_log_prefix { my ($t_logprefix) = @_; # Extract user and database information from the logprefix part if ($t_logprefix) { # Search for database user if ($t_logprefix =~ $regex_prefix_dbuser) { $prefix_vars{'t_dbuser'} = $1; } # Search for database name if ($t_logprefix =~ $regex_prefix_dbname) { $prefix_vars{'t_dbname'} = $1; } # Search for client host name if ($t_logprefix =~ $regex_prefix_dbclient) { $prefix_vars{'t_dbclient'} = $1; $prefix_vars{'t_dbclient'} = _gethostbyaddr($prefix_vars{'t_dbclient'}) if ($dns_resolv); } # Search for application name if ($t_logprefix =~ $regex_prefix_dbappname) { $prefix_vars{'t_appname'} = $1; } } } sub parse_query { my $t_pid = $prefix_vars{'t_pid'}; # Force some LOG messages to be ERROR messages so that they will appear # in the event/error/warning messages report. if ($prefix_vars{'t_loglevel'} eq 'LOG') { if ($prefix_vars{'t_query'} =~ /parameter "[^"]+" changed to "[^"]+"/) { $prefix_vars{'t_loglevel'} = 'ERROR'; } elsif ($prefix_vars{'t_query'} =~ /database system was shut down at /) { $prefix_vars{'t_loglevel'} = 'ERROR'; } elsif ($prefix_vars{'t_query'} =~ /database system was interrupted while in recovery/) { $prefix_vars{'t_loglevel'} = 'ERROR'; } elsif ($prefix_vars{'t_query'} =~ /recovery has paused/) { $prefix_vars{'t_loglevel'} = 'ERROR'; } } elsif ($prefix_vars{'t_loglevel'} eq 'ERROR') { if ($prefix_vars{'t_query'} =~ /canceling statement due to statement timeout/) { $prefix_vars{'t_loglevel'} = 'LOG'; } } # Remove session failure from current workload because there is no disconnection entry if (!$disable_session && ($prefix_vars{'t_loglevel'} eq 'FATAL')) { delete $current_sessions{$prefix_vars{'t_pid'}}; if ($extension eq 'tsung') { delete $tsung_session{$prefix_vars{'t_pid'}} } } elsif (!$disable_session && ($prefix_vars{'t_loglevel'} eq 'WARNING')) { if ($prefix_vars{'t_query'} =~ /terminating connection/) { delete $current_sessions{$prefix_vars{'t_pid'}}; if ($extension eq 'tsung') { delete $tsung_session{$prefix_vars{'t_pid'}} } } } # Do not process DEALLOCATE lines if ($prefix_vars{'t_query'} =~ /statement: DEALLOCATE/) { return; } # Do not parse lines that are not an error message when error only report is requested if ($error_only && ($prefix_vars{'t_loglevel'} !~ $full_error_regex)) { return; } # Do not parse lines that are an error-like message when error reports are not wanted if ($disable_error && ($prefix_vars{'t_loglevel'} =~ $full_error_regex)) { return; } # Store a counter of logs type $logs_type{$prefix_vars{'t_loglevel'}}++; # Replace syslog tabulation rewrite if ($format =~ /syslog/) { $prefix_vars{'t_query'} =~ s/#011/\t/g; } # Reject lines generated by debug tool if ( ($prefix_vars{'t_loglevel'} eq 'CONTEXT') && ($prefix_vars{'t_query'} =~ /SQL statement "/) ) { return; } # Stores the error's detail if previous line was an error if ($cur_info{$t_pid}{loglevel} =~ $main_error_regex) { # and current one is detailed information if ($prefix_vars{'t_loglevel'} =~ /(DETAIL|STATEMENT|CONTEXT|HINT)/) { $cur_info{$t_pid}{"\L$1\E"} .= $prefix_vars{'t_query'}; return; } } my $date_part = "$prefix_vars{'t_year'}$prefix_vars{'t_month'}$prefix_vars{'t_day'}"; my $cur_last_log_timestamp = "$prefix_vars{'t_year'}-$prefix_vars{'t_month'}-$prefix_vars{'t_day'} " . "$prefix_vars{t_hour}:$prefix_vars{t_min}:$prefix_vars{t_sec}"; # set current session workload if ( !$disable_session ) { my $sess_count = scalar keys %current_sessions; $overall_stat{'peak'}{$cur_last_log_timestamp}{session} = $sess_count; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{"$prefix_vars{'t_min'}"}{session}{count} = $sess_count; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{"$prefix_vars{'t_min'}"}{session}{second}{$prefix_vars{'t_sec'}} = $sess_count; } # Stores lock activity if (($prefix_vars{'t_loglevel'} eq 'LOG') && ($prefix_vars{'t_query'} =~ /acquired ([^\s]+) on ([^\s]+) .* after ([0-9\.]+) ms/)) { return if ($disable_lock); $lock_info{$1}{count}++; $lock_info{$1}{duration} += $3; $lock_info{$1}{$2}{count}++; $lock_info{$1}{$2}{duration} += $3; $lock_info{$1}{chronos}{$date_part}{$prefix_vars{'t_hour'}}{count}++; $lock_info{$1}{chronos}{$date_part}{$prefix_vars{'t_hour'}}{duration}++; # Store current lock information that will be used later # when we will parse the query responsible for the locks $cur_lock_info{$t_pid}{wait} = $3; if ($format eq 'csv') { $cur_lock_info{$t_pid}{query} = $prefix_vars{'t_statement'}; $cur_lock_info{$t_pid}{timestamp} = $prefix_vars{'t_timestamp'}; $cur_lock_info{$t_pid}{dbname} = $prefix_vars{'t_dbname'}; $cur_lock_info{$t_pid}{dbuser} = $prefix_vars{'t_dbuser'}; $cur_lock_info{$t_pid}{dbclient} = $prefix_vars{'t_client'} || $prefix_vars{'t_dbclient'}; $cur_lock_info{$t_pid}{dbappname} = $prefix_vars{'t_appname'}; } return; } # Stores query related to temporary file information if (($prefix_vars{'t_loglevel'} eq 'STATEMENT') && exists $cur_temp_info{$t_pid}{size}) { $cur_temp_info{$t_pid}{query} = $prefix_vars{'t_query'}; $cur_temp_info{$t_pid}{timestamp} = $prefix_vars{'t_timestamp'}; $cur_temp_info{$t_pid}{dbname} = $prefix_vars{'t_dbname'}; $cur_temp_info{$t_pid}{dbuser} = $prefix_vars{'t_dbuser'}; $cur_temp_info{$t_pid}{dbclient} = $prefix_vars{'t_client'} || $prefix_vars{'t_dbclient'}; $cur_temp_info{$t_pid}{dbappname} = $prefix_vars{'t_appname'}; return; } # Stores query related to last lock information if (($prefix_vars{'t_loglevel'} eq 'STATEMENT') && exists $cur_lock_info{$t_pid}{wait}) { $cur_lock_info{$t_pid}{query} = $prefix_vars{'t_query'}; $cur_lock_info{$t_pid}{timestamp} = $prefix_vars{'t_timestamp'}; $cur_lock_info{$t_pid}{dbname} = $prefix_vars{'t_dbname'}; $cur_lock_info{$t_pid}{dbuser} = $prefix_vars{'t_dbuser'}; $cur_lock_info{$t_pid}{dbclient} = $prefix_vars{'t_client'} || $prefix_vars{'t_dbclient'}; $cur_lock_info{$t_pid}{dbappname} = $prefix_vars{'t_appname'}; return; } # Stores query related to cancelled queries information if (($prefix_vars{'t_loglevel'} eq 'STATEMENT') && exists $cur_cancel_info{$t_pid}{count}) { $cur_cancel_info{$t_pid}{query} = $prefix_vars{'t_query'}; $cur_cancel_info{$t_pid}{timestamp} = $prefix_vars{'t_timestamp'}; $cur_cancel_info{$t_pid}{dbname} = $prefix_vars{'t_dbname'}; $cur_cancel_info{$t_pid}{dbuser} = $prefix_vars{'t_dbuser'}; $cur_cancel_info{$t_pid}{dbclient} = $prefix_vars{'t_client'} || $prefix_vars{'t_dbclient'}; $cur_cancel_info{$t_pid}{dbappname} = $prefix_vars{'t_appname'}; return; } # Stores cancelled queries if (($prefix_vars{'t_loglevel'} eq 'LOG') && ($prefix_vars{'t_query'} =~ /canceling statement due to statement timeout/)) { return if ($disable_query); $cancelled_info{count}++; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{cancelled}{count}++; # Store current cancelled query information that will be used later # when we will parse the query that has been killed $overall_stat{'peak'}{$cur_last_log_timestamp}{cancelled_count}++; $cur_cancel_info{$t_pid}{count}++; if ($format eq 'csv') { $cur_cancel_info{$t_pid}{query} = $prefix_vars{'t_statement'}; $cur_cancel_info{$t_pid}{timestamp} = $prefix_vars{'t_timestamp'}; $cur_cancel_info{$t_pid}{dbname} = $prefix_vars{'t_dbname'}; $cur_cancel_info{$t_pid}{dbuser} = $prefix_vars{'t_dbuser'}; $cur_cancel_info{$t_pid}{dbclient} = $prefix_vars{'t_client'} || $prefix_vars{'t_dbclient'}; $cur_cancel_info{$t_pid}{dbappname} = $prefix_vars{'t_appname'}; } return; } # Stores temporary files activity if (($prefix_vars{'t_loglevel'} eq 'LOG') && ($prefix_vars{'t_query'} =~ /temporary file: path .*, size (\d+)/)) { return if ($disable_temporary); $tempfile_info{count}++; $tempfile_info{size} += $1; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{tempfile}{count}++; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{tempfile}{size} += $1; $tempfile_info{maxsize} = $1 if ($tempfile_info{maxsize} < $1); # Store current temporary file information that will be used later # when we will parse the query responsible for the tempfile $cur_temp_info{$t_pid}{size} = $1; $overall_stat{'peak'}{$cur_last_log_timestamp}{tempfile_size} += $1; $overall_stat{'peak'}{$cur_last_log_timestamp}{tempfile_count}++; if ($format eq 'csv') { $cur_temp_info{$t_pid}{query} = $prefix_vars{'t_statement'}; $cur_temp_info{$t_pid}{timestamp} = $prefix_vars{'t_timestamp'}; $cur_temp_info{$t_pid}{dbname} = $prefix_vars{'t_dbname'}; $cur_temp_info{$t_pid}{dbuser} = $prefix_vars{'t_dbuser'}; $cur_temp_info{$t_pid}{dbclient} = $prefix_vars{'t_client'} || $prefix_vars{'t_dbclient'}; $cur_temp_info{$t_pid}{dbappname} = $prefix_vars{'t_appname'}; } return; } # Stores query related to last created temporary file if (($prefix_vars{'t_loglevel'} eq 'STATEMENT') && $cur_temp_info{$t_pid}{size}) { $cur_temp_info{$t_pid}{query} = $prefix_vars{'t_query'}; $cur_temp_info{$t_pid}{timestamp} = $prefix_vars{'t_timestamp'}; $cur_temp_info{$t_pid}{dbname} = $prefix_vars{'t_dbname'}; $cur_temp_info{$t_pid}{dbuser} = $prefix_vars{'t_dbuser'}; $cur_temp_info{$t_pid}{dbclient} = $prefix_vars{'t_client'} || $prefix_vars{'t_dbclient'}; $cur_temp_info{$t_pid}{dbappname} = $prefix_vars{'t_appname'}; return; } # Stores pre-connection activity if (($prefix_vars{'t_loglevel'} eq 'LOG') && ($prefix_vars{'t_query'} =~ /connection received: host=([^\s]+)(?: port=(\d+))?/)) { return if ($disable_connection); $conn_received{$t_pid} = $1; $conn_received{$t_pid} = _gethostbyaddr($conn_received{$t_pid}) if ($dns_resolv); return; } # Stores connection activity if ( ($prefix_vars{'t_loglevel'} eq 'LOG') && ($prefix_vars{'t_query'} =~ /connection authorized: user=([^\s]+) /)) { $current_sessions{$prefix_vars{'t_pid'}} = 1 if (!$disable_session); return if ($disable_connection); my $usr = $1; my $db = 'unknown'; my $host = ''; if ($prefix_vars{'t_query'} =~ / database=([^\s]+)/) { $db = $1; } elsif ($prefix_vars{'t_dbname'}) { $db = $prefix_vars{'t_dbname'}; } if ($prefix_vars{'t_query'} =~ / host=([^\s]+)/) { $host = $1; $host = _gethostbyaddr($host) if ($dns_resolv); } elsif ($prefix_vars{'t_client'} || $prefix_vars{'t_dbclient'}) { $host = $prefix_vars{'t_client'} || $prefix_vars{'t_dbclient'}; $host = _gethostbyaddr($host) if ($dns_resolv); } if ($extension eq 'tsung') { $tsung_session{$prefix_vars{'t_pid'}}{connection}{database} = $db; $tsung_session{$prefix_vars{'t_pid'}}{connection}{user} = $usr; $tsung_session{$prefix_vars{'t_pid'}}{connection}{date} = $prefix_vars{'t_date'}; return; } $overall_stat{'peak'}{$cur_last_log_timestamp}{connection}++; $connection_info{count}++; $connection_info{user}{$usr}++; $connection_info{database}{$db}++; $connection_info{database_user}{$db}{$usr}++; $connection_info{chronos}{$date_part}{$prefix_vars{'t_hour'}}{count}++; ############################################################################### # May be used in the future to display more detailed information on connection # $connection_info{chronos}{$date_part}{$prefix_vars{'t_hour'}}{user}{$usr}++; # $connection_info{chronos}{$date_part}{$prefix_vars{'t_hour'}}{database}{$db}++; # $connection_info{chronos}{$date_part}{$prefix_vars{'t_hour'}}{database_user}{$db}{$usr}++; ############################################################################### if ($graph) { $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{"$prefix_vars{'t_min'}"}{connection}{count}++; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{"$prefix_vars{'t_min'}"}{connection}{second}{$prefix_vars{'t_sec'}}++; } if (exists $conn_received{$t_pid}) { $connection_info{host}{$conn_received{$t_pid}}++; delete $conn_received{$t_pid}; } elsif ($host) { $connection_info{host}{$host}++; } return; } # Store session duration if (($prefix_vars{'t_loglevel'} eq 'LOG') && ($prefix_vars{'t_query'} =~ /disconnection: session time: ([^\s]+) user=([^\s]+) database=([^\s]+) host=([^\s]+)/)) { return if ($disable_session); delete $current_sessions{$prefix_vars{'t_pid'}}; if ($extension eq 'tsung') { $tsung_session{$prefix_vars{'t_pid'}}{disconnection}{date} = $prefix_vars{'t_timestamp'}; } my $time = $1; my $usr = $2; my $db = $3; my $host = $4; $host = _gethostbyaddr($host) if ($dns_resolv); if ($extension eq 'tsung') { &store_tsung_session($prefix_vars{'t_pid'}); return; } # Store time in milliseconds $time =~ /(\d+):(\d+):(\d+\.\d+)/; $time = ($3 * 1000) + ($2 * 60 * 1000) + ($1 * 60 * 60 * 1000); $session_info{count}++; $session_info{duration} += $time; $session_info{chronos}{$date_part}{$prefix_vars{'t_hour'}}{count}++; $session_info{chronos}{$date_part}{$prefix_vars{'t_hour'}}{duration} += $time; $session_info{database}{$db}{count}++; $session_info{database}{$db}{duration} += $time; $session_info{user}{$usr}{count}++; $session_info{user}{$usr}{duration} += $time; $session_info{host}{$host}{count}++; $session_info{host}{$host}{duration} += $time; my $app = 'unknown'; $app = $prefix_vars{'t_appname'} if (exists $prefix_vars{'t_appname'}); $session_info{app}{$app}{count}++; $session_info{app}{$app}{duration} += $time; my $k = &get_hist_inbound($time, @histogram_session_time); $overall_stat{histogram}{session_time}{$k}++; $overall_stat{histogram}{session_total}++; return; } # Store autovacuum information if ( ($prefix_vars{'t_loglevel'} eq 'LOG') && ($prefix_vars{'t_query'} =~ /automatic vacuum of table "([^\s]+)": index scans: (\d+)/ ) ) { return if ($disable_autovacuum); $autovacuum_info{count}++; $autovacuum_info{tables}{$1}{vacuums} += 1; $autovacuum_info{tables}{$1}{idxscans} += $2; $autovacuum_info{chronos}{$date_part}{$prefix_vars{'t_hour'}}{count}++; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{autovacuum}{count}++; $cur_info{$t_pid}{vacuum} = $1; if ($format eq 'csv') { if ($prefix_vars{'t_query'} =~ /pages: (\d+) removed, (\d+) remain/) { $autovacuum_info{tables}{$cur_info{$t_pid}{vacuum}}{pages}{removed} += $1; } if ($prefix_vars{'t_query'} =~ /tuples: (\d+) removed, (\d+) remain/) { $autovacuum_info{tables}{$cur_info{$t_pid}{vacuum}}{tuples}{removed} += $1; } if ($prefix_vars{'t_query'} =~ m#system usage: CPU .* sec elapsed (.*) sec#) { if ($1 > $autovacuum_info{peak}{system_usage}{elapsed}) { $autovacuum_info{peak}{system_usage}{elapsed} = $1; $autovacuum_info{peak}{system_usage}{table} = $cur_info{$t_pid}{vacuum}; $autovacuum_info{peak}{system_usage}{date} = "$prefix_vars{'t_year'}-$prefix_vars{'t_month'}-$prefix_vars{'t_day'} " . "$prefix_vars{'t_hour'}:$prefix_vars{'t_min'}:$prefix_vars{'t_sec'}"; } } } $cur_info{$t_pid}{year} = $prefix_vars{'t_year'}; $cur_info{$t_pid}{month} = $prefix_vars{'t_month'}; $cur_info{$t_pid}{day} = $prefix_vars{'t_day'}; $cur_info{$t_pid}{hour} = $prefix_vars{'t_hour'}; $cur_info{$t_pid}{min} = $prefix_vars{'t_min'}; $cur_info{$t_pid}{sec} = $prefix_vars{'t_sec'}; return; } # Store autoanalyze information if ( ($prefix_vars{'t_loglevel'} eq 'LOG') && ($prefix_vars{'t_query'} =~ /automatic analyze of table "([^\s]+)"/ ) ) { return if ($disable_autovacuum); my $table = $1; $autoanalyze_info{count}++; $autoanalyze_info{tables}{$table}{analyzes} += 1; $autoanalyze_info{chronos}{$date_part}{$prefix_vars{'t_hour'}}{count}++; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{autoanalyze}{count}++; if ($prefix_vars{'t_query'} =~ m#system usage: CPU .* sec elapsed (.*) sec#) { if ($1 > $autoanalyze_info{peak}{system_usage}{elapsed}) { $autoanalyze_info{peak}{system_usage}{elapsed} = $1; $autoanalyze_info{peak}{system_usage}{table} = $table; $autoanalyze_info{peak}{system_usage}{date} = $cur_last_log_timestamp; } } } # Store checkpoint or restartpoint information if ( ($prefix_vars{'t_loglevel'} eq 'LOG') && ($prefix_vars{'t_query'} =~ /point complete: wrote (\d+) buffers \(([^\)]+)\); (\d+) transaction log file\(s\) added, (\d+) removed, (\d+) recycled; write=([0-9\.]+) s, sync=([0-9\.]+) s, total=([0-9\.]+) s/ ) ) { # Example: LOG: checkpoint complete: wrote 175 buffers (5.7%); 0 transaction log file(s) added, 1 removed, 2 recycled; write=17.437 s, sync=0.722 s, total=18.259 s; sync files=2, longest=0.708 s, average=0.361 s return if ($disable_checkpoint); $checkpoint_info{wbuffer} += $1; #$checkpoint_info{percent_wbuffer} += $2; $checkpoint_info{file_added} += $3; $checkpoint_info{file_removed} += $4; $checkpoint_info{file_recycled} += $5; $overall_checkpoint{'peak'}{$cur_last_log_timestamp}{walfile_usage} += ($3 + $5); $checkpoint_info{write} += $6; $checkpoint_info{sync} += $7; $checkpoint_info{total} += $8; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{checkpoint}{wbuffer} += $1; #$per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{checkpoint}{percent_wbuffer} += $2; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{checkpoint}{file_added} += $3; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{checkpoint}{file_removed} += $4; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{checkpoint}{file_recycled} += $5; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{checkpoint}{write} += $6; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{checkpoint}{sync} += $7; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{checkpoint}{total} += $8; $overall_checkpoint{'peak'}{$cur_last_log_timestamp}{checkpoint_wbuffer} += $1; if ($6 > $overall_checkpoint{checkpoint_write}) { $overall_checkpoint{checkpoint_write} = $6; } if ($7 > $overall_checkpoint{checkpoint_sync}) { $overall_checkpoint{checkpoint_sync} = $7; } if ($prefix_vars{'t_query'} =~ /sync files=(\d+), longest=([0-9\.]+) s, average=([0-9\.]+) s/) { $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{checkpoint}{sync_files} += $1; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{checkpoint}{sync_longest} = $2 if ($2 > $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{checkpoint}{sync_longest}); $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{checkpoint}{sync_avg} += $3; } return; } # Store checkpoint warning information if ( ($prefix_vars{'t_loglevel'} eq 'LOG') && ($prefix_vars{'t_query'} =~ /checkpoints are occurring too frequently \((\d+) seconds apart\)/)) { return if ($disable_checkpoint); $checkpoint_info{warning}++; $checkpoint_info{warning_seconds} += $1; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{checkpoint}{warning}++; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{checkpoint}{warning_seconds} += $1; $overall_checkpoint{checkpoint_warning}++; return; } # Store old restartpoint information if ( ($prefix_vars{'t_loglevel'} eq 'LOG') && ($prefix_vars{'t_query'} =~ /restartpoint complete: wrote (\d+) buffers \(([^\)]+)\); write=([0-9\.]+) s, sync=([0-9\.]+) s, total=([0-9\.]+) s/ ) ) { # Example: LOG: restartpoint complete: wrote 1568 buffers (0.3%); write=146.237 s, sync=0.251 s, total=146.489 s return if ($disable_checkpoint); $checkpoint_info{wbuffer} += $1; #$checkpoint_info{percent_wbuffer} += $2; $checkpoint_info{write} += $6; $checkpoint_info{sync} += $7; $checkpoint_info{total} += $8; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{checkpoint}{wbuffer} += $1; #$per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{checkpoint}{percent_wbuffer} += $2; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{checkpoint}{write} += $6; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{checkpoint}{sync} += $7; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{checkpoint}{total} += $8; $overall_checkpoint{'peak'}{$cur_last_log_timestamp}{checkpoint_wbuffer} += $1; if ($6 > $overall_checkpoint{checkpoint_write}) { $overall_checkpoint{checkpoint_write} = $6; } if ($7 > $overall_checkpoint{checkpoint_sync}) { $overall_checkpoint{checkpoint_sync} = $7; } return; } # Look at bind/execute parameters if any if ($cur_info{$t_pid}{query}) { # Remove obsolete connection storage delete $conn_received{$cur_info{$t_pid}{pid}}; # The query is complete but we are missing some debug/info/bind parameter logs if ($cur_info{$t_pid}{loglevel} eq 'LOG') { # Apply bind parameters if any if (($prefix_vars{'t_loglevel'} eq 'DETAIL') && ($prefix_vars{'t_query'} =~ /parameters: (.*)/)) { $cur_info{$t_pid}{parameters} = "$1"; # go look at other params return; # replace the execute statements with the prepared query and set the parameters } elsif (($prefix_vars{'t_loglevel'} eq 'DETAIL') && ($prefix_vars{'t_query'} =~ s/prepare: PREPARE[\s\t]+([^\s\t]+)[\s\t]+AS[\s\t]+(.*)//is)) { my $q_name = $1; my $real_query = $2; if ($cur_info{$t_pid}{query} =~ /\b$q_name\b/) { $cur_info{$t_pid}{query} =~ s/EXECUTE[\s\t]+$q_name([\s\t]+)\(//is; $cur_info{$t_pid}{parameters} = $cur_info{$t_pid}{query}; $cur_info{$t_pid}{parameters} =~ s/\)$//; $cur_info{$t_pid}{query} = $real_query; $cur_info{$t_pid}{'bind'} = 1; } # go look at other params return; } } } # Apply bind parameters if any if ($prefix_vars{'t_detail'} =~ /parameters: (.*)/) { $cur_info{$t_pid}{parameters} = "$1"; # go look at other params } #### # Register previous query storage into global statistics before starting to store current query #### if (exists $cur_info{$t_pid}{query}) { # when switching to a new log message if ( ($prefix_vars{'t_loglevel'} eq 'LOG') || ($format eq 'csv') || ($prefix_vars{'t_loglevel'} =~ $main_error_regex) ) { if (&store_queries($t_pid)) { delete $cur_info{$t_pid}; } } } #### # Store current query information #### # Log lines with duration only, generated by log_duration = on in postgresql.conf if ($prefix_vars{'t_query'} =~ s/duration: ([0-9\.]+) ms$//s) { $prefix_vars{'t_duration'} = $1; $prefix_vars{'t_query'} = ''; my $k = &get_hist_inbound($1, @histogram_query_time); $overall_stat{histogram}{query_time}{$k}++; $overall_stat{histogram}{query_total}++; &set_current_infos($t_pid); return; } # Store info as tsung session following the output file extension if (($extension eq 'tsung') && !exists $tsung_session{$prefix_vars{'t_pid'}}{connection} && $prefix_vars{'t_dbname'}) { $tsung_session{$prefix_vars{'t_pid'}}{connection}{database} = $prefix_vars{'t_dbname'}; $tsung_session{$prefix_vars{'t_pid'}}{connection}{user} = $prefix_vars{'t_dbuser'}; $tsung_session{$prefix_vars{'t_pid'}}{connection}{date} = $prefix_vars{'t_date'}; } my $t_action = ''; # Store query duration generated by log_min_duration >= 0 in postgresql.conf if ($prefix_vars{'t_query'} =~ s/duration: ([0-9\.]+) ms (query|statement): //is) { $prefix_vars{'t_duration'} = $1; $t_action = $2; my $k = &get_hist_inbound($1, @histogram_query_time); $overall_stat{histogram}{query_time}{$k}++; $overall_stat{histogram}{query_total}++; if (($t_action eq 'statement') && $prefix_vars{'t_query'} =~ /^(PREPARE|EXECUTE)\b/i) { $overall_stat{lc($1)}++; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{lc($1)}++; # We do not store prepare statement return if (lc($1) eq 'prepare'); } # Log line with duration and statement from prepared queries } elsif ($prefix_vars{'t_query'} =~ s/duration: ([0-9\.]+) ms (prepare|parse|bind|execute from fetch|execute)\s+[^:]+:\s//is) { $prefix_vars{'t_duration'} = $1; $t_action = $2; $t_action =~ s/ from fetch//; $t_action = 'prepare' if ($t_action eq 'parse'); $overall_stat{$t_action}++; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{$t_action}++; # Skipping prepare, parse and bind logs return if ($t_action !~ /query|statement|execute/); my $k = &get_hist_inbound($prefix_vars{'t_duration'}, @histogram_query_time); $overall_stat{histogram}{query_time}{$k}++; $overall_stat{histogram}{query_total}++; $prefix_vars{'t_bind'} = 1; # Activate storage of the explain plan generated by auto_explain } elsif ($prefix_vars{'t_query'} =~ s/duration: ([0-9\.]+) ms plan://is) { $cur_plan_info{$t_pid}{duration} = $1; # Log line without duration at all } elsif ($prefix_vars{'t_query'} =~ s/(query|statement): //is) { $t_action = $1; if (($t_action eq 'statement') && $prefix_vars{'t_query'} =~ /^(PREPARE|EXECUTE)\b/i) { $overall_stat{lc($1)}++; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{lc($1)}++; } # Log line without duration at all from prepared queries } elsif ($prefix_vars{'t_query'} =~ s/(prepare|parse|bind|execute from fetch|execute)\s+[^:]+:\s//is) { $t_action = $1; $t_action =~ s/ from fetch//; $t_action = 'prepare' if ($t_action eq 'parse'); $overall_stat{$t_action}++; $per_minute_info{$date_part}{$prefix_vars{'t_hour'}}{$prefix_vars{'t_min'}}{$t_action}++; # Skipping parse and bind logs return if ($t_action !~ /query|statement|execute/); $prefix_vars{'t_bind'} = 1; # Log line that could not be parsed } elsif ($prefix_vars{'t_loglevel'} eq 'LOG') { if ($prefix_vars{'t_query'} !~ /incomplete startup packet|connection|receive|unexpected EOF|still waiting for [^\s]+Lock|checkpoint starting:|could not send data to client|parameter .*configuration file|autovacuum launcher|automatic (analyze|vacuum)|detected deadlock while waiting for/ ) { &logmsg('DEBUG', "Unrecognized line: $prefix_vars{'t_loglevel'}: $prefix_vars{'t_query'} at line $nlines"); } return; } if ( ($format eq 'csv') && ($prefix_vars{'t_loglevel'} ne 'LOG')) { $cur_info{$t_pid}{detail} = $prefix_vars{'t_detail'}; $cur_info{$t_pid}{hint} = $prefix_vars{'t_hint'}; $cur_info{$t_pid}{context} = $prefix_vars{'t_context'}; $cur_info{$t_pid}{statement} = $prefix_vars{'t_statement'} } &set_current_infos($t_pid); return 1; } sub set_current_infos { my $t_pid = shift; if (!$log_duration) { $cur_info{$t_pid}{year} = $prefix_vars{'t_year'}; $cur_info{$t_pid}{month} = $prefix_vars{'t_month'}; $cur_info{$t_pid}{day} = $prefix_vars{'t_day'}; $cur_info{$t_pid}{hour} = $prefix_vars{'t_hour'}; $cur_info{$t_pid}{min} = $prefix_vars{'t_min'}; $cur_info{$t_pid}{sec} = $prefix_vars{'t_sec'}; $cur_info{$t_pid}{timestamp} = $prefix_vars{'t_timestamp'}; $cur_info{$t_pid}{ident} = $prefix_vars{'t_ident'}; $cur_info{$t_pid}{query} = $prefix_vars{'t_query'}; $cur_info{$t_pid}{duration} = $prefix_vars{'t_duration'}; $cur_info{$t_pid}{pid} = $prefix_vars{'t_pid'}; $cur_info{$t_pid}{session} = $prefix_vars{'t_session_line'}; $cur_info{$t_pid}{loglevel} = $prefix_vars{'t_loglevel'}; $cur_info{$t_pid}{dbname} = $prefix_vars{'t_dbname'}; $cur_info{$t_pid}{dbuser} = $prefix_vars{'t_dbuser'}; $cur_info{$t_pid}{dbclient} = $prefix_vars{'t_client'}; $cur_info{$t_pid}{dbappname} = $prefix_vars{'t_appname'}; $cur_info{$t_pid}{date} = $prefix_vars{'t_date'}; $cur_info{$t_pid}{bind} = $prefix_vars{'t_bind'}; # Extract the query part from the plan if (exists $cur_plan_info{$t_pid} && ($cur_plan_info{$t_pid}{plan} ne '')) { $cur_plan_info{$t_pid}{plan} =~ s/^(?:.*?)\t([^\t]+\(cost=?)/$1/s; $cur_info{$t_pid}{plan} = $cur_plan_info{$t_pid}{plan}; delete $cur_plan_info{$t_pid}; } } else { $cur_info{$t_pid}{year} = $prefix_vars{'t_year'} if (! $cur_info{$t_pid}{year}); $cur_info{$t_pid}{month} = $prefix_vars{'t_month'} if (! $cur_info{$t_pid}{month}); $cur_info{$t_pid}{day} = $prefix_vars{'t_day'} if (! $cur_info{$t_pid}{day}); $cur_info{$t_pid}{hour} = $prefix_vars{'t_hour'} if ($cur_info{$t_pid}{hour} eq ''); $cur_info{$t_pid}{min} = $prefix_vars{'t_min'} if (! $cur_info{$t_pid}{min} eq ''); $cur_info{$t_pid}{sec} = $prefix_vars{'t_sec'} if (! $cur_info{$t_pid}{sec} eq ''); $cur_info{$t_pid}{timestamp} = $prefix_vars{'t_timestamp'} if (! $cur_info{$t_pid}{timestamp}); $cur_info{$t_pid}{ident} = $prefix_vars{'t_ident'} if (! $cur_info{$t_pid}{ident}); $cur_info{$t_pid}{query} = $prefix_vars{'t_query'} if (! $cur_info{$t_pid}{query}); $cur_info{$t_pid}{duration} = $prefix_vars{'t_duration'} if (! $cur_info{$t_pid}{duration}); $cur_info{$t_pid}{pid} = $prefix_vars{'t_pid'} if (! $cur_info{$t_pid}{pid}); $cur_info{$t_pid}{session} = $prefix_vars{'t_session_line'} if (! $cur_info{$t_pid}{session}); $cur_info{$t_pid}{loglevel} = $prefix_vars{'t_loglevel'} if (! $cur_info{$t_pid}{loglevel}); $cur_info{$t_pid}{dbname} = $prefix_vars{'t_dbname'} if (! $cur_info{$t_pid}{dbname}); $cur_info{$t_pid}{dbuser} = $prefix_vars{'t_dbuser'} if (! $cur_info{$t_pid}{dbuser}); $cur_info{$t_pid}{dbclient} = $prefix_vars{'t_client'} || $prefix_vars{'t_dbclient'} if (! $cur_info{$t_pid}{dbclient}); $cur_info{$t_pid}{dbappname} = $prefix_vars{'t_appname'} if (! $cur_info{$t_pid}{dbappname}); $cur_info{$t_pid}{date} = $prefix_vars{'t_date'} if (! $cur_info{$t_pid}{date}); $cur_info{$t_pid}{bind} = $prefix_vars{'t_bind'} if (! $cur_info{$t_pid}{bind}); # Extract the query part from the plan if (exists $cur_plan_info{$t_pid} && ($cur_plan_info{$t_pid}{plan} ne '')) { $cur_plan_info{$t_pid}{plan} =~ s/^\s*Query Text: (.*?);//s; $cur_info{$t_pid}{plan} = $cur_plan_info{$t_pid}{plan}; delete $cur_plan_info{$t_pid}; } } } sub store_tsung_session { my $pid = shift; return if ($#{$tsung_session{$pid}{dates}} < 0); # Open filehandle my $fh = new IO::File ">>$outfile"; if (not defined $fh) { die "FATAL: can't write to $outfile, $!\n"; } if ($pid) { print $fh " \n"; if (exists $tsung_session{$pid}{connection}{database}) { print $fh qq{ }; } if ($#{$tsung_session{$pid}{dates}} >= 0) { my $sec = 0; if ($tsung_session{$pid}{connection}{date}) { $sec = $tsung_session{$pid}{dates}[0] - $tsung_session{$pid}{connection}{date}; } print $fh " \n" if ($sec > 0); print $fh " \n"; for (my $i = 0 ; $i <= $#{$tsung_session{$pid}{queries}} ; $i++) { $tsung_queries++; $sec = 0; if ($i > 0) { $sec = $tsung_session{$pid}{dates}[$i] - $tsung_session{$pid}{dates}[$i - 1]; print $fh " \n" if ($sec > 0); } print $fh " \n"; } print $fh " \n"; } if ($#{$tsung_session{$pid}{dates}} >= 0) { my $sec = $tsung_session{$pid}{disconnection}{date} - $tsung_session{$pid}{dates}[-1]; print $fh " \n" if ($sec > 0); } if (exists $tsung_session{$pid}{connection}{database}) { print $fh " \n"; } print $fh " \n\n"; delete $tsung_session{$pid}; } $fh->close; } sub store_queries { my $t_pid = shift; my $end = shift; return 0 if (!$end && $log_duration && ($cur_info{$t_pid}{duration} eq '')); # Remove comments if required if ($remove_comment) { $cur_info{$t_pid}{query} =~ s/\/\*(.*?)\*\///gs; } # Anonymize query if requested by the user if ($anonymize && exists $cur_info{$t_pid}{query}) { $cur_info{$t_pid}{query} = &anonymize_query($cur_info{$t_pid}{query}); } # Stores temporary files and lock information &store_temporary_and_lock_infos($t_pid); return 0 if (!exists $cur_info{$t_pid}); return 1 if (!$cur_info{$t_pid}{year}); # Cleanup and normalize the current query $cur_info{$t_pid}{query} =~ s/^[\t\s\r\n]+//s; $cur_info{$t_pid}{query} =~ s/[\t\s\r\n;]+$//s; # Replace bind parameters values in the query if any if (exists $cur_info{$t_pid}{parameters} && ($cur_info{$t_pid}{parameters} =~ /[,\s]*\$(\d+)\s=\s/)) { my @t_res = split(/[,\s]*\$(\d+)\s=\s/, $cur_info{$t_pid}{parameters}); shift(@t_res); for (my $i = 0 ; $i < $#t_res ; $i += 2) { $cur_info{$t_pid}{query} =~ s/\$$t_res[$i]\b/$t_res[$i+1]/s; } } else { # parameters from EXECUTE statements my @t_res = split(/[\s]*,[\s]*/, $cur_info{$t_pid}{parameters}); for (my $i = 0 ; $i <= $#t_res ; $i++) { my $num = $i + 1; $cur_info{$t_pid}{query} =~ s/\$$num\b/$t_res[$i]/s; } } # We only process stored object with query here if ($cur_info{$t_pid}{query}) { # Should we just want select queries if ($select_only) { return 1 if ($cur_info{$t_pid}{query} !~ /^SELECT/is); } # Should we have to exclude some queries if ($#exclude_query >= 0) { foreach (@exclude_query) { if ($cur_info{$t_pid}{query} =~ /$_/i) { $cur_info{$t_pid}{query} = ''; return 1; } } } # Should we have to include only some queries if ($#include_query >= 0) { foreach (@include_query) { if ($cur_info{$t_pid}{query} !~ /$_/i) { $cur_info{$t_pid}{query} = ''; return 1; } } } # Dump queries as tsung request and return if ($extension eq 'tsung') { if ($cur_info{$t_pid}{loglevel} eq 'LOG') { push(@{$tsung_session{$t_pid}{queries}}, $cur_info{$t_pid}{query}); push(@{$tsung_session{$t_pid}{dates}}, $cur_info{$t_pid}{date}); if (!exists $tsung_session{$t_pid}{connection} && $cur_info{$t_pid}{dbname}) { $tsung_session{$t_pid}{connection}{database} = $cur_info{$t_pid}{dbname}; $tsung_session{$t_pid}{connection}{user} = $cur_info{$t_pid}{dbuser}; $tsung_session{$t_pid}{connection}{date} = $cur_info{$t_pid}{date}; } } # Stores global statistics $overall_stat{'queries_number'}++; $overall_stat{'queries_duration'} += $cur_info{$t_pid}{duration} if ($cur_info{$t_pid}{duration}); return 1; } # Truncate the query if requested by the user $cur_info{$t_pid}{query} = substr($cur_info{$t_pid}{query}, 0, $maxlength) . '[...]' if (($maxlength > 0) && (length($cur_info{$t_pid}{query}) > $maxlength)); } my $cur_day_str = "$cur_info{$t_pid}{year}$cur_info{$t_pid}{month}$cur_info{$t_pid}{day}"; my $cur_hour_str = "$cur_info{$t_pid}{hour}"; # Store the collected information into global statistics if ($cur_info{$t_pid}{loglevel} =~ $main_error_regex) { # Add log level at beginning of the query and normalize it $cur_info{$t_pid}{query} = $cur_info{$t_pid}{loglevel} . ": " . $cur_info{$t_pid}{query}; my $normalized_error = &normalize_error($cur_info{$t_pid}{query}); # Stores total and normalized error count $overall_stat{'errors_number'}++; $error_info{$normalized_error}{count}++; # Stores normalized error count per time $error_info{$normalized_error}{chronos}{"$cur_day_str"}{"$cur_hour_str"}{count}++; $error_info{$normalized_error}{chronos}{"$cur_day_str"}{"$cur_hour_str"}{min}{$cur_info{$t_pid}{min}}++; # Stores log level count per minute $per_minute_info{"$cur_day_str"}{"$cur_hour_str"}{$cur_info{$t_pid}{min}}{log_level}{$cur_info{$t_pid}{loglevel}}++; # Stores normalized query samples if ($sample > 0) { my $cur_last_log_timestamp = "$cur_info{$t_pid}{year}-$cur_info{$t_pid}{month}-$cur_info{$t_pid}{day} " . "$cur_info{$t_pid}{hour}:$cur_info{$t_pid}{min}:$cur_info{$t_pid}{sec}"; &set_top_error_sample( $normalized_error, $cur_last_log_timestamp, $cur_info{$t_pid}{query}, $cur_info{$t_pid}{detail}, $cur_info{$t_pid}{context}, $cur_info{$t_pid}{statement}, $cur_info{$t_pid}{hint}, $cur_info{$t_pid}{dbname}, $cur_info{$t_pid}{dbuser}, $cur_info{$t_pid}{dbappname}, $cur_info{$t_pid}{dbclient} ); } } elsif ($cur_info{$t_pid}{loglevel} eq 'LOG') { # Stores global statistics $overall_stat{'queries_number'}++; $overall_stat{'queries_duration'} += $cur_info{$t_pid}{duration} if ($cur_info{$t_pid}{duration}); my $cur_last_log_timestamp = "$cur_info{$t_pid}{year}-$cur_info{$t_pid}{month}-$cur_info{$t_pid}{day} " . "$cur_info{$t_pid}{hour}:$cur_info{$t_pid}{min}:$cur_info{$t_pid}{sec}"; if (!$overall_stat{'first_query_ts'} || ($overall_stat{'first_query_ts'} gt $cur_last_log_timestamp)) { $overall_stat{'first_query_ts'} = $cur_last_log_timestamp; } if (!$overall_stat{'last_query_ts'} || ($overall_stat{'last_query_ts'} lt $cur_last_log_timestamp)) { $overall_stat{'last_query_ts'} = $cur_last_log_timestamp; } $overall_stat{'peak'}{$cur_last_log_timestamp}{query}++; if ($graph) { $per_minute_info{"$cur_day_str"}{"$cur_hour_str"}{$cur_info{$t_pid}{min}}{query}{count}++; $per_minute_info{"$cur_day_str"}{"$cur_hour_str"}{$cur_info{$t_pid}{min}}{query}{second}{$cur_info{$t_pid}{sec}}++; # Store min / max duration if ($cur_info{$t_pid}{duration}) { $per_minute_info{"$cur_day_str"}{"$cur_hour_str"}{$cur_info{$t_pid}{min}}{query}{duration} += $cur_info{$t_pid}{duration} if ($cur_info{$t_pid}{duration}); if (!exists $per_minute_info{"$cur_day_str"}{"$cur_hour_str"}{$cur_info{$t_pid}{min}}{query}{min} || ($per_minute_info{"$cur_day_str"}{"$cur_hour_str"}{$cur_info{$t_pid}{min}}{query}{min} > $cur_info{$t_pid}{duration})) { $per_minute_info{"$cur_day_str"}{"$cur_hour_str"}{$cur_info{$t_pid}{min}}{query}{min} = $cur_info{$t_pid}{duration}; } if (!exists $per_minute_info{"$cur_day_str"}{"$cur_hour_str"}{$cur_info{$t_pid}{min}}{query}{max} || ($per_minute_info{"$cur_day_str"}{"$cur_hour_str"}{$cur_info{$t_pid}{min}}{query}{max} < $cur_info{$t_pid}{duration})) { $per_minute_info{"$cur_day_str"}{"$cur_hour_str"}{$cur_info{$t_pid}{min}}{query}{max} = $cur_info{$t_pid}{duration}; } } } # Counter per database and application name if ($cur_info{$t_pid}{dbname}) { $database_info{$cur_info{$t_pid}{dbname}}{count}++; $database_info{$cur_info{$t_pid}{dbname}}{duration} += $cur_info{$t_pid}{duration} if ($cur_info{$t_pid}{duration}); } else { $database_info{unknown}{count}++; $database_info{unknown}{duration} += $cur_info{$t_pid}{duration} if ($cur_info{$t_pid}{duration}); } if ($cur_info{$t_pid}{dbappname}) { $application_info{$cur_info{$t_pid}{dbappname}}{count}++; $application_info{$cur_info{$t_pid}{dbappname}}{duration} += $cur_info{$t_pid}{duration} if ($cur_info{$t_pid}{duration}); } else { $application_info{unknown}{count}++; $application_info{unknown}{duration} += $cur_info{$t_pid}{duration} if ($cur_info{$t_pid}{duration}); } if ($cur_info{$t_pid}{dbuser}) { $user_info{$cur_info{$t_pid}{dbuser}}{count}++; $user_info{$cur_info{$t_pid}{dbuser}}{duration} += $cur_info{$t_pid}{duration} if ($cur_info{$t_pid}{duration}); } else { $user_info{unknown}{count}++; $user_info{unknown}{duration} += $cur_info{$t_pid}{duration} if ($cur_info{$t_pid}{duration}); } if ($cur_info{$t_pid}{dbclient}) { $host_info{$cur_info{$t_pid}{dbclient}}{count}++; $host_info{$cur_info{$t_pid}{dbclient}}{duration} += $cur_info{$t_pid}{duration} if ($cur_info{$t_pid}{duration}); } else { $host_info{unknown}{count}++; $host_info{unknown}{duration} += $cur_info{$t_pid}{duration} if ($cur_info{$t_pid}{duration}); } if ($cur_info{$t_pid}{query}) { # Add a semi-colon at end of the query $cur_info{$t_pid}{query} .= ';' if ($cur_info{$t_pid}{query} !~ /;\s*$/s); # Normalize query my $normalized = &normalize_query($cur_info{$t_pid}{query}); my $action = uc($1); if ($normalized =~ $action_regex) { $action = uc($1); # If this is a copy statement try to find if this is a write or read statement if (($action eq 'COPY') && (($normalized =~ /FROM\s+STDIN/i) || ($normalized =~ /FROM\s+'[^']+'/is))) { $action = 'INSERT'; } elsif ($action eq 'COPY') { $action = 'SELECT'; } } else { $action = 'OTHERS'; } $overall_stat{$action}++; if ($action eq 'SELECT') { $overall_stat{'peak'}{$cur_last_log_timestamp}{select}++; } elsif ($action ne 'OTHERS') { $overall_stat{'peak'}{$cur_last_log_timestamp}{write}++; } $per_minute_info{"$cur_day_str"}{"$cur_hour_str"}{$cur_info{$t_pid}{min}}{$action}{count}++; $per_minute_info{"$cur_day_str"}{"$cur_hour_str"}{$cur_info{$t_pid}{min}}{$action}{second}{$cur_info{$t_pid}{sec}}++; $per_minute_info{"$cur_day_str"}{"$cur_hour_str"}{$cur_info{$t_pid}{min}}{$action}{duration} += $cur_info{$t_pid}{duration} if ($cur_info{$t_pid}{duration}); if ($cur_info{$t_pid}{dbname}) { $database_info{$cur_info{$t_pid}{dbname}}{$action}++; $database_info{$cur_info{$t_pid}{dbname}}{"$action|duration"} += $cur_info{$t_pid}{duration} if ($cur_info{$t_pid}{duration}); } else { $database_info{unknown}{$action}++; $database_info{unknown}{"$action|duration"} += $cur_info{$t_pid}{duration} if ($cur_info{$t_pid}{duration}); } if ($cur_info{$t_pid}{dbappname}) { $application_info{$cur_info{$t_pid}{dbappname}}{$action}++; $application_info{$cur_info{$t_pid}{dbappname}}{"$action|duration"} += $cur_info{$t_pid}{duration} if ($cur_info{$t_pid}{duration}); } else { $application_info{unknown}{$action}++; $application_info{unknown}{"$action|duration"} += $cur_info{$t_pid}{duration} if ($cur_info{$t_pid}{duration}); } if ($cur_info{$t_pid}{dbuser}) { $user_info{$cur_info{$t_pid}{dbuser}}{$action}++; $user_info{$cur_info{$t_pid}{dbuser}}{"$action|duration"} += $cur_info{$t_pid}{duration} if ($cur_info{$t_pid}{duration}); } else { $user_info{unknown}{$action}++; $user_info{unknown}{"$action|duration"} += $cur_info{$t_pid}{duration} if ($cur_info{$t_pid}{duration}); } if ($cur_info{$t_pid}{dbclient}) { $host_info{$cur_info{$t_pid}{dbclient}}{$action}++; $host_info{$cur_info{$t_pid}{dbclient}}{"$action|duration"} += $cur_info{$t_pid}{duration} if ($cur_info{$t_pid}{duration}); } else { $host_info{unknown}{$action}++; $host_info{unknown}{"$action|duration"} += $cur_info{$t_pid}{duration} if ($cur_info{$t_pid}{duration}); } # Store normalized query count $normalyzed_info{$normalized}{count}++; # Store normalized query count and duration per time $normalyzed_info{$normalized}{chronos}{"$cur_day_str"}{"$cur_hour_str"}{count}++; $normalyzed_info{$normalized}{chronos}{"$cur_day_str"}{"$cur_hour_str"}{min}{$cur_info{$t_pid}{min}}++; if ($cur_info{$t_pid}{duration}) { # Update top slowest queries statistics &set_top_slowest($cur_info{$t_pid}{query}, $cur_info{$t_pid}{duration}, $cur_last_log_timestamp, $cur_info{$t_pid}{dbname}, $cur_info{$t_pid}{dbuser}, $cur_info{$t_pid}{dbclient},$cur_info{$t_pid}{dbappname}, $cur_info{$t_pid}{bind}, $cur_info{$t_pid}{plan}); # Store normalized query total duration $normalyzed_info{$normalized}{duration} += $cur_info{$t_pid}{duration}; $normalyzed_info{$normalized}{chronos}{"$cur_day_str"}{"$cur_hour_str"}{min_duration}{$cur_info{$t_pid}{min}} += $cur_info{$t_pid}{duration}; # Store min / max duration if (!exists $normalyzed_info{$normalized}{min} || ($normalyzed_info{$normalized}{min} > $cur_info{$t_pid}{duration})) { $normalyzed_info{$normalized}{min} = $cur_info{$t_pid}{duration}; } if (!exists $normalyzed_info{$normalized}{max} || ($normalyzed_info{$normalized}{max} < $cur_info{$t_pid}{duration})) { $normalyzed_info{$normalized}{max} = $cur_info{$t_pid}{duration}; } # Stores query/user information if ($cur_info{$t_pid}{dbuser}) { $normalyzed_info{$normalized}{users}{$cur_info{$t_pid}{dbuser}}{duration} += $cur_info{$t_pid}{duration}; $normalyzed_info{$normalized}{users}{$cur_info{$t_pid}{dbuser}}{count}++; } # Stores query/app information if ($cur_info{$t_pid}{dbappname}) { $normalyzed_info{$normalized}{apps}{$cur_info{$t_pid}{dbappname}}{duration} += $cur_info{$t_pid}{duration}; $normalyzed_info{$normalized}{apps}{$cur_info{$t_pid}{dbappname}}{count}++; } # Store normalized query count and duration per time $normalyzed_info{$normalized}{chronos}{"$cur_day_str"}{"$cur_hour_str"}{duration} += $cur_info{$t_pid}{duration}; # Store normalized query samples &set_top_sample($normalized, $cur_info{$t_pid}{query}, $cur_info{$t_pid}{duration}, $cur_last_log_timestamp, $cur_info{$t_pid}{dbname}, $cur_info{$t_pid}{dbuser}, $cur_info{$t_pid}{dbclient},$cur_info{$t_pid}{dbappname}, $cur_info{$t_pid}{bind}, $cur_info{$t_pid}{plan}); } } } return 1; } sub store_temporary_and_lock_infos { my $t_pid = shift; return if (!$t_pid); # Store normalized query temp file size if required if (exists $cur_temp_info{$t_pid} && ($cur_temp_info{$t_pid}{query} ne '') && $cur_temp_info{$t_pid}{size}) { # Add a semi-colon at end of the query $cur_temp_info{$t_pid}{query} .= ';' if ($cur_temp_info{$t_pid}{query} !~ /;\s*$/s); # Anonymize query if requested by the user if ($anonymize) { $cur_temp_info{$t_pid}{query} = &anonymize_query($cur_temp_info{$t_pid}{query}); } # Normalize query my $normalized = &normalize_query($cur_temp_info{$t_pid}{query}); $normalyzed_info{$normalized}{tempfiles}{size} += $cur_temp_info{$t_pid}{size}; $normalyzed_info{$normalized}{tempfiles}{count}++; if ($normalyzed_info{$normalized}{tempfiles}{maxsize} < $cur_temp_info{$t_pid}{size}) { $normalyzed_info{$normalized}{tempfiles}{maxsize} = $cur_temp_info{$t_pid}{size}; } if (!exists($normalyzed_info{$normalized}{tempfiles}{minsize}) || $normalyzed_info{$normalized}{tempfiles}{minsize} > $cur_temp_info{$t_pid}{size}) { $normalyzed_info{$normalized}{tempfiles}{minsize} = $cur_temp_info{$t_pid}{size}; } &set_top_tempfile_info($cur_temp_info{$t_pid}{query}, $cur_temp_info{$t_pid}{size}, $cur_temp_info{$t_pid}{timestamp}, $cur_temp_info{$t_pid}{dbname}, $cur_temp_info{$t_pid}{dbuser}, $cur_temp_info{$t_pid}{dbclient}, $cur_temp_info{$t_pid}{dbappname}); delete $cur_temp_info{$t_pid}; } # Store normalized query that waited the most if required if (exists $cur_lock_info{$t_pid}{wait} && ($cur_lock_info{$t_pid}{query} ne '')) { # Add a semi-colon at end of the query $cur_lock_info{$t_pid}{query} .= ';' if ($cur_lock_info{$t_pid}{query} !~ /;\s*$/s); # Anonymize query if requested by the user if ($anonymize) { $cur_temp_info{$t_pid}{query} = &anonymize_query($cur_temp_info{$t_pid}{query}); } # Normalize query my $normalized = &normalize_query($cur_lock_info{$t_pid}{query}); $normalyzed_info{$normalized}{locks}{wait} += $cur_lock_info{$t_pid}{wait}; $normalyzed_info{$normalized}{locks}{count}++; if ($normalyzed_info{$normalized}{locks}{maxwait} < $cur_lock_info{$t_pid}{wait}) { $normalyzed_info{$normalized}{locks}{maxwait} = $cur_lock_info{$t_pid}{wait}; } if (!exists($normalyzed_info{$normalized}{locks}{minwait}) || $normalyzed_info{$normalized}{locks}{minwait} > $cur_lock_info{$t_pid}{wait}) { $normalyzed_info{$normalized}{locks}{minwait} = $cur_lock_info{$t_pid}{wait}; } &set_top_locked_info($cur_lock_info{$t_pid}{query}, $cur_lock_info{$t_pid}{wait}, $cur_lock_info{$t_pid}{timestamp}, $cur_lock_info{$t_pid}{dbname}, $cur_lock_info{$t_pid}{dbuser}, $cur_lock_info{$t_pid}{dbclient}, $cur_lock_info{$t_pid}{dbappname}); delete $cur_lock_info{$t_pid}; } # Store normalized query temp file size if required if (exists $cur_cancel_info{$t_pid} && ($cur_cancel_info{$t_pid}{query} ne '')) { # Add a semi-colon at end of the query $cur_cancel_info{$t_pid}{query} .= ';' if ($cur_cancel_info{$t_pid}{query} !~ /;\s*$/s); # Anonymize query if requested by the user if ($anonymize) { $cur_cancel_info{$t_pid}{query} = &anonymize_query($cur_cancel_info{$t_pid}{query}); } # Normalize query my $normalized = &normalize_query($cur_cancel_info{$t_pid}{query}); $normalyzed_info{$normalized}{cancelled}{count}++; &set_top_cancelled_info($cur_cancel_info{$t_pid}{query}, $cur_cancel_info{$t_pid}{count}, $cur_cancel_info{$t_pid}{timestamp}, $cur_cancel_info{$t_pid}{dbname}, $cur_cancel_info{$t_pid}{dbuser}, $cur_cancel_info{$t_pid}{dbclient}, $cur_cancel_info{$t_pid}{dbappname}); delete $cur_cancel_info{$t_pid}; } } # Normalize error messages sub normalize_error { my $orig_query = shift; return if (!$orig_query); # Remove character position $orig_query =~ s/ at character \d+//; # Remove encoding detail $orig_query =~ s/(byte sequence for encoding).*/$1/; # Replace changing parameter by ... $orig_query =~ s/"[^"]*"/"..."/g; $orig_query =~ s/\(.*\)/\(...\)/g; $orig_query =~ s/column .* does not exist/column "..." does not exist/; $orig_query =~ s/(database system was shut down at).*/$1 .../; $orig_query =~ s/(relation) \d+ (deleted while still in use)/$1 ... $2/g; $orig_query =~ s/[0-9A-F]{24}/.../g; # Remove WAL filename $orig_query =~ s/, u_uuid: [^,]+, file_path:.*/. Retrying/g; # Need more normalization stuff here return $orig_query; } sub average_per_minutes { my $val = shift; my $idx = shift; my @lavgs = (); for (my $i = 0 ; $i < 60 ; $i += $idx) { push(@lavgs, sprintf("%02d", $i)); } for (my $i = 0 ; $i <= $#lavgs ; $i++) { if ($val == $lavgs[$i]) { return "$lavgs[$i]"; } elsif ($i == $#lavgs) { return "$lavgs[$i]"; } elsif (($val > $lavgs[$i]) && ($val < $lavgs[$i + 1])) { return "$lavgs[$i]"; } } return $val; } sub autodetect_format { my $file = shift; # Open log file for reading my $nfound = 0; my $nline = 0; my $fmt = ''; die "FATAL: can't open file $file, $!\n" unless(open(TESTFILE, $file)); my $fltf = ; close($fltf); # is file in binary format ? if ( $fltf =~ /^pst\d/ ) { $fmt = 'binary'; } else { # try to detect syslogs or csv my ($tfile, $totalsize) = &get_log_file($file); my %ident_name = (); while (my $line = <$tfile>) { chomp($line); $line =~ s/\r//; next if (!$line); $nline++; # Are syslog lines ? if ($line =~ /^[A-Z][a-z]{2}\s+\d+\s\d+:\d+:\d+(?:\s[^\s]+)?\s[^\s]+\s([^\s\[]+)\[\d+\]:(?:\s\[[^\]]+\])?\s\[\d+\-\d+\].*?(LOG|WARNING|ERROR|FATAL|PANIC|DETAIL|STATEMENT|HINT|CONTEXT):/ ) { $fmt = 'syslog'; $nfound++; $ident_name{$1}++; } elsif ($line =~ /^\d+-\d+-\d+T\d+:\d+:\d+(?:.[^\s]+)?\s[^\s]+\s(?:[^\s]+\s)?(?:[^\s]+\s)?([^\s\[]+)\[\d+\]:(?:\s\[[^\]]+\])?\s\[\d+\-\d+\].*?(LOG|WARNING|ERROR|FATAL|PANIC|DETAIL|STATEMENT|HINT|CONTEXT):/ ) { $fmt = 'syslog2'; $nfound++; $ident_name{$1}++; # Are stderr lines ? } elsif ( ( $line =~ /^\d+-\d+-\d+ \d+:\d+:\d+\.\d+(?: [A-Z\d]{3,6})?,.*,(LOG|WARNING|ERROR|FATAL|PANIC|DETAIL|STATEMENT|HINT|CONTEXT),/ ) && ($line =~ tr/,/,/ >= 12) ) { $fmt = 'csv'; $nfound++; } elsif ($line =~ /\d+-\d+-\d+ \d+:\d+:\d+[\.0-9]*(?: [A-Z\d]{3,6})?(.*?)(LOG|WARNING|ERROR|FATAL|PANIC|DETAIL|STATEMENT|HINT|CONTEXT):\s+/ ) { $fmt = 'stderr'; $nfound++; } last if (($nfound > 10) || ($nline > 5000)); } $tfile->close(); if (!$format) { if (!$fmt || ($nfound < 10)) { die "FATAL: unable to detect log file format from $file, please use -f option.\n"; } } if (($fmt =~ /syslog/) && !$ident && (scalar keys %ident_name == 1)) { $ident = (keys %ident_name)[0]; } } &logmsg('DEBUG', "Autodetected log format '$fmt' from $file"); return $fmt; } sub progress_bar { my ($got, $total, $width, $char, $queries, $errors) = @_; $width ||= 25; $char ||= '='; my $num_width = length $total; my $nchars = (($width - 1) * $got / $total); $nchars = ($width - 1) if ($nchars >= $width); if ($extension eq 'tsung') { sprintf( "[%-${width}s] Parsed %${num_width}s bytes of %s (%.2f%%), queries: %d\r", $char x $nchars . '>', $got, $total, 100 * $got / +$total, ($queries || $overall_stat{'queries_number'}) ); } elsif ($format eq 'binary') { my $file = $_[-1]; sprintf( "Loaded %d queries and %d events from binary file %s...\r", $overall_stat{'queries_number'}, $overall_stat{'errors_number'}, $file ); } else { sprintf( "[%-${width}s] Parsed %${num_width}s bytes of %s (%.2f%%), queries: %d, events: %d\r", $char x $nchars . '>', $got, $total, 100 * $got / +$total, ($queries || $overall_stat{'queries_number'}), ($errors || $overall_stat{'errors_number'}) ); } } sub flotr2_graph { my ($buttonid, $divid, $data1, $data2, $data3, $title, $ytitle, $legend1, $legend2, $legend3, $ytitle2, $data4, $legend4) = @_; if (!$data1) { return qq{
    NO DATASET
    }; } my $dateTracker_lblopts = ''; if ($legend1) { $dateTracker_lblopts .= "'$legend1',"; $legend1 = "{ data: d1, label: \"$legend1\", color: \"#6e9dc9\", mouse:{track:true}},"; } if ($legend2) { $dateTracker_lblopts .= "'$legend2',"; $legend2 = "{ data: d2, label: \"$legend2\", color: \"#f4ab3a\", mouse:{track:true}},"; } if ($legend3) { $dateTracker_lblopts .= "'$legend3',"; $legend3 = "{ data: d3, label: \"$legend3\", color: \"#ac7fa8\", mouse:{track:true}},"; } if ($legend4) { $dateTracker_lblopts .= "'$legend4',"; if ($ytitle2) { $legend4 = "{ data: d4, label: \"$legend4\", color: \"#8dbd0f\",yaxis: 2},"; } else { $legend4 = "{ data: d4, label: \"$legend4\", color: \"#8dbd0f\", mouse:{track:true}},"; } } $dateTracker_lblopts =~ s/,$//; $dateTracker_lblopts = "[$dateTracker_lblopts]"; my $dateTracker_dataopts = ''; if ($data1) { $data1 = "var d1 = [$data1];"; $dateTracker_dataopts .= "d1,"; } if ($data2) { $data2 = "var d2 = [$data2];"; $dateTracker_dataopts .= "d2,"; } if ($data3) { $data3 = "var d3 = [$data3];"; $dateTracker_dataopts .= "d3,"; } if ($data4) { $data4 = "var d4 = [$data4];"; $dateTracker_dataopts .= "d4,"; } $dateTracker_dataopts =~ s/,$//; $dateTracker_dataopts = "[$dateTracker_dataopts]"; my $yaxis2 = ''; if ($ytitle2) { $yaxis2 = "y2axis: { mode: \"normal\", title: \"$ytitle2\", min: 0, color: \"#8dbd0f\" },"; } my $type = ''; if ($ytitle eq 'Size of files') { $type = 'size'; } elsif ($ytitle eq 'Duration') { $type = 'duration'; } my $barwidth = $avg_minutes * 60 * 1000; my $bar_def = ''; if ($bar_graph || ($divid eq 'eventspersecond_graph')) { my $stacked = 'false'; $stacked = 'true' if ($divid eq 'eventspersecond_graph'); $bar_def = qq{ bars: { show: true, stacked: $stacked, horizontal: false, shadowSize: 0, barWidth: $barwidth, }, }; } return < EOF } sub flotr2_piegraph { my ($buttonid, $divid, $title, %data) = @_; my $type = ''; if ($divid =~ /size/) { $type = 'size'; } elsif ($divid =~ /duration/) { $type = 'duration'; } if (scalar keys %data == 0) { return qq{
    NO DATASET
    }; } my @colors = ("#6e9dc9", "#f4ab3a", "#ac7fa8", "#8dbd0f"); my @datadef = (); my @contdef = (); my $i = 1; foreach my $k (sort { if ( ($a =~ /(\d+)/) && ($b =~ /(\d+)/) ) { ($a =~ /(\d+)/)[0] <=> ($b =~ /(\d+)/)[0]; } else { $a cmp $b; } } keys %data) { push(@datadef, "var d$i = [ [0,$data{$k}] ];\n"); my $color = ''; $color = ", color: \"$colors[$i-1]\"" if (($i-1) <= $#colors); push(@contdef, "{ data: d$i, label: \"$k\"$color },\n"); $i++; } return < EOF } sub flotr2_histograph { my ($buttonid, $divid, $data1, $data2, $legend1, $legend2, $min, $max) = @_; if (!$data1) { return qq{
    NO DATASET
    }; } $legend1 ||= 'Avg. queries'; my $dateTracker_lblopts = "'$legend1',"; $legend1 = "{ data: d1, label: \"$legend1\", color: \"#6e9dc9\", mouse:{track:true}, bars: {show: true,shadowSize: 0}, },"; if ($data2) { $legend2 ||= 'Avg. duration'; $dateTracker_lblopts .= "'$legend2'"; $legend2 = "{ data: d2, label: \"$legend2\", color: \"#8dbd0f\", yaxis: 2},"; } $dateTracker_lblopts =~ s/,$//; $dateTracker_lblopts = "[$dateTracker_lblopts]"; my $dateTracker_dataopts = ''; if ($data1) { $data1 = "var d1 = [$data1];"; $dateTracker_dataopts .= "d1,"; } if ($data2) { $data2 = "var d2 = [$data2];"; $dateTracker_dataopts .= "d2"; } $dateTracker_dataopts =~ s/,$//; $dateTracker_dataopts = "[$dateTracker_dataopts]"; my $yaxis2 = "y2axis: { mode: \"normal\", noTicks: 4, title: \"Duration\", min: 0, color: \"#8dbd0f\", tickFormatter: function(val){ return pretty_print_number(val,'duration') }, },"; $yaxis2 = '' if (!$data2); my $maxticks = (23*3600)+($histo_avgs[-1]*60); return < EOF } sub flotr2_duration_histograph { my ($buttonid, $divid, $legend, $range, %data) = @_; if (scalar keys %data == 0) { return qq{
    NO DATASET
    }; } $legend ||= 'Queries'; $legend = "{ data: d1, color: \"#6e9dc9\", mouse:{track:true}, bars: {show: true, shadowSize: 0}, },"; my $dateTracker_dataopts = '[ d1 ]'; my $data1 = "var d1 = ["; my $max = 0; my $xmax = @$range + 1; my $dateTracker_lblopts = "[ '0', "; for (my $i = 1; $i <= $#{$range}; $i++) { my $k = "$range->[$i-1]-$range->[$i]ms"; $max = $data{$k} if ($data{$k} > $max); $data1 .= " [$i, $data{$k}],"; $data{"$histogram_query_time[$i-1]-$histogram_query_time[$i]ms"} = ($overall_stat{histogram}{query_time}{$histogram_query_time[$i-1]} || 0); $dateTracker_lblopts .= "'" . &convert_time($range->[$i-1]) . '-' . &convert_time($range->[$i]) . "',"; } $dateTracker_lblopts .= "'> " . &convert_time($range->[-1]) . "'"; $dateTracker_lblopts .= "]"; $data1 =~ s/,$//; $data1 .= "];"; if ($max > 3) { $max += int(($max*25)/100); } else { $max *= 2; } return < EOF } sub build_log_line_prefix_regex { my %regex_map = ( '%a' => [('t_appname', '(.*)')], # application name '%u' => [('t_dbuser', '([0-9a-zA-Z\_\[\]\-]*)')], # user name '%d' => [('t_dbname', '([0-9a-zA-Z\_\[\]\-]*)')], # database name '%r' => [('t_hostport', '([a-zA-Z0-9\-\.]+|\[local\]|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|[0-9a-fA-F:]+)?[\(\d\)]*')], # remote host and port '%h' => [('t_client', '([a-zA-Z0-9\-\.]+|\[local\]|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|[0-9a-fA-F:]+)?')], # remote host '%p' => [('t_pid', '(\d+)')], # process ID '%t' => [('t_timestamp', '(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})(?: [A-Z\+\-\d]{3,6})?')], # timestamp without milliseconds '%m' => [('t_mtimestamp', '(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})\.\d+(?: [A-Z\+\-\d]{3,6})?')], # timestamp with milliseconds '%l' => [('t_session_line', '(\d+)')], # session line number '%s' => [('t_session_timestamp', '(\d{4}-\d{2}-\d{2} \d{2}):\d{2}:\d{2}(?: [A-Z\d]{3,6})?')], # session start timestamp '%c' => [('t_session_id', '([0-9a-f\.]*)')], # session ID '%v' => [('t_virtual_xid', '([0-9a-f\.\/]*)')], # virtual transaction ID '%x' => [('t_xid', '([0-9a-f\.\/]*)')], # transaction ID '%i' => [('t_command', '([0-9a-zA-Z\.\-\_]*)')], # command tag '%e' => [('t_sqlstate', '([0-9a-zA-Z]+)')], # SQL state ); my @param_list = (); $log_line_prefix =~ s/([\[\]\|\(\)\{\}])/\\$1/g; $log_line_prefix =~ s/\%l([^\d])\d+/\%l$1\\d\+/; $log_line_prefix =~ s/\%q//; while ($log_line_prefix =~ s/(\%[audrhptmlscvxie])/$regex_map{"$1"}->[1]/) { push(@param_list, $regex_map{"$1"}->[0]); } # replace %% by a single % $log_line_prefix =~ s/\%\%/\%/; return @param_list; } # Inclusion of Perl package SQL::Beautify # Copyright (C) 2009 by Jonas Kramer # Published under the terms of the Artistic License 2.0. { package SQL::Beautify; use strict; use warnings; our $VERSION = 0.04; use Carp; # Keywords from SQL-92, SQL-99 and SQL-2003. use constant KEYWORDS => qw( ABSOLUTE ACTION ADD AFTER ALL ALLOCATE ALTER AND ANY ARE ARRAY AS ASC ASENSITIVE ASSERTION ASYMMETRIC AT ATOMIC AUTHORIZATION AVG BEFORE BEGIN BETWEEN BIGINT BINARY BIT BIT_LENGTH BLOB BOOLEAN BOTH BREADTH BY CALL CALLED CASCADE CASCADED CASE CAST CATALOG CHAR CHARACTER CHARACTER_LENGTH CHAR_LENGTH CHECK CLOB CLOSE COALESCE COLLATE COLLATION COLUMN COMMIT CONDITION CONNECT CONNECTION CONSTRAINT CONSTRAINTS CONSTRUCTOR CONTAINS CONTINUE CONVERT CORRESPONDING COUNT CREATE CROSS CUBE CURRENT CURRENT_DATE CURRENT_DEFAULT_TRANSFORM_GROUP CURRENT_PATH CURRENT_ROLE CURRENT_TIME CURRENT_TIMESTAMP CURRENT_TRANSFORM_GROUP_FOR_TYPE CURRENT_USER CURSOR CYCLE DATA DATE DAY DEALLOCATE DEC DECIMAL DECLARE DEFAULT DEFERRABLE DEFERRED DELETE DEPTH DEREF DESC DESCRIBE DESCRIPTOR DETERMINISTIC DIAGNOSTICS DISCONNECT DISTINCT DO DOMAIN DOUBLE DROP DYNAMIC EACH ELEMENT ELSE ELSEIF END EPOCH EQUALS ESCAPE EXCEPT EXCEPTION EXEC EXECUTE EXISTS EXIT EXTERNAL EXTRACT FALSE FETCH FILTER FIRST FLOAT FOR FOREIGN FOUND FREE FROM FULL FUNCTION GENERAL GET GLOBAL GO GOTO GRANT GROUP GROUPING HANDLER HAVING HOLD HOUR IDENTITY IF IMMEDIATE IN INDICATOR INITIALLY INNER INOUT INPUT INSENSITIVE INSERT INT INTEGER INTERSECT INTERVAL INTO IS ISOLATION ITERATE JOIN KEY LANGUAGE LARGE LAST LATERAL LEADING LEAVE LEFT LEVEL LIKE LIMIT LOCAL LOCALTIME LOCALTIMESTAMP LOCATOR LOOP LOWER MAP MATCH MAX MEMBER MERGE METHOD MIN MINUTE MODIFIES MODULE MONTH MULTISET NAMES NATIONAL NATURAL NCHAR NCLOB NEW NEXT NO NONE NOT NULL NULLIF NUMERIC OBJECT OCTET_LENGTH OF OLD ON ONLY OPEN OPTION OR ORDER ORDINALITY OUT OUTER OUTPUT OVER OVERLAPS PAD PARAMETER PARTIAL PARTITION PATH POSITION PRECISION PREPARE PRESERVE PRIMARY PRIOR PRIVILEGES PROCEDURE PUBLIC RANGE READ READS REAL RECURSIVE REF REFERENCES REFERENCING RELATIVE RELEASE REPEAT RESIGNAL RESTRICT RESULT RETURN RETURNS REVOKE RIGHT ROLE ROLLBACK ROLLUP ROUTINE ROW ROWS SAVEPOINT SCHEMA SCOPE SCROLL SEARCH SECOND SECTION SELECT SENSITIVE SESSION SESSION_USER SET SETS SIGNAL SIMILAR SIZE SMALLINT SOME SPACE SPECIFIC SPECIFICTYPE SQL SQLCODE SQLERROR SQLEXCEPTION SQLSTATE SQLWARNING START STATE STATIC SUBMULTISET SUBSTRING SUM SYMMETRIC SYSTEM SYSTEM_USER TABLE TABLESAMPLE TEMPORARY TEXT THEN TIME TIMESTAMP TIMEZONE_HOUR TIMEZONE_MINUTE TINYINT TO TRAILING TRANSACTION TRANSLATE TRANSLATION TREAT TRIGGER TRIM TRUE UNDER UNDO UNION UNIQUE UNKNOWN UNNEST UNTIL UPDATE UPPER USAGE USER USING VALUE VALUES VARCHAR VARYING VIEW WHEN WHENEVER WHERE WHILE WINDOW WITH WITHIN WITHOUT WORK WRITE YEAR ZONE ); sub tokenize_sql { my ($query, $remove_white_tokens) = @_; my $re = qr{ ( (?:--)[\ \t\S]* # single line comments | (?:\#|\@\-\@|\@\@|\#\#|<\->|\&<|\&>|<<\||\|>>|\&<\||\|\&>|<\^|>\^|\?\#|\?\-|\?\||\?\-\||\?\|\||\@>|<\@|\~=) # Geometric Operators | (?:\->>|\->|\#>|\?\&|\?) # Json Operators | (?:<>|<=>|>=|<=|==|=|!=|!|<<|>>|<|>|\|\||\||&&|&|-|\+|\*(?!/)|/(?!\*)|\%|~|\^|\?) # operators and tests | [\[\]\(\),;.] # punctuation (parenthesis, comma) | \'\'(?!\') # empty single quoted string | \"\"(?!\"") # empty double quoted string | "(?>(?:(?>[^"\\]+)|""|\\.)*)+" # anything inside double quotes, ungreedy | `(?>(?:(?>[^`\\]+)|``|\\.)*)+` # anything inside backticks quotes, ungreedy | '(?>(?:(?>[^'\\]+)|''|\\.)*)+' # anything inside single quotes, ungreedy. | /\*[\ \t\r\n\S]*?\*/ # C style comments | (?:[\w:@]+(?:\.(?:\w+|\*)?)*) # words, standard named placeholders, db.table.*, db.* | (?: \$_\$ | \$\d+ | \${1,2}) # dollar expressions - eg $_$ $3 $$ | \n # newline | [\t\ ]+ # any kind of white spaces ) }smx; my @query = (); @query = $query =~ m{$re}smxg; if ($remove_white_tokens) { @query = grep(!/^[\s\n\r]*$/, @query); } return wantarray ? @query : \@query; } sub new { my ($class, %options) = @_; my $self = bless {%options}, $class; # Set some defaults. $self->{query} = '' unless defined($self->{query}); $self->{spaces} = 4 unless defined($self->{spaces}); $self->{space} = ' ' unless defined($self->{space}); $self->{break} = "\n" unless defined($self->{break}); $self->{wrap} = {} unless defined($self->{wrap}); $self->{keywords} = [] unless defined($self->{keywords}); $self->{rules} = {} unless defined($self->{rules}); $self->{uc_keywords} = 0 unless defined $self->{uc_keywords}; push(@{$self->{keywords}}, KEYWORDS); # Initialize internal stuff. $self->{_level} = 0; return $self; } # Add more SQL. sub add { my ($self, $addendum) = @_; $addendum =~ s/^\s*/ /; $self->{query} .= $addendum; } # Set SQL to beautify. sub query { my ($self, $query) = @_; $self->{query} = $query if (defined($query)); return $self->{query}; } # Beautify SQL. sub beautify { my ($self) = @_; $self->{_output} = ''; $self->{_level_stack} = []; $self->{_new_line} = 1; my $last = ''; $self->{_tokens} = [tokenize_sql($self->query, 1)]; while (defined(my $token = $self->_token)) { my $rule = $self->_get_rule($token); # Allow custom rules to override defaults. if ($rule) { $self->_process_rule($rule, $token); } elsif ($token eq '(') { $self->_add_token($token); $self->_new_line; push @{$self->{_level_stack}}, $self->{_level}; $self->_over unless $last and uc($last) eq 'WHERE'; } elsif ($token eq ')') { # $self->_new_line; $self->{_level} = pop(@{$self->{_level_stack}}) || 0; $self->_add_token($token); $self->_new_line if ($self->_next_token and $self->_next_token !~ /^AS$/i and $self->_next_token ne ')' and $self->_next_token !~ /::/ and $self->_next_token ne ';' and $self->_next_token ne ',' ); } elsif ($token eq ',') { $self->_add_token($token); $self->_new_line; } elsif ($token eq ';') { $self->_add_token($token); $self->_new_line; # End of statement; remove all indentation. @{$self->{_level_stack}} = (); $self->{_level} = 0; } elsif ($token =~ /^(?:SELECT|FROM|WHERE|HAVING|BEGIN|SET)$/i) { $self->_back if ($last and $last ne '(' and $last ne 'FOR'); $self->_new_line; $self->_add_token($token); $self->_new_line if ((($token ne 'SET') || $last) and $self->_next_token and $self->_next_token ne '(' and $self->_next_token ne ';'); $self->_over; } elsif ($token =~ /^(?:GROUP|ORDER|LIMIT)$/i) { $self->_back; $self->_new_line; $self->_add_token($token); } elsif ($token =~ /^(?:BY)$/i) { $self->_add_token($token); $self->_new_line; $self->_over; } elsif ($token =~ /^(?:CASE)$/i) { $self->_add_token($token); $self->_over; } elsif ($token =~ /^(?:WHEN)$/i) { $self->_new_line; $self->_add_token($token); } elsif ($token =~ /^(?:ELSE)$/i) { $self->_new_line; $self->_add_token($token); } elsif ($token =~ /^(?:END)$/i) { $self->_back; $self->_new_line; $self->_add_token($token); } elsif ($token =~ /^(?:UNION|INTERSECT|EXCEPT)$/i) { $self->_back unless $last and $last eq '('; $self->_new_line; $self->_add_token($token); $self->_new_line if ($self->_next_token and $self->_next_token ne '('); $self->_over; } elsif ($token =~ /^(?:LEFT|RIGHT|INNER|OUTER|CROSS)$/i) { $self->_back; $self->_new_line; $self->_add_token($token); $self->_over; } elsif ($token =~ /^(?:JOIN)$/i) { if ($last and $last !~ /^(?:LEFT|RIGHT|INNER|OUTER|CROSS)$/) { $self->_new_line; } $self->_add_token($token); } elsif ($token =~ /^(?:AND|OR)$/i) { $self->_new_line; $self->_add_token($token); # $self->_new_line; } elsif ($token =~ /^--/) { if (!$self->{no_comments}) { $self->_add_token($token); $self->_new_line; } } elsif ($token =~ /^\/\*.*\*\/$/s) { if (!$self->{no_comments}) { $token =~ s/\n[\s\t]+\*/\n\*/gs; $self->_new_line; $self->_add_token($token); $self->_new_line; } } else { $self->_add_token($token, $last); } $last = $token; } $self->_new_line; $self->{_output}; } # Add a token to the beautified string. sub _add_token { my ($self, $token, $last_token) = @_; if ($self->{wrap}) { my $wrap; if ($self->_is_keyword($token)) { $wrap = $self->{wrap}->{keywords}; } elsif ($self->_is_constant($token)) { $wrap = $self->{wrap}->{constants}; } if ($wrap) { $token = $wrap->[0] . $token . $wrap->[1]; } } my $last_is_dot = defined($last_token) && $last_token eq '.'; if (!$self->_is_punctuation($token) and !$last_is_dot) { $self->{_output} .= $self->_indent; } # uppercase keywords $token = uc $token if $self->_is_keyword($token) and $self->{uc_keywords}; $self->{_output} .= $token; # This can't be the beginning of a new line anymore. $self->{_new_line} = 0; } # Increase the indentation level. sub _over { my ($self) = @_; ++$self->{_level}; } # Decrease the indentation level. sub _back { my ($self) = @_; --$self->{_level} if ($self->{_level} > 0); } # Return a string of spaces according to the current indentation level and the # spaces setting for indenting. sub _indent { my ($self) = @_; if ($self->{_new_line}) { return $self->{space} x ($self->{spaces} * $self->{_level}); } else { return $self->{space}; } } # Add a line break, but make sure there are no empty lines. sub _new_line { my ($self) = @_; $self->{_output} .= $self->{break} unless ($self->{_new_line}); $self->{_new_line} = 1; } # Have a look at the token that's coming up next. sub _next_token { my ($self) = @_; return @{$self->{_tokens}} ? $self->{_tokens}->[0] : undef; } # Get the next token, removing it from the list of remaining tokens. sub _token { my ($self) = @_; return shift @{$self->{_tokens}}; } # Check if a token is a known SQL keyword. sub _is_keyword { my ($self, $token) = @_; return ~~ grep {$_ eq uc($token)} @{$self->{keywords}}; } # Add new keywords to highlight. sub add_keywords { my $self = shift; for my $keyword (@_) { push @{$self->{keywords}}, ref($keyword) ? @{$keyword} : $keyword; } } # Add new rules. sub add_rule { my ($self, $format, $token) = @_; my $rules = $self->{rules} ||= {}; my $group = $rules->{$format} ||= []; push @{$group}, ref($token) ? @{$token} : $token; } # Find custom rule for a token. sub _get_rule { my ($self, $token) = @_; values %{$self->{rules}}; # Reset iterator. while (my ($rule, $list) = each %{$self->{rules}}) { return $rule if (grep {uc($token) eq uc($_)} @$list); } return undef; } sub _process_rule { my ($self, $rule, $token) = @_; my $format = { break => sub {$self->_new_line}, over => sub {$self->_over}, back => sub {$self->_back}, token => sub {$self->_add_token($token)}, push => sub {push @{$self->{_level_stack}}, $self->{_level}}, pop => sub {$self->{_level} = pop(@{$self->{_level_stack}}) || 0}, reset => sub {$self->{_level} = 0; @{$self->{_level_stack}} = ();}, }; for (split /-/, lc $rule) { &{$format->{$_}} if ($format->{$_}); } } # Check if a token is a constant. sub _is_constant { my ($self, $token) = @_; return ($token =~ /^\d+$/ or $token =~ /^(['"`]).*\1$/); } # Check if a token is punctuation. sub _is_punctuation { my ($self, $token) = @_; return ($token =~ /^[,;.]$/); } } sub get_log_file { my $logf = shift; my $lfile = undef; # get file size my $totalsize = 0; if (!$remote_host) { $totalsize = (stat("$logf"))[7] || 0 if ($logf ne '-'); } elsif ($logf !~ /\.(gz|bz2|zip|xz)$/i) { &logmsg('DEBUG', "Looking for file size using command: $ssh_command \"ls -l $logf\" | awk '{print \$5}'"); $totalsize = `$ssh_command "ls -l $logf" | awk '{print \$5}'`; chomp($totalsize); if ($totalsize eq '') { die "FATAL: can't get size of remote file, please check what's going wrong with command: $ssh_command \"ls -l $logf\" | awk '{print \$5}'\n"; } &logmsg('DEBUG', "Remote file size: $totalsize"); if (!$totalsize) { return $totalsize; } } my $iscompressed = 1; # Open a file handle if ($logf !~ /\.(gz|bz2|zip|xz)$/i) { if (!$remote_host) { open($lfile, $logf) || die "FATAL: cannot read log file $logf. $!\n"; } else { # Open a pipe to zcat program for compressed log open($lfile,"$ssh_command \"cat $logf\" |") || die "FATAL: cannot read from pipe to $ssh_command \"cat $logf\". $!\n"; } $totalsize = 0 if ($logf eq '-'); $iscompressed = 0; } else { my $uncompress = $zcat; if (($logf =~ /\.bz2/i) && ($zcat =~ /^$zcat_cmd$/)) { $uncompress = $bzcat; } elsif (($logf =~ /\.zip/i) && ($zcat =~ /^$zcat_cmd$/)) { $uncompress = $ucat; } elsif (($logf =~ /\.xz/i) && ($zcat =~ /^$zcat_cmd$/)) { $uncompress = $xzcat; } if (!$remote_host) { &logmsg('DEBUG', "Compressed log file, will use command: $uncompress \"$logf\""); # Open a pipe to zcat program for compressed log open($lfile,"$uncompress \"$logf\" |") || die "FATAL: cannot read from pipe to $uncompress \"$logf\". $!\n"; } else { &logmsg('DEBUG', "Compressed log file, will use command: $ssh_command \"$uncompress $logf\""); # Open a pipe to zcat program for compressed log open($lfile,"$ssh_command \"$uncompress $logf\" |") || die "FATAL: cannot read from pipe to $ssh_command \"$uncompress $logf\". $!\n"; } # Real size of the file is unknown, try to find it # bz2 does not report real size $totalsize = 0; if ($logf =~ /\.(gz|zip|xz)$/i) { my $cmd_file_size = $gzip_uncompress_size; if ($logf =~ /\.zip$/i) { $cmd_file_size = $zip_uncompress_size; } elsif ($logf =~ /\.xz$/i) { $cmd_file_size = $xz_uncompress_size; } $cmd_file_size =~ s/\%f/$logf/g; if (!$remote_host) { &logmsg('DEBUG', "Looking for file size using command: $cmd_file_size"); $totalsize = `$cmd_file_size`; } else { &logmsg('DEBUG', "Looking for remote file size using command: $ssh_command $cmd_file_size"); $totalsize = `$ssh_command $cmd_file_size`; } chomp($totalsize); } $queue_size = 0; } # In list context returns the filehandle and the size of the file if (wantarray()) { return ($lfile, $totalsize, $iscompressed); } # In scalar context return size only close($lfile); return $totalsize; } sub split_logfile { my $logf = shift; # CSV file can't be parsed using multiprocessing return (0, -1) if ( $format eq 'csv' ); # get file size my $totalsize = (stat("$logf"))[7] || 0; # Real size of the file is unknown, try to find it # bz2 does not report real size if ($totalsize <= 16777216) { #16MB #If the file is very small, many jobs actually make the parsing take longer #What is an acceptable file size???? $queue_size = 0; } elsif ($logf =~ /\.(gz|zip|xz)$/i) { $totalsize = 0; my $cmd_file_size = $gzip_uncompress_size; if ($logf =~ /\.zip$/i) { $cmd_file_size = $zip_uncompress_size; } elsif ($logf =~ /\.xz$/i) { $cmd_file_size = $xz_uncompress_size; } $cmd_file_size =~ s/\%f/$logf/g; $totalsize = `$cmd_file_size`; chomp($totalsize); $queue_size = 0; } elsif ($logf =~ /\.bz2$/i) { $totalsize = 0; $queue_size = 0; } return (0, -1) if (!$totalsize); my @chunks = (0); my $i = 1; if ($last_parsed && $saved_last_line{current_pos} && ($saved_last_line{current_pos} < $totalsize)) { $chunks[0] = $saved_last_line{current_pos}; } my ($lfile, $null) = &get_log_file($logf); # Get file handle to the file while ($i < $queue_size) { my $pos = int(($totalsize/$queue_size) * $i); if ($pos > $chunks[0]) { $lfile->seek($pos, 0); #Move the offset to the BEGINNING of each line, because the logic in process_file requires so $pos= $pos + length(<$lfile>) - 1; push(@chunks, $pos) if ($pos < $totalsize); } last if ($pos >= $totalsize); $i++; } $lfile->close(); push(@chunks, $totalsize); return @chunks; } # Return the week number of the year for a given date sub get_week_number { my ($year, $month, $day) = @_; # %U The week number of the current year as a decimal number, range 00 to 53, starting with the first # Sunday as the first day of week 01. # %V The ISO 8601 week number (see NOTES) of the current year as a decimal number, range 01 to 53, # where week 1 is the first week that has at least 4 days in the new year. # %W The week number of the current year as a decimal number, range 00 to 53, starting with the first # Monday as the first day of week 01. # Check if the date is valid first my $datefmt = POSIX::strftime("%Y-%m-%d", 1, 1, 1, $day, $month - 1, $year - 1900); if ($datefmt ne "$year-$month-$day") { return -1; } my $weekNumber = POSIX::strftime("%U", 1, 1, 1, $day, $month - 1, $year - 1900); return sprintf("%02d", $weekNumber+1); } # Returns day number of the week of a given days sub get_day_of_week { my ($year, $month, $day) = @_; # %w The day of the week as a decimal, range 0 to 6, Sunday being 0. my $weekDay = POSIX::strftime("%w", 1,1,1,$day,--$month,$year-1900); return $weekDay; } # Returns all days following the week number sub get_wdays_per_month { my $wn = shift; my ($year, $month) = split(/\-/, shift); my @months = (); my @retdays = (); $month ||= '01'; push(@months, "$year$month"); my $start_month = $month; if ($month eq '01') { unshift(@months, ($year - 1) . "12"); } else { unshift(@months, $year . sprintf("%02d", $month - 1)); } if ($month == 12) { push(@months, ($year+1) . "01"); } else { push(@months, $year . sprintf("%02d", $month + 1)); } foreach my $d (@months) { $d =~ /^(\d{4})(\d{2})$/; my $y = $1; my $m = $2; foreach my $day ("01" .. "31") { # Check if the date is valid first my $datefmt = POSIX::strftime("%Y-%m-%d", 1, 1, 1, $day, $m - 1, $y - 1900); if ($datefmt ne "$y-$m-$day") { next; } my $weekNumber = POSIX::strftime("%U", 1, 1, 1, $day, $m - 1, $y - 1900); if ( ($weekNumber == $wn) || ( ($weekNumber eq '00') && (($wn == 1) || ($wn >= 52)) ) ) { push(@retdays, "$year-$m-$day"); return @retdays if ($#retdays == 6); } next if ($weekNumber > $wn); } } return @retdays; } sub IsLeapYear { return ((($_[0] & 3) == 0) && (($_[0] % 100 != 0) || ($_[0] % 400 == 0))); } #### # Display calendar #### sub get_calendar { my ($year, $month) = @_; my $str = "\n"; my @wday = qw(Su Mo Tu We Th Fr Sa); #my @wday = ('Mon','Tue','Wed','Thu','Fri','Sat','Sun'); my @std_day = qw(Su Mo Tu We Th Fr Sa); my %day_lbl = (); for (my $i = 0; $i <= $#wday; $i++) { $day_lbl{$wday[$i]} = $wday[$i]; } $str .= ""; map { $str .= ''; } @wday; $str .= "\n\n"; my @currow = ('','','','','','',''); my $d = ''; my $wd = 0; my $wn = 0; my $week = ''; for $d ("01" .. "31") { last if (($d == 31) && grep(/^$month$/, '04','06','09','11')); last if (($d == 30) && ($month eq '02')); last if (($d == 29) && ($month eq '02') && !&IsLeapYear($year)); $wd = &get_day_of_week($year,$month,$d); $wn = &get_week_number($year,$month,$d); next if ($wn == -1); if ( !-e "$outdir/$year/$month/$d/index.html" ) { $currow[$wd] = ""; } else { $currow[$wd] = ""; } if ($wd == 6) { $week = sprintf("%02d", $wn); if (-e "$outdir/$year/week-$week/index.html") { $week = ""; } else { $week = ""; } map { $_ = "" if ($_ eq ''); } @currow; $str .= "$week" . join('', @currow) . "\n"; @currow = ('','','','','','',''); } } if ( ($wd != 6) || ($currow[0] ne '') ) { $week = sprintf("%02d", $wn); if (-e "$outdir/$year/week-$week/index.html") { $week = ""; } else { $week = ""; } map { $_ = "" if ($_ eq ''); } @currow; $str .= "$week" . join('', @currow) . "\n"; @currow = ('','','','','','',''); } $str .= "\n
     ' . $day_lbl{$_} . '
    $d$d$week $week 
    $week $week 
    \n"; my %month_name = ( '01' => 'January', '02' => 'February', '03' => 'March', '04' => 'April', '05' => 'May', '06' => 'June', '07' => 'July', '08' => 'August', '09' => 'September', '10' => 'October', '11' => 'November', '12' => 'December' ); return qq{
     

    $month_name{$month}

    $str
    }; } sub _gethostbyaddr { my $ip = shift; my $host = undef; unless(exists $CACHE_DNS{$ip}) { eval { local $SIG{ALRM} = sub { die "DNS lookup timeout.\n"; }; alarm($DNSLookupTimeout); $host = gethostbyaddr(inet_aton($ip), AF_INET); alarm(0); }; if ($@) { $CACHE_DNS{$ip} = undef; #printf "_gethostbyaddr timeout : %s\n", $ip; } else { $CACHE_DNS{$ip} = $host; #printf "_gethostbyaddr success : %s (%s)\n", $ip, $host; } } return $CACHE_DNS{$ip} || $ip; } __DATA__ WRFILE: pgbadger.css div#littleToc { display:none; } html>body div#littleToc { display:block; background-color:white; color:black; position:fixed; bottom:10px; right:10px; width:50px; font-size:11px; text-align:left; border:0px; } div#littleToc div#littleTocTitle { font-weight:bold; text-align:center;padding:2px; } div#littleToc ul { padding:0px; text-indent:0px; margin:0px; } div#littleToc li { font-size:11px; list-style-type:none; padding:0px; text-indent:0px; margin:0px; } div#littleToc a { color:#000000; padding:2px; margin:2px; display:block; text-decoration:none; border:1px solid #CCCCCC; } div#littleToc a:hover { text-decoration:none; background-color:#DDDDDD; } .flotr-graph { color: #ac1316; z-index: 99;} .sql {font-family:monospace;} .sql .imp {font-weight: bold; color: red;} .sql .kw1 {color: #993333; font-weight: bold; text-transform: uppercase;} .sql .kw2 {color: #993333; font-style: italic;} .sql .kw3 {color: #993333; text-transform: uppercase;} .sql .co1 {color: #808080; font-style: italic;} .sql .co2 {color: #808080; font-style: italic;} .sql .coMULTI {color: #808080; font-style: italic;} .sql .es0 {color: #000099; font-weight: bold;} .sql .br0 {color: #66cc66;} .sql .sy0 {color: #000000;} .sql .st0 {color: #ff0000;} .sql .nu0 {color: #cc66cc;} .sql span.xtra { display:block; } .sql-smallsize {width: 450px; } .sql-middlesize {width: 650px; } .sql-largesize {width: 100%; } WRFILE: pgbadger.js /* NO DATASET
    '; } var textToShow = '
    On '+dateToDisplay.toGMTString(); for (var i = 0; i < labels.length; i++) { if (datasets[i] != undefined) { textToShow += '
    '+pretty_print_number(datasets[i][pos][1], gtype)+' '+labels[i]+''; } } textToShow += '
    '; return textToShow; } function histoHourTracker(obj, labels, datasets) { var dateToDisplay = new Date(parseInt(obj.x)); var posValue = parseInt(obj.x); // look for the position in data arrays var pos = 0; if (datasets != undefined) { for (pos=0; pos < datasets[0].length; pos++) { // If timestamp are the same we have found the position if (datasets[0][pos][0] == posValue) { // get out of here break; } } } else { return 'NO DATASET'; } var textToShow = '
    At '+dateToDisplay.toGMTString().substr(17, 5); for (var i = 0; i < labels.length; i++) { if (datasets[i] != undefined) { textToShow += '
    '+pretty_print_number(datasets[i][pos][1])+' '+labels[i]+''; } } textToShow += '
    '; return textToShow; } function histoDurationTracker(obj, labels, datasets) { var posValue = parseInt(obj.x); // look for the position in data arrays var pos = 0; if (datasets != undefined) { for (pos=0; pos < datasets[0].length; pos++) { // If timestamp are the same we have found the position if (datasets[0][pos][0] == posValue) { // get out of here break; } } } else { return 'NO DATASET'; } var textToShow = '
    '; for (var i = 0; i < labels.length; i++) { if (datasets[i] != undefined) { textToShow += ''+pretty_print_number(datasets[i][pos][1])+' '+labels[pos+1]+''; } } textToShow += '
    '; return textToShow; } function pretty_print_number(val, type) { if (type == 'size') { if (val >= 1125899906842624) { val = (val / 1125899906842624); val = val.toFixed(2) + " PiB"; } else if (val >= 1099511627776) { val = (val / 1099511627776); val = val.toFixed(2) + " TiB"; } else if (val >= 1073741824) { val = (val / 1073741824); val = val.toFixed(2) + " GiB"; } else if (val >= 1048576) { val = (val / 1048576); val = val.toFixed(2) + " MiB"; } else if (val >= 1024) { val = (val / 1024); val = val.toFixed(2) + " KiB"; } else { val = val + " B"; } } else if (type == 'duration') { if (val >= 1000) { val = (val / 1000); val = val.toFixed(3) + " sec"; } else { val = val + " ms"; } } else { if (val >= 1000000000000000) { val = (val / 1000000000000000); val = val.toFixed(2) + " P"; } else if (val >= 1000000000000) { val = (val / 1000000000000); val = val.toFixed(2) + " T"; } else if (val >= 1000000000) { val = (val / 1000000000); val = val.toFixed(2) + " G"; } else if (val >= 1000000) { val = (val / 1000000); val = val.toFixed(2) + " M"; } else if (val >= 1000) { val = (val / 1000); val = val.toFixed(2) + " K"; } } return val; } function format_number(val) { var decimal = 2; var msep = ','; var deci = Math.round( Math.pow(10,decimal)*(Math.abs(val)-Math.floor(Math.abs(val)))) ; val = Math.floor(Math.abs(val)); if ((decimal==0)||(deci==Math.pow(10,decimal))) {deci=0;} var val_format=val+""; var nb=val_format.length; for (var i=1;i<4;i++) { if (val>=Math.pow(10,(3*i))) { val_format=val_format.substring(0,nb-(3*i))+msep+val_format.substring(nb-(3*i)); } } if (decimal>0) { var decim=""; for (var j=0;j<(decimal-deci.toString().length);j++) {decim+="0";} deci=decim+deci.toString(); if (deci > 0) { val_format=val_format+"."+deci; } } if (parseFloat(val)<0) {val_format="-"+val_format;} return val_format; } function pieTracker(obj, utype) { var textToShow = ''; if (utype == 'duration') { textToShow += pretty_print_number(obj.y, utype); } else { textToShow += format_number(obj.y); } textToShow += ' '+obj.series.label+''; return textToShow; } WRFILE: bean.js /*! * bean.js - copyright Jacob Thornton 2011 * https://github.com/fat/bean * MIT License * special thanks to: * dean edwards: http://dean.edwards.name/ * dperini: https://github.com/dperini/nwevents * the entire mootools team: github.com/mootools/mootools-core *//*global module:true, define:true*/ !function(e,t,n){typeof module!="undefined"?module.exports=n(e,t):typeof define=="function"&&typeof define.amd=="object"?define(n):t[e]=n(e,t)}("bean",this,function(e,t){var n=window,r=t[e],i=/over|out/,s=/[^\.]*(?=\..*)\.|.*/,o=/\..*/,u="addEventListener",a="attachEvent",f="removeEventListener",l="detachEvent",c=document||{},h=c.documentElement||{},p=h[u],d=p?u:a,v=Array.prototype.slice,m=/click|mouse|menu|drag|drop/i,g=/^touch|^gesture/i,y={one:1},b=function(e,t,n){for(n=0;n0){t=t.split(" ");for(f=t.length;f--;)_(e,t[f],n);return e}u=c&&t.replace(o,""),u&&w[u]&&(u=w[u].type);if(!t||c){if(a=c&&t.replace(s,""))a=a.split(".");l(e,u,n,a)}else if(typeof t=="function")l(e,null,t);else for(r in t)t.hasOwnProperty(r)&&_(e,r,t[r]);return e},D=function(e,t,n,r,i){var s,o,u,a,f=n,l=n&&typeof n=="string";if(t&&!n&&typeof t=="object")for(s in t)t.hasOwnProperty(s)&&D.apply(this,[e,s,t[s]]);else{a=arguments.length>3?v.call(arguments,3):[],o=(l?n:t).split(" "),l&&(n=M(t,f=r,i))&&(a=v.call(a,1)),this===y&&(n=L(_,e,t,n,f));for(u=o.length;u--;)O(e,o[u],n,f,a)}return e},P=function(){return D.apply(y,arguments)},H=p?function(e,t,r){var i=c.createEvent(e?"HTMLEvents":"UIEvents");i[e?"initEvent":"initUIEvent"](t,!0,!0,n,1),r.dispatchEvent(i)}:function(e,t,n){n=S(n,e),e?n.fireEvent("on"+t,c.createEventObject()):n["_on"+t]++},B=function(e,t,n){var r,i,u,a,f,l=t.split(" ");for(r=l.length;r--;){t=l[r].replace(o,"");if(a=l[r].replace(s,""))a=a.split(".");if(!a&&!n&&e[d])H(b[t],t,e);else{f=T.get(e,t),n=[!1].concat(n);for(i=0,u=f.length;i=r.computed&&(r={value:e,computed:o})}),r.value},S.min=function(e,t,n){if(!t&&S.isArray(e))return Math.min.apply(Math,e);var r={computed:Infinity};return x(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;or?1:0}),"value")},S.groupBy=function(e,t){var n={};return x(e,function(e,r){var i=t(e,r);(n[i]||(n[i]=[])).push(e)}),n},S.sortedIndex=function(e,t,n){n||(n=S.identity);var r=0,i=e.length;while(r>1;n(e[s])=0})})},S.difference=function(e,t){return S.filter(e,function(e){return!S.include(t,e)})},S.zip=function(){var e=o.call(arguments),t=S.max(S.pluck(e,"length")),n=new Array(t);for(var r=0;r=0;n--)t=[e[n].apply(this,t)];return t[0]}},S.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},S.keys=w||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var t=[];for(var n in e)f.call(e,n)&&(t[t.length]=n);return t},S.values=function(e){return S.map(e,S.identity)},S.functions=S.methods=function(e){var t=[];for(var n in e)S.isFunction(e[n])&&t.push(n);return t.sort()},S.extend=function(e){return x(o.call(arguments,1),function(t){for(var n in t)t[n]!==void 0&&(e[n]=t[n])}),e},S.defaults=function(e){return x(o.call(arguments,1),function(t){for(var n in t)e[n]==null&&(e[n]=t[n])}),e},S.clone=function(e){return S.isArray(e)?e.slice():S.extend({},e)},S.tap=function(e,t){return t(e),e},S.isEqual=function(e,t){if(e===t)return!0;var n=typeof e,r=typeof t;if(n!=r)return!1;if(e==t)return!0;if(!e&&t||e&&!t)return!1;e._chain&&(e=e._wrapped),t._chain&&(t=t._wrapped);if(e.isEqual)return e.isEqual(t);if(t.isEqual)return t.isEqual(e);if(S.isDate(e)&&S.isDate(t))return e.getTime()===t.getTime();if(S.isNaN(e)&&S.isNaN(t))return!1;if(S.isRegExp(e)&&S.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline;if(n!=="object")return!1;if(e.length&&e.length!==t.length)return!1;var i=S.keys(e),s=S.keys(t);if(i.length!=s.length)return!1;for(var o in e)if(!(o in t)||!S.isEqual(e[o],t[o]))return!1;return!0},S.isEmpty=function(e){if(S.isArray(e)||S.isString(e))return e.length===0;for(var t in e)if(f.call(e,t))return!1;return!0},S.isElement=function(e){return!!e&&e.nodeType==1},S.isArray=b||function(e){return a.call(e)==="[object Array]"},S.isObject=function(e){return e===Object(e)},S.isArguments=function(e){return!!e&&!!f.call(e,"callee")},S.isFunction=function(e){return!!(e&&e.constructor&&e.call&&e.apply)},S.isString=function(e){return!!(e===""||e&&e.charCodeAt&&e.substr)},S.isNumber=function(e){return!!(e===0||e&&e.toExponential&&e.toFixed)},S.isNaN=function(e){return e!==e},S.isBoolean=function(e){return e===!0||e===!1},S.isDate=function(e){return!!(e&&e.getTimezoneOffset&&e.setUTCFullYear)},S.isRegExp=function(e){return!(!(e&&e.test&&e.exec)||!e.ignoreCase&&e.ignoreCase!==!1)},S.isNull=function(e){return e===null},S.isUndefined=function(e){return e===void 0},S.noConflict=function(){return e._=t,this},S.identity=function(e){return e},S.times=function(e,t,n){for(var r=0;r/g,interpolate:/<%=([\s\S]+?)%>/g},S.template=function(e,t){var n=S.templateSettings,r="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(n.interpolate,function(e,t){return"',"+t.replace(/\\'/g,"'")+",'"}).replace(n.evaluate||null,function(e,t){return"');"+t.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+"__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",i=new Function("obj",r);return t?i(t):i};var k=function(e){this._wrapped=e};S.prototype=k.prototype;var L=function(e,t){return t?S(e).chain():e},A=function(e,t){k.prototype[e]=function(){var e=o.call(arguments);return u.call(e,this._wrapped),L(t.apply(S,e),this._chain)}};S.mixin(S),x(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=r[e];k.prototype[e]=function(){return t.apply(this._wrapped,arguments),L(this._wrapped,this._chain)}}),x(["concat","join","slice"],function(e){var t=r[e];k.prototype[e]=function(){return L(t.apply(this._wrapped,arguments),this._chain)}}),k.prototype.chain=function(){return this._chain=!0,this},k.prototype.value=function(){return this._wrapped}})(); WRFILE: flotr2.js /** * Flotr2 (c) 2012 Carl Sutherland * MIT License * Special thanks to: * Flotr: http://code.google.com/p/flotr/ (fork) * Flot: https://github.com/flot/flot (original fork) */ (function(){var e=this,t=this.Flotr,n;n={_:_,bean:bean,isIphone:/iphone/i.test(navigator.userAgent),isIE:navigator.appVersion.indexOf("MSIE")!=-1?parseFloat(navigator.appVersion.split("MSIE")[1]):!1,graphTypes:{},plugins:{},addType:function(e,t){n.graphTypes[e]=t,n.defaultOptions[e]=t.options||{},n.defaultOptions.defaultType=n.defaultOptions.defaultType||e},addPlugin:function(e,t){n.plugins[e]=t,n.defaultOptions[e]=t.options||{}},draw:function(e,t,r,i){return i=i||n.Graph,new i(e,t,r)},merge:function(e,t){var r,i,s=t||{};for(r in e)i=e[r],i&&typeof i=="object"?i.constructor===Array?s[r]=this._.clone(i):i.constructor!==RegExp&&!this._.isElement(i)&&!i.jquery?s[r]=n.merge(i,t?t[r]:undefined):s[r]=i:s[r]=i;return s},clone:function(e){return n.merge(e,{})},getTickSize:function(e,t,r,i){var s=(r-t)/e,o=n.getMagnitude(s),u=10,a=s/o;return a<1.5?u=1:a<2.25?u=2:a<3?u=i===0?2:2.5:a<7.5&&(u=5),u*o},defaultTickFormatter:function(e,t){return e+""},defaultTrackFormatter:function(e){return"("+e.x+", "+e.y+")"},engineeringNotation:function(e,t,n){var r=["Y","Z","E","P","T","G","M","k",""],i=["y","z","a","f","p","n","µ","m",""],s=r.length;n=n||1e3,t=Math.pow(10,t||2);if(e===0)return 0;if(e>1)while(s--&&e>=n)e/=n;else{r=i,s=r.length;while(s--&&e<1)e*=n}return Math.round(e*t)/t+r[s]},getMagnitude:function(e){return Math.pow(10,Math.floor(Math.log(e)/Math.LN10))},toPixel:function(e){return Math.floor(e)+.5},toRad:function(e){return-e*(Math.PI/180)},floorInBase:function(e,t){return t*Math.floor(e/t)},drawText:function(e,t,r,i,s){if(!e.fillText){e.drawText(t,r,i,s);return}s=this._.extend({size:n.defaultOptions.fontSize,color:"#000000",textAlign:"left",textBaseline:"bottom",weight:1,angle:0},s),e.save(),e.translate(r,i),e.rotate(s.angle),e.fillStyle=s.color,e.font=(s.weight>1?"bold ":"")+s.size*1.3+"px sans-serif",e.textAlign=s.textAlign,e.textBaseline=s.textBaseline,e.fillText(t,0,0),e.restore()},getBestTextAlign:function(e,t){return t=t||{textAlign:"center",textBaseline:"middle"},e+=n.getTextAngleFromAlign(t),Math.abs(Math.cos(e))>.01&&(t.textAlign=Math.cos(e)>0?"right":"left"),Math.abs(Math.sin(e))>.01&&(t.textBaseline=Math.sin(e)>0?"top":"bottom"),t},alignTable:{"right middle":0,"right top":Math.PI/4,"center top":Math.PI/2,"left top":3*(Math.PI/4),"left middle":Math.PI,"left bottom":-3*(Math.PI/4),"center bottom":-Math.PI/2,"right bottom":-Math.PI/4,"center middle":0},getTextAngleFromAlign:function(e){return n.alignTable[e.textAlign+" "+e.textBaseline]||0},noConflict:function(){return e.Flotr=t,this}},e.Flotr=n})(),Flotr.defaultOptions={colors:["#00A8F0","#C0D800","#CB4B4B","#4DA74D","#9440ED"],ieBackgroundColor:"#FFFFFF",title:null,subtitle:null,shadowSize:4,defaultType:null,HtmlText:!0,fontColor:"#545454",fontSize:7.5,resolution:1,parseFloat:!0,preventDefault:!0,xaxis:{ticks:null,minorTicks:null,showLabels:!0,showMinorLabels:!1,labelsAngle:0,title:null,titleAngle:0,noTicks:5,minorTickFreq:null,tickFormatter:Flotr.defaultTickFormatter,tickDecimals:null,min:null,max:null,autoscale:!1,autoscaleMargin:0,color:null,mode:"normal",timeFormat:null,timeMode:"UTC",timeUnit:"millisecond",scaling:"linear",base:Math.E,titleAlign:"center",margin:!0},x2axis:{},yaxis:{ticks:null,minorTicks:null,showLabels:!0,showMinorLabels:!1,labelsAngle:0,title:null,titleAngle:90,noTicks:5,minorTickFreq:null,tickFormatter:Flotr.defaultTickFormatter,tickDecimals:null,min:null,max:null,autoscale:!1,autoscaleMargin:0,color:null,scaling:"linear",base:Math.E,titleAlign:"center",margin:!0},y2axis:{titleAngle:270},grid:{color:"#545454",backgroundColor:null,backgroundImage:null,watermarkAlpha:.4,tickColor:"#DDDDDD",labelMargin:3,verticalLines:!0,minorVerticalLines:null,horizontalLines:!0,minorHorizontalLines:null,outlineWidth:1,outline:"nsew",circular:!1},mouse:{track:!1,trackAll:!1,position:"se",relative:!1,trackFormatter:Flotr.defaultTrackFormatter,margin:5,lineColor:"#FF3F19",trackDecimals:1,sensibility:2,trackY:!0,radius:3,fillColor:null,fillOpacity:.4}},function(){function t(e,t,n,r){this.rgba=["r","g","b","a"];var i=4;while(-1<--i)this[this.rgba[i]]=arguments[i]||(i==3?1:0);this.normalize()}var e=Flotr._,n={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]};t.prototype={scale:function(t,n,r,i){var s=4;while(-1<--s)e.isUndefined(arguments[s])||(this[this.rgba[s]]*=arguments[s]);return this.normalize()},alpha:function(t){return!e.isUndefined(t)&&!e.isNull(t)&&(this.a=t),this.normalize()},clone:function(){return new t(this.r,this.b,this.g,this.a)},limit:function(e,t,n){return Math.max(Math.min(e,n),t)},normalize:function(){var e=this.limit;return this.r=e(parseInt(this.r,10),0,255),this.g=e(parseInt(this.g,10),0,255),this.b=e(parseInt(this.b,10),0,255),this.a=e(this.a,0,1),this},distance:function(e){if(!e)return;e=new t.parse(e);var n=0,r=3;while(-1<--r)n+=Math.abs(this[this.rgba[r]]-e[this.rgba[r]]);return n},toString:function(){return this.a>=1?"rgb("+[this.r,this.g,this.b].join(",")+")":"rgba("+[this.r,this.g,this.b,this.a].join(",")+")"},contrast:function(){var e=1-(.299*this.r+.587*this.g+.114*this.b)/255;return e<.5?"#000000":"#ffffff"}},e.extend(t,{parse:function(e){if(e instanceof t)return e;var r;if(r=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(e))return new t(parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16));if(r=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(e))return new t(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10));if(r=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(e))return new t(parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16));if(r=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(e))return new t(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10),parseFloat(r[4]));if(r=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(e))return new t(parseFloat(r[1])*2.55,parseFloat(r[2])*2.55,parseFloat(r[3])*2.55);if(r=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(e))return new t(parseFloat(r[1])*2.55,parseFloat(r[2])*2.55,parseFloat(r[3])*2.55,parseFloat(r[4]));var i=(e+"").replace(/^\s*([\S\s]*?)\s*$/,"$1").toLowerCase();return i=="transparent"?new t(255,255,255,0):(r=n[i])?new t(r[0],r[1],r[2]):new t(0,0,0,0)},processColor:function(n,r){var i=r.opacity;if(!n)return"rgba(0, 0, 0, 0)";if(n instanceof t)return n.alpha(i).toString();if(e.isString(n))return t.parse(n).alpha(i).toString();var s=n.colors?n:{colors:n};if(!r.ctx)return e.isArray(s.colors)?t.parse(e.isArray(s.colors[0])?s.colors[0][1]:s.colors[0]).alpha(i).toString():"rgba(0, 0, 0, 0)";s=e.extend({start:"top",end:"bottom"},s),/top/i.test(s.start)&&(r.x1=0),/left/i.test(s.start)&&(r.y1=0),/bottom/i.test(s.end)&&(r.x2=0),/right/i.test(s.end)&&(r.y2=0);var o,u,a,f=r.ctx.createLinearGradient(r.x1,r.y1,r.x2,r.y2);for(o=0;o=h)break}h=i[v][0],p=i[v][1],p=="year"&&(h=Flotr.getTickSize(s.noTicks*r.year,a,f,0),h==.5&&(p="month",h=6)),e.tickUnit=p,e.tickSize=h;var g=h*r[p];m=new Date(a);switch(p){case"millisecond":y("Milliseconds");break;case"second":y("Seconds");break;case"minute":y("Minutes");break;case"hour":y("Hours");break;case"month":y("Month");break;case"year":y("FullYear")}g>=r.second&&t(m,"Milliseconds",o,0),g>=r.minute&&t(m,"Seconds",o,0),g>=r.hour&&t(m,"Minutes",o,0),g>=r.day&&t(m,"Hours",o,0),g>=r.day*4&&t(m,"Date",o,1),g>=r.year&&t(m,"Month",o,0);var b=0,w=NaN,E;do{E=w,w=m.getTime(),c.push({v:w/u,label:d(w/u,e)});if(p=="month")if(h<1){t(m,"Date",o,1);var S=m.getTime();t(m,"Month",o,n(m,"Month",o)+1);var x=m.getTime();m.setTime(w+b*r.hour+(x-S)*h),b=n(m,"Hours",o),t(m,"Hours",o,0)}else t(m,"Month",o,n(m,"Month",o)+h);else p=="year"?t(m,"FullYear",o,n(m,"FullYear",o)+h):m.setTime(w+g)}while(w0)return{x:t.touches[0].pageX,y:t.touches[0].pageY};if(!e._.isUndefined(t.changedTouches)&&t.changedTouches.length>0)return{x:t.changedTouches[0].pageX,y:t.changedTouches[0].pageY};if(t.pageX||t.pageY)return{x:t.pageX,y:t.pageY};if(t.clientX||t.clientY){var n=document,r=n.body,i=n.documentElement;return{x:t.clientX+r.scrollLeft+i.scrollLeft,y:t.clientY+r.scrollTop+i.scrollTop}}}}}(),function(){var e=Flotr,t=e.DOM,n=e._,r=function(e){this.o=e};r.prototype={dimensions:function(e,t,n,r){return e?this.o.html?this.html(e,this.o.element,n,r):this.canvas(e,t):{width:0,height:0}},canvas:function(t,n){if(!this.o.textEnabled)return;n=n||{};var r=this.measureText(t,n),i=r.width,s=n.size||e.defaultOptions.fontSize,o=n.angle||0,u=Math.cos(o),a=Math.sin(o),f=2,l=6,c;return c={width:Math.abs(u*i)+Math.abs(a*s)+f,height:Math.abs(a*i)+Math.abs(u*s)+l},c},html:function(e,n,r,i){var s=t.create("div");return t.setStyles(s,{position:"absolute",top:"-10000px"}),t.insert(s,'
    '+e+"
    "),t.insert(this.o.element,s),t.size(s)},measureText:function(t,r){var i=this.o.ctx,s;return!i.fillText||e.isIphone&&i.measure?{width:i.measure(t,r)}:(r=n.extend({size:e.defaultOptions.fontSize,weight:1,angle:0},r),i.save(),i.font=(r.weight>1?"bold ":"")+r.size*1.3+"px sans-serif",s=i.measureText(t),i.restore(),s)}},Flotr.Text=r}(),function(){function i(e,n,r){return t.observe.apply(this,arguments),this._handles.push(arguments),this}var e=Flotr.DOM,t=Flotr.EventAdapter,n=Flotr._,r=Flotr;Graph=function(e,i,s){this._setEl(e),this._initMembers(),this._initPlugins(),t.fire(this.el,"flotr:beforeinit",[this]),this.data=i,this.series=r.Series.getSeries(i),this._initOptions(s),this._initGraphTypes(),this._initCanvas(),this._text=new r.Text({element:this.el,ctx:this.ctx,html:this.options.HtmlText,textEnabled:this.textEnabled}),t.fire(this.el,"flotr:afterconstruct",[this]),this._initEvents(),this.findDataRanges(),this.calculateSpacing(),this.draw(n.bind(function(){t.fire(this.el,"flotr:afterinit",[this])},this))},Graph.prototype={destroy:function(){t.fire(this.el,"flotr:destroy"),n.each(this._handles,function(e){t.stopObserving.apply(this,e)}),this._handles=[],this.el.graph=null},observe:i,_observe:i,processColor:function(e,t){var i={x1:0,y1:0,x2:this.plotWidth,y2:this.plotHeight,opacity:1,ctx:this.ctx};return n.extend(i,t),r.Color.processColor(e,i)},findDataRanges:function(){var e=this.axes,t,i,s;n.each(this.series,function(e){s=e.getRange(),s&&(t=e.xaxis,i=e.yaxis,t.datamin=Math.min(s.xmin,t.datamin),t.datamax=Math.max(s.xmax,t.datamax),i.datamin=Math.min(s.ymin,i.datamin),i.datamax=Math.max(s.ymax,i.datamax),t.used=t.used||s.xused,i.used=i.used||s.yused)},this),!e.x.used&&!e.x2.used&&(e.x.used=!0),!e.y.used&&!e.y2.used&&(e.y.used=!0),n.each(e,function(e){e.calculateRange()});var o=n.keys(r.graphTypes),u=!1;n.each(this.series,function(e){if(e.hide)return;n.each(o,function(t){e[t]&&e[t].show&&(this.extendRange(t,e),u=!0)},this),u||this.extendRange(this.options.defaultType,e)},this)},extendRange:function(e,t){this[e].extendRange&&this[e].extendRange(t,t.data,t[e],this[e]),this[e].extendYRange&&this[e].extendYRange(t.yaxis,t.data,t[e],this[e]),this[e].extendXRange&&this[e].extendXRange(t.xaxis,t.data,t[e],this[e])},calculateSpacing:function(){var e=this.axes,t=this.options,r=this.series,i=t.grid.labelMargin,s=this._text,o=e.x,u=e.x2,a=e.y,f=e.y2,l=t.grid.outlineWidth,c,h,p,d;n.each(e,function(e){e.calculateTicks(),e.calculateTextDimensions(s,t)}),d=s.dimensions(t.title,{size:t.fontSize*1.5},"font-size:1em;font-weight:bold;","flotr-title"),this.titleHeight=d.height,d=s.dimensions(t.subtitle,{size:t.fontSize},"font-size:smaller;","flotr-subtitle"),this.subtitleHeight=d.height;for(h=0;h1&&(this.multitouches=n.touches),t.fire(e,"flotr:mousedown",[event,this]),this.observe(document,"touchend",r)},this)),this.observe(this.overlay,"touchmove",n.bind(function(n){var r=this.getEventPosition(n);this.options.preventDefault&&n.preventDefault(),i=!0,this.multitouches||n.touches&&n.touches.length>1?this.multitouches=n.touches:s||t.fire(e,"flotr:mousemove",[event,r,this]),this.lastMousePos=r},this))):this.observe(this.overlay,"mousedown",n.bind(this.mouseDownHandler,this)).observe(e,"mousemove",n.bind(this.mouseMoveHandler,this)).observe(this.overlay,"click",n.bind(this.clickHandler,this)).observe(e,"mouseout",function(n){t.fire(e,"flotr:mouseout",n)})},_initCanvas:function(){function l(i,s){return i||(i=e.create("canvas"),typeof FlashCanvas!="undefined"&&typeof i.getContext=="function"&&(FlashCanvas.initElement(i),this.isFlashCanvas=!0),i.className="flotr-"+s,i.style.cssText="position:absolute;left:0px;top:0px;",e.insert(t,i)),n.each(a,function(t,n){e.show(i);if(s=="canvas"&&i.getAttribute(n)===t)return;i.setAttribute(n,t*r.resolution),i.style[n]=t+"px"}),i.context_=null,i}function c(e){window.G_vmlCanvasManager&&window.G_vmlCanvasManager.initElement(e);var t=e.getContext("2d");return window.G_vmlCanvasManager||t.scale(r.resolution,r.resolution),t}var t=this.el,r=this.options,i=t.children,s=[],o,u,a,f;for(u=i.length;u--;)o=i[u],!this.canvas&&o.className==="flotr-canvas"?this.canvas=o:!this.overlay&&o.className==="flotr-overlay"?this.overlay=o:s.push(o);for(u=s.length;u--;)t.removeChild(s[u]);e.setStyles(t,{position:"relative"}),a={},a.width=t.clientWidth,a.height=t.clientHeight;if(a.width<=0||a.height<=0||r.resolution<=0)throw"Invalid dimensions for plot, width = "+a.width+", height = "+a.height+", resolution = "+r.resolution;this.canvas=l(this.canvas,"canvas"),this.overlay=l(this.overlay,"overlay"),this.ctx=c(this.canvas),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.octx=c(this.overlay),this.octx.clearRect(0,0,this.overlay.width,this.overlay.height),this.canvasHeight=a.height,this.canvasWidth=a.width,this.textEnabled=!!this.ctx.drawText||!!this.ctx.fillText},_initPlugins:function(){n.each(r.plugins,function(e,t){n.each(e.callbacks,function(e,t){this.observe(this.el,t,n.bind(e,this))},this),this[t]=r.clone(e),n.each(this[t],function(e,r){n.isFunction(e)&&(this[t][r]=n.bind(e,this))},this)},this)},_initOptions:function(e){var i=r.clone(r.defaultOptions);i.x2axis=n.extend(n.clone(i.xaxis),i.x2axis),i.y2axis=n.extend(n.clone(i.yaxis),i.y2axis),this.options=r.merge(e||{},i),this.options.grid.minorVerticalLines===null&&this.options.xaxis.scaling==="logarithmic"&&(this.options.grid.minorVerticalLines=!0),this.options.grid.minorHorizontalLines===null&&this.options.yaxis.scaling==="logarithmic"&&(this.options.grid.minorHorizontalLines=!0),t.fire(this.el,"flotr:afterinitoptions",[this]),this.axes=r.Axis.getAxes(this.options);var s=[],o=[],u=this.series.length,a=this.series.length,f=this.options.colors,l=[],c=0,h,p,d,v;for(p=a-1;p>-1;--p)h=this.series[p].color,h&&(--a,n.isNumber(h)?s.push(h):l.push(r.Color.parse(h)));for(p=s.length-1;p>-1;--p)a=Math.max(a,s[p]+1);for(p=0;o.length=f.length&&(p=0,++c)}for(p=0,d=0;p10?t.minorTickFreq=0:o-u>5?t.minorTickFreq=2:t.minorTickFreq=5)}else e.tickSize=Flotr.getTickSize(t.noTicks,n,r,t.tickDecimals);e.min=n,e.max=r,t.min===null&&t.autoscale&&(e.min-=e.tickSize*i,e.min<0&&e.datamin>=0&&(e.min=0),e.min=e.tickSize*Math.floor(e.min/e.tickSize)),t.max===null&&t.autoscale&&(e.max+=e.tickSize*i,e.max>0&&e.datamax<=0&&e.datamax!=e.datamin&&(e.max=0),e.max=e.tickSize*Math.ceil(e.max/e.tickSize)),e.min==e.max&&(e.max=e.min+1)},calculateTextDimensions:function(e,t){var n="",r,i;if(this.options.showLabels)for(i=0;in.length&&(n=this.ticks[i].label);this.maxLabel=e.dimensions(n,{size:t.fontSize,angle:Flotr.toRad(this.options.labelsAngle)},"font-size:smaller;","flotr-grid-label"),this.titleSize=e.dimensions(this.options.title,{size:t.fontSize*1.2,angle:Flotr.toRad(this.options.titleAngle)},"font-weight:bold;","flotr-axis-title")},_cleanUserTicks:function(t,n){var r=this,i=this.options,s,o,u,a;e.isFunction(t)&&(t=t({min:r.min,max:r.max}));for(o=0;o1?a[1]:i.tickFormatter(s,{min:r.min,max:r.max})):(s=a,u=i.tickFormatter(s,{min:this.min,max:this.max})),n[o]={v:s,label:u}},_calculateTimeTicks:function(){this.ticks=Flotr.Date.generator(this)},_calculateLogTicks:function(){var e=this,t=e.options,n,r,s=Math.log(e.max);t.base!=Math.E&&(s/=Math.log(t.base)),s=Math.ceil(s);var o=Math.log(e.min);t.base!=Math.E&&(o/=Math.log(t.base)),o=Math.ceil(o);for(i=o;ii&&(i=a,o=!0)),f!==null&&(fs&&(s=f,u=!0));return{xmin:n,xmax:i,ymin:r,ymax:s,xused:o,yused:u}}},e.extend(t,{getSeries:function(n){return e.map(n,function(n){var r;return n.data?(r=new t,e.extend(r,n)):r=new t({data:n}),r})}}),Flotr.Series=t}(),Flotr.addType("lines",{options:{show:!1,lineWidth:2,fill:!1,fillBorder:!1,fillColor:null,fillOpacity:.4,steps:!1,stacked:!1},stack:{values:[]},draw:function(e){var t=e.context,n=e.lineWidth,r=e.shadowSize,i;t.save(),t.lineJoin="round",r&&(t.lineWidth=r/2,i=n/2+t.lineWidth/2,t.strokeStyle="rgba(0,0,0,0.1)",this.plot(e,i+r/2,!1),t.strokeStyle="rgba(0,0,0,0.2)",this.plot(e,i,!1)),t.lineWidth=n,t.strokeStyle=e.color,this.plot(e,0,!0),t.restore()},plot:function(e,t,n){function S(){!t&&e.fill&&d&&(v=o(d[0]),r.fillStyle=e.fillStyle,r.lineTo(m,p),r.lineTo(v,p),r.lineTo(v,u(d[1])),r.fill(),e.fillBorder&&r.stroke())}var r=e.context,i=e.width,s=e.height,o=e.xScale,u=e.yScale,a=e.data,f=e.stacked?this.stack:!1,l=a.length-1,c=null,h=null,p=u(0),d=null,v,m,g,y,b,w,E;if(l<1)return;r.beginPath();for(E=0;E0&&a[E][1]!==null&&(r.stroke(),S(),d=null,r.closePath(),r.beginPath());continue}v=o(a[E][0]),m=o(a[E+1][0]),d===null&&(d=a[E]),f?(b=f.values[a[E][0]]||0,w=f.values[a[E+1][0]]||f.values[a[E][0]]||0,g=u(a[E][1]+b),y=u(a[E+1][1]+w),n&&(a[E].y0=b,f.values[a[E][0]]=a[E][1]+b,E==l-1&&(a[E+1].y0=w,f.values[a[E+1][0]]=a[E+1][1]+w))):(g=u(a[E][1]),y=u(a[E+1][1]));if(g>s&&y>s||g<0&&y<0||v<0&&m<0||v>i&&m>i)continue;(c!=v||h!=g+t)&&r.moveTo(v,g+t),c=m,h=y+t,e.steps?(r.lineTo(c+t/2,g+t),r.lineTo(c+t/2,h)):r.lineTo(c,h)}(!e.fill||e.fill&&!e.fillBorder)&&r.stroke(),S(),r.closePath()},extendYRange:function(e,t,n,r){var i=e.options;if(n.stacked&&(!i.max&&i.max!==0||!i.min&&i.min!==0)){var s=e.max,o=e.min,u=r.positiveSums||{},a=r.negativeSums||{},f,l;for(l=0;l0?(u[f]=(u[f]||0)+t[l][1],s=Math.max(s,u[f])):(a[f]=(a[f]||0)+t[l][1],o=Math.min(o,a[f]));r.negativeSums=a,r.positiveSums=u,e.max=s,e.min=o}n.steps&&(this.hit=function(e){var t=e.data,n=e.args,r=e.yScale,i=n[0],s=t.length,o=n[1],u=e.xInverse(i.relX),a=i.relY,f;for(f=0;f=t[f][0]&&u<=t[f+1][0]){Math.abs(r(t[f][1])-a)<8&&(o.x=t[f][0],o.y=t[f][1],o.index=f,o.seriesIndex=e.index);break}},this.drawHit=function(e){var t=e.context,n=e.args,r=e.data,i=e.xScale,s=n.index,o=i(n.x),u=e.yScale(n.y),a;r.length-1>s&&(a=e.xScale(r[s+1][0]),t.save(),t.strokeStyle=e.color,t.lineWidth=e.lineWidth,t.beginPath(),t.moveTo(o,u),t.lineTo(a,u),t.stroke(),t.closePath(),t.restore())},this.clearHit=function(e){var t=e.context,n=e.args,r=e.data,i=e.xScale,s=e.lineWidth,o=n.index,u=i(n.x),a=e.yScale(n.y),f;r.length-1>o&&(f=e.xScale(r[o+1][0]),t.clearRect(u-s,a-s,f-u+2*s,2*s))})}}),Flotr.addType("bars",{options:{show:!1,lineWidth:2,barWidth:1,fill:!0,fillColor:null,fillOpacity:.4,horizontal:!1,stacked:!1,centered:!0,topPadding:.1,grouped:!1},stack:{positive:[],negative:[],_positive:[],_negative:[]},draw:function(e){var t=e.context;this.current+=1,t.save(),t.lineJoin="miter",t.lineWidth=e.lineWidth,t.strokeStyle=e.color,e.fill&&(t.fillStyle=e.fillStyle),this.plot(e),t.restore()},plot:function(e){var t=e.data,n=e.context,r=e.shadowSize,i,s,o,u,a,f;if(t.length<1)return;this.translate(n,e.horizontal);for(i=0;i0?o.positive:o.negative,p=d[c]||p,d[c]=p+h),v=f(c-a),m=f(c+i-a),g=l(h+p),y=l(p),y<0&&(y=0),e===null||t===null?null:{x:c,y:h,xScale:f,yScale:l,top:g,left:Math.min(v,m)-u/2,width:Math.abs(m-v)-u,height:y-g}},hit:function(e){var t=e.data,n=e.args,r=n[0],i=n[1],s=e.xInverse(r.relX),o=e.yInverse(r.relY),u=this.getBarGeometry(s,o,e),a=u.width/2,f=u.left,l=u.y,c,h;for(h=t.length;h--;)c=this.getBarGeometry(t[h][0],t[h][1],e),(l>0&&lc.y)&&Math.abs(f-c.left)0?(f[c]=(f[c]||0)+h,o=Math.max(o,f[c])):(l[c]=(l[c]||0)+h,s=Math.min(s,l[c]));(a==1&&u||a==-1&&!u)&&n.topPadding&&(e.max===e.datamax||n.stacked&&this.stackMax!==o)&&(o+=n.topPadding*(o-s)),this.stackMin=s,this.stackMax=o,this.negativeSums=l,this.positiveSums=f,e.max=o,e.min=s}}),Flotr.addType("bubbles",{options:{show:!1,lineWidth:2,fill:!0,fillOpacity:.4,baseRadius:2},draw:function(e){var t=e.context,n=e.shadowSize;t.save(),t.lineWidth=e.lineWidth,t.fillStyle="rgba(0,0,0,0.05)",t.strokeStyle="rgba(0,0,0,0.05)",this.plot(e,n/2),t.strokeStyle="rgba(0,0,0,0.1)",this.plot(e,n/4),t.strokeStyle=e.color,t.fillStyle=e.fillStyle,this.plot(e),t.restore()},plot:function(e,t){var n=e.data,r=e.context,i,s,o,u,a;t=t||0;for(s=0;sg?"downFillColor":"upFillColor"],e.fill&&!e.barcharts&&(n.fillStyle="rgba(0,0,0,0.05)",n.fillRect(y+o,x+o,b-y,S-x),n.save(),n.globalAlpha=e.fillOpacity,n.fillStyle=l,n.fillRect(y,x+u,b-y,S-x),n.restore());if(u||a)h=Math.floor((y+b)/2)+f,n.strokeStyle=l,n.beginPath(),e.barcharts?(n.moveTo(h,Math.floor(E+u)),n.lineTo(h,Math.floor(w+u)),T=dv&&ag&&fs.max||yo.max)continue;vs.max&&(m=s.max,s.lastSerie!=e&&(p=!1)),go.max&&(y=o.max,o.lastSerie!=e&&(p=!1)),r&&(u.beginPath(),u.moveTo(s.d2p(v),o.d2p(g)+n),u.lineTo(s.d2p(v),o.d2p(y)+n),u.lineTo(s.d2p(m),o.d2p(y)+n),u.lineTo(s.d2p(m),o.d2p(g)+n),u.fill(),u.closePath()),e.gantt.lineWidth&&(h||d||p)&&(u.beginPath(),u.moveTo(s.d2p(v),o.d2p(g)+n),u[h?"lineTo":"moveTo"](s.d2p(v),o.d2p(y)+n),u[p?"lineTo":"moveTo"](s.d2p(m),o.d2p(y)+n),u[d?"lineTo":"moveTo"](s.d2p(m),o.d2p(g)+n),u.stroke(),u.closePath())}},plotShadows:function(e,t,n){var r=e.data;if(r.length<1)return;var i,s,o,u,a=e.xaxis,f=e.yaxis,l=this.ctx,c=this.options.shadowSize;for(i=0;ia.max||vf.max)continue;ha.max&&(p=a.max),df.max&&(v=f.max);var m=a.d2p(p)-a.d2p(h)-(a.d2p(p)+c<=this.plotWidth?0:c),g=f.d2p(d)-f.d2p(v)-(f.d2p(d)+c<=this.plotHeight?0:c);l.fillStyle="rgba(0,0,0,0.05)",l.fillRect(Math.min(a.d2p(h)+c,this.plotWidth),Math.min(f.d2p(v)+c,this.plotHeight),m,g)}},extendXRange:function(e){if(e.options.max===null){var t=e.min,n=e.max,r,i,s,o,u,a={},f={},l=null;for(r=0;rt&&(t=e.max+o.barWidth)}}e.lastSerie=f,e.max=t,e.min=n,e.tickSize=Flotr.getTickSize(e.options.noTicks,n,t,e.options.tickDecimals)}}}),function(){function e(e){return typeof e=="object"&&e.constructor&&(Image?!0:e.constructor===Image)}Flotr.defaultMarkerFormatter=function(e){return Math.round(e.y*100)/100+""},Flotr.addType("markers",{options:{show:!1,lineWidth:1,color:"#000000",fill:!1,fillColor:"#FFFFFF",fillOpacity:.4,stroke:!1,position:"ct",verticalMargin:0,labelFormatter:Flotr.defaultMarkerFormatter,fontSize:Flotr.defaultOptions.fontSize,stacked:!1,stackingType:"b",horizontal:!1},stack:{positive:[],negative:[],values:[]},draw:function(e){function h(e,t){return o=r.negative[e]||0,s=r.positive[e]||0,t>0?(r.positive[e]=o+t,o+t):(r.negative[e]=s+t,s+t)}var t=e.data,n=e.context,r=e.stacked?e.stack:!1,i=e.stackingType,s,o,u,a,f,l,c;n.save(),n.lineJoin="round",n.lineWidth=e.lineWidth,n.strokeStyle="rgba(0,0,0,0.5)",n.fillStyle=e.fillStyle;for(a=0;a0?"top":"bottom",C,k,L;n.save(),n.translate(u/2,o/2),n.scale(1,v),k=Math.cos(b)*a,L=Math.sin(b)*a,i>0&&(this.plotSlice(k+i,L+i,h,g,y,n),l&&(n.fillStyle="rgba(0,0,0,0.1)",n.fill())),this.plotSlice(k,L,h,g,y,n),l&&(n.fillStyle=c,n.fill()),n.lineWidth=r,n.strokeStyle=f,n.stroke(),C={size:e.fontSize*1.2,color:e.fontColor,weight:1.5},w&&(e.htmlText||!e.textEnabled?(divStyle="position:absolute;"+N+":"+(o/2+(N==="top"?x:-x))+"px;",divStyle+=T+":"+(u/2+(T==="right"?-S:S))+"px;",d.push('
    ',w,"
    ")):(C.textAlign=T,C.textBaseline=N,Flotr.drawText(n,w,S,x,C)));if(e.htmlText||!e.textEnabled){var A=Flotr.DOM.node('
    ');Flotr.DOM.insert(A,d.join("")),Flotr.DOM.insert(e.element,A)}n.restore(),this.startAngle=y,this.slices=this.slices||[],this.slices.push({radius:h,x:k,y:L,explode:a,start:g,end:y})},plotSlice:function(e,t,n,r,i,s){s.beginPath(),s.moveTo(e,t),s.arc(e,t,n,r,i,!1),s.lineTo(e,t),s.closePath()},hit:function(e){var t=e.data[0],n=e.args,r=e.index,i=n[0],s=n[1],o=this.slices[r],u=i.relX-e.width/2,a=i.relY-e.height/2,f=Math.sqrt(u*u+a*a),l=Math.atan(a/u),c=Math.PI*2,h=o.explode||e.explode,p=o.start%c,d=o.end%c,v=e.epsilon;u<0?l+=Math.PI:u>0&&a<0&&(l+=c),fh&&(l>p&&ld&&(lp)||p===d&&(o.start===o.end&&Math.abs(l-p)v))&&(s.x=t[0],s.y=t[1],s.sAngle=p,s.eAngle=d,s.index=0,s.seriesIndex=r,s.fraction=t[1]/this.total)},drawHit:function(e){var t=e.context,n=this.slices[e.args.seriesIndex];t.save(),t.translate(e.width/2,e.height/2),this.plotSlice(n.x,n.y,n.radius,n.start,n.end,t),t.stroke(),t.restore()},clearHit:function(e){var t=e.context,n=this.slices[e.args.seriesIndex],r=2*e.lineWidth,i=n.radius+r;t.save(),t.translate(e.width/2,e.height/2),t.clearRect(n.x-i,n.y-i,2*i+r,2*i+r),t.restore()},extendYRange:function(e,t){this.total=(this.total||0)+t[0][1]}})}(),Flotr.addType("points",{options:{show:!1,radius:3,lineWidth:2,fill:!0,fillColor:"#FFFFFF",fillOpacity:1,hitRadius:null},draw:function(e){var t=e.context,n=e.lineWidth,r=e.shadowSize;t.save(),r>0&&(t.lineWidth=r/2,t.strokeStyle="rgba(0,0,0,0.1)",this.plot(e,r/2+t.lineWidth/2),t.strokeStyle="rgba(0,0,0,0.2)",this.plot(e,t.lineWidth/2)),t.lineWidth=e.lineWidth,t.strokeStyle=e.color,e.fill&&(t.fillStyle=e.fillStyle),this.plot(e),t.restore()},plot:function(e,t){var n=e.data,r=e.context,i=e.xScale,s=e.yScale,o,u,a;for(o=n.length-1;o>-1;--o){a=n[o][1];if(a===null)continue;u=i(n[o][0]),a=s(a);if(u<0||u>e.width||a<0||a>e.height)continue;r.beginPath(),t?r.arc(u,a+t,e.radius,0,Math.PI,!1):(r.arc(u,a,e.radius,0,2*Math.PI,!0),e.fill&&r.fill()),r.stroke(),r.closePath()}}}),Flotr.addType("radar",{options:{show:!1,lineWidth:2,fill:!0,fillOpacity:.4,radiusRatio:.9,sensibility:2},draw:function(e){var t=e.context,n=e.shadowSize;t.save(),t.translate(e.width/2,e.height/2),t.lineWidth=e.lineWidth,t.fillStyle="rgba(0,0,0,0.05)",t.strokeStyle="rgba(0,0,0,0.05)",this.plot(e,n/2),t.strokeStyle="rgba(0,0,0,0.1)",this.plot(e,n/4),t.strokeStyle=e.color,t.fillStyle=e.fillStyle,this.plot(e),t.restore()},plot:function(e,t){var n=e.data,r=e.context,i=Math.min(e.height,e.width)*e.radiusRatio/2,s=2*Math.PI/n.length,o=-Math.PI/2,u,a;t=t||0,r.beginPath();for(u=0;uthis.plotWidth||t.relY>this.plotHeight){this.el.style.cursor=null,e.removeClass(this.el,"flotr-crosshair");return}r.hideCursor&&(this.el.style.cursor="none",e.addClass(this.el,"flotr-crosshair")),n.save(),n.strokeStyle=r.color,n.lineWidth=1,n.beginPath(),r.mode.indexOf("x")!=-1&&(n.moveTo(s,i.top),n.lineTo(s,i.top+this.plotHeight)),r.mode.indexOf("y")!=-1&&(n.moveTo(i.left,o),n.lineTo(i.left+this.plotWidth,o)),n.stroke(),n.restore()},clearCrosshair:function(){var e=this.plotOffset,t=this.lastMousePos,n=this.octx;t&&(n.clearRect(Math.round(t.relX)+e.left,e.top,1,this.plotHeight+1),n.clearRect(e.left,Math.round(t.relY)+e.top,this.plotWidth+1,1))}})}(),function(){function n(e,t,n,r,i,s){var o="image/"+e,u=n.getImageData(0,0,r,i),a=new Image;return n.save(),n.globalCompositeOperation="destination-over",n.fillStyle=s,n.fillRect(0,0,r,i),a.src=t.toDataURL(o),n.restore(),n.clearRect(0,0,r,i),n.putImageData(u,0,0),a}var e=Flotr.DOM,t=Flotr._;Flotr.addPlugin("download",{saveImage:function(r,i,s,o){var u=this.options.grid,a;if(Flotr.isIE&&Flotr.isIE<9)return a=""+this.canvas.firstChild.innerHTML+"",window.open().document.write(a);if(r!=="jpeg"&&r!=="png")return;a=n(r,this.canvas,this.ctx,this.canvasWidth,this.canvasHeight,u&&u.backgroundColor||"#ffffff");if(!t.isElement(a)||!o)return window.open(a.src);this.download.restoreCanvas(),e.hide(this.canvas),e.hide(this.overlay),e.setStyles({position:"absolute"}),e.insert(this.el,a),this.saveImageElement=a},restoreCanvas:function(){e.show(this.canvas),e.show(this.overlay),this.saveImageElement&&this.el.removeChild(this.saveImageElement),this.saveImageElement=null}})}(),function(){var e=Flotr.EventAdapter,t=Flotr._;Flotr.addPlugin("graphGrid",{callbacks:{"flotr:beforedraw":function(){this.graphGrid.drawGrid()},"flotr:afterdraw":function(){this.graphGrid.drawOutline()}},drawGrid:function(){function v(e){for(p=0;p=c.max||(e==c.min||e==c.max)&&i.outlineWidth)return;r(Math.floor(c.d2p(e))+n.lineWidth/2)})}function g(e){n.moveTo(e,0),n.lineTo(e,f)}function y(e){n.moveTo(0,e),n.lineTo(l,e)}var n=this.ctx,r=this.options,i=r.grid,s=i.verticalLines,o=i.horizontalLines,u=i.minorVerticalLines,a=i.minorHorizontalLines,f=this.plotHeight,l=this.plotWidth,c,h,p,d;(s||u||o||a)&&e.fire(this.el,"flotr:beforegrid",[this.axes.x,this.axes.y,r,this]),n.save(),n.lineWidth=1,n.strokeStyle=i.tickColor;if(i.circular){n.translate(this.plotOffset.left+l/2,this.plotOffset.top+f/2);var b=Math.min(f,l)*r.radar.radiusRatio/2,w=this.axes.x.ticks.length,S=2*(Math.PI/w),x=-Math.PI/2;n.beginPath(),c=this.axes.y,o&&v(c.ticks),a&&v(c.minorTicks),s&&t.times(w,function(e){n.moveTo(0,0),n.lineTo(Math.cos(e*S+x)*b,Math.sin(e*S+x)*b)}),n.stroke()}else n.translate(this.plotOffset.left,this.plotOffset.top),i.backgroundColor&&(n.fillStyle=this.processColor(i.backgroundColor,{x1:0,y1:0,x2:l,y2:f}),n.fillRect(0,0,l,f)),n.beginPath(),c=this.axes.x,s&&m(c.ticks,g),u&&m(c.minorTicks,g),c=this.axes.y,o&&m(c.ticks,y),a&&m(c.minorTicks,y),n.stroke();n.restore(),(s||u||o||a)&&e.fire(this.el,"flotr:aftergrid",[this.axes.x,this.axes.y,r,this])},drawOutline:function(){var e=this,t=e.options,n=t.grid,r=n.outline,s=e.ctx,o=n.backgroundImage,u=e.plotOffset,a=u.left,f=u.top,l=e.plotWidth,c=e.plotHeight,h,p,d,v,m,g;if(!n.outlineWidth)return;s.save();if(n.circular){s.translate(a+l/2,f+c/2);var y=Math.min(c,l)*t.radar.radiusRatio/2,b=this.axes.x.ticks.length,w=2*(Math.PI/b),E=-Math.PI/2;s.beginPath(),s.lineWidth=n.outlineWidth,s.strokeStyle=n.color,s.lineJoin="round";for(i=0;i<=b;++i)s[i===0?"moveTo":"lineTo"](Math.cos(i*w+E)*y,Math.sin(i*w+E)*y);s.stroke()}else{s.translate(a,f);var S=n.outlineWidth,x=.5-S+(S+1)%2/2,T="lineTo",N="moveTo";s.lineWidth=S,s.strokeStyle=n.color,s.lineJoin="miter",s.beginPath(),s.moveTo(x,x),l-=S/2%1,c+=S/2,s[r.indexOf("n")!==-1?T:N](l,x),s[r.indexOf("e")!==-1?T:N](l,c),s[r.indexOf("s")!==-1?T:N](x,c),s[r.indexOf("w")!==-1?T:N](x,x),s.stroke(),s.closePath()}s.restore(),o&&(d=o.src||o,v=(parseInt(o.left,10)||0)+u.left,m=(parseInt(o.top,10)||0)+u.top,p=new Image,p.onload=function(){s.save(),o.alpha&&(s.globalAlpha=o.alpha),s.globalCompositeOperation="destination-over",s.drawImage(p,0,0,p.width,p.height,v,m,l,c),s.restore()},p.src=d)}})}(),function(){var e=Flotr.DOM,t=Flotr._,n=Flotr,r="opacity:0.7;background-color:#000;color:#fff;position:absolute;padding:2px 8px;-moz-border-radius:4px;border-radius:4px;white-space:nowrap;";Flotr.addPlugin("hit",{callbacks:{"flotr:mousemove":function(e,t){this.hit.track(t)},"flotr:click":function(e){var n=this.hit.track(e);n&&!t.isUndefined(n.index)&&(e.hit=n)},"flotr:mouseout":function(e){e.relatedTarget!==this.mouseTrack&&this.hit.clearHit()},"flotr:destroy":function(){this.options.mouse.container&&e.remove(this.mouseTrack),this.mouseTrack=null}},track:function(e){if(this.options.mouse.track||t.any(this.series,function(e){return e.mouse&&e.mouse.track}))return this.hit.hit(e)},executeOnType:function(e,r,i){function u(e,u){t.each(t.keys(n.graphTypes),function(t){e[t]&&e[t].show&&!e.hide&&this[t][r]&&(o=this.getOptions(e,t),o.fill=!!e.mouse.fillColor,o.fillStyle=this.processColor(e.mouse.fillColor||"#ffffff",{opacity:e.mouse.fillOpacity}),o.color=e.mouse.lineColor,o.context=this.octx,o.index=u,i&&(o.args=i),this[t][r].call(this[t],o),s=!0)},this)}var s=!1,o;return t.isArray(e)||(e=[e]),t.each(e,u,this),s},drawHit:function(e){var t=this.octx,n=e.series;if(n.mouse.lineColor){t.save(),t.lineWidth=n.points?n.points.lineWidth:1,t.strokeStyle=n.mouse.lineColor,t.fillStyle=this.processColor(n.mouse.fillColor||"#ffffff",{opacity:n.mouse.fillOpacity}),t.translate(this.plotOffset.left,this.plotOffset.top);if(!this.hit.executeOnType(n,"drawHit",e)){var r=e.xaxis,i=e.yaxis;t.beginPath(),t.arc(r.d2p(e.x),i.d2p(e.y),n.points.hitRadius||n.points.radius||n.mouse.radius,0,2*Math.PI,!0),t.fill(),t.stroke(),t.closePath()}t.restore(),this.clip(t)}this.prevHit=e},clearHit:function(){var t=this.prevHit,n=this.octx,r=this.plotOffset;n.save(),n.translate(r.left,r.top);if(t){if(!this.hit.executeOnType(t.series,"clearHit",this.prevHit)){var i=t.series,s=i.points?i.points.lineWidth:1;offset=(i.points.hitRadius||i.points.radius||i.mouse.radius)+s,n.clearRect(t.xaxis.d2p(t.x)-offset,t.yaxis.d2p(t.y)-offset,offset*2,offset*2)}e.hide(this.mouseTrack),this.prevHit=null}n.restore()},hit:function(e){var n=this.options,r=this.prevHit,i,s,o,u,a,f,l,c,h;if(this.series.length===0)return;h={relX:e.relX,relY:e.relY,absX:e.absX,absY:e.absY,series:this.series};if(n.mouse.trackY&&!n.mouse.trackAll&&this.hit.executeOnType(this.series,"hit",[e,h])&&!t.isUndefined(h.seriesIndex))a=this.series[h.seriesIndex],h.series=a,h.mouse=a.mouse,h.xaxis=a.xaxis,h.yaxis=a.yaxis;else{i=this.hit.closest(e);if(i){i=n.mouse.trackY?i.point:i.x,u=i.seriesIndex,a=this.series[u],l=a.xaxis,c=a.yaxis,s=2*a.mouse.sensibility;if(n.mouse.trackAll||i.distanceXl.xaxis.max)continue;p=Math.abs(g-v),d=Math.abs(y-m),h=p*p+d*d,h'),this.mouseTrack=c,e.insert(b||this.el,c));if(!g||g<0)g=0;a&&a.toFixed&&(a=a.toFixed(g)),f&&f.toFixed&&(f=f.toFixed(g)),T=n.mouse.trackFormatter({x:a,y:f,series:n.series,index:n.index,nearest:n,fraction:n.fraction});if(t.isNull(T)||t.isUndefined(T)){e.hide(c);return}c.innerHTML=T,e.show(c);if(!o)return;x=e.size(c),b&&(S=e.position(this.el),w=S.top,E=S.left);if(!n.mouse.relative)i+="top:",o.charAt(0)=="n"?i+=w+u+m:o.charAt(0)=="s"&&(i+=w-u+m+this.plotHeight-x.height),i+="px;bottom:auto;left:",o.charAt(1)=="e"?i+=E-u+p+this.plotWidth-x.width:o.charAt(1)=="w"&&(i+=E+u+p),i+="px;right:auto;";else if(s.pie&&s.pie.show){var N={x:this.plotWidth/2,y:this.plotHeight/2},C=Math.min(this.canvasWidth,this.canvasHeight)*s.pie.sizeRatio/2,k=n.sAngle=5||Math.abs(e.second.y-e.first.y)>=5}})}(),function(){var e=Flotr.DOM;Flotr.addPlugin("labels",{callbacks:{"flotr:afterdraw":function(){this.labels.draw()}},draw:function(){function b(e,t,r){var i=r?t.minorTicks:t.ticks,s=t.orientation===1,u=t.n===1,l,h;l={color:t.options.color||d.grid.color,angle:Flotr.toRad(t.options.labelsAngle),textBaseline:"middle"};for(c=0;c(s?e.plotWidth:e.plotHeight))continue;Flotr.drawText(v,n.label,l(e,s,o,a),h(e,s,o,a),u),!s&&!o&&(v.save(),v.strokeStyle=u.color,v.beginPath(),v.moveTo(e.plotOffset.left+e.plotWidth-8,e.plotOffset.top+t.d2p(n.v)),v.lineTo(e.plotOffset.left+e.plotWidth,e.plotOffset.top+t.d2p(n.v)),v.stroke(),v.restore())}}function E(e,t){var r=t.orientation===1,i=t.n===1,o="",u,a,f,l=e.plotOffset;!r&&!i&&(v.save(),v.strokeStyle=t.options.color||d.grid.color,v.beginPath());if(t.options.showLabels&&(i?!0:t.used))for(c=0;c(r?e.canvasWidth:e.canvasHeight))continue;f=l.top+(r?(i?1:-1)*(e.plotHeight+d.grid.labelMargin):t.d2p(n.v)-t.maxLabel.height/2),u=r?l.left+t.d2p(n.v)-s/2:0,o="",c===0?o=" first":c===t.ticks.length-1&&(o=" last"),o+=r?" flotr-grid-label-x":" flotr-grid-label-y",h+=['
    '+n.label+"
    "].join(" "),!r&&!i&&(v.moveTo(l.left+e.plotWidth-8,l.top+t.d2p(n.v)),v.lineTo(l.left+e.plotWidth,l.top+t.d2p(n.v)))}}var t,n,r,i,s,o,u,a,f,l,c,h="",p=0,d=this.options,v=this.ctx,m=this.axes,g={size:d.fontSize};for(c=0;c-1;--p){if(!n[p].label||n[p].hide)continue;d=s.labelFormatter(n[p].label),E=Math.max(E,this._text.measureText(d,S).width)}var x=Math.round(m+y*3+E),T=Math.round(f*(y+g)+y);!h&&h!==0&&(h=.1);if(!i.HtmlText&&this.textEnabled&&!s.container){l.charAt(0)=="s"&&(w=r.top+this.plotHeight-(c+T)),l.charAt(0)=="c"&&(w=r.top+this.plotHeight/2-(c+T/2)),l.charAt(1)=="e"&&(b=r.left+this.plotWidth-(c+x)),v=this.processColor(s.backgroundColor,{opacity:h}),a.fillStyle=v,a.fillRect(b,w,x,T),a.strokeStyle=s.labelBoxBorderColor,a.strokeRect(Flotr.toPixel(b),Flotr.toPixel(w),x,T);var N=b+y,C=w+y;for(p=0;p":""),u=!0);var k=n[p],L=s.labelBoxWidth,A=s.labelBoxHeight;d=s.labelFormatter(k.label),v="background-color:"+(k.bars&&k.bars.show&&k.bars.fillColor&&k.bars.fill?k.bars.fillColor:k.color)+";",o.push('','
    ','
    ','
    ',"
    ","
    ","",'',d,"")}u&&o.push("");if(o.length>0){var O=''+o.join("")+"
    ";if(s.container)O=e.node(O),this.legend.markup=O,e.insert(s.container,O);else{var M={position:"absolute",zIndex:"2",border:"1px solid "+s.labelBoxBorderColor};l.charAt(0)=="n"?(M.top=c+r.top+"px",M.bottom="auto"):l.charAt(0)=="c"?(M.top=c+(this.plotHeight-T)/2+"px",M.bottom="auto"):l.charAt(0)=="s"&&(M.bottom=c+r.bottom+"px",M.top="auto"),l.charAt(1)=="e"?(M.right=c+r.right+"px",M.left="auto"):l.charAt(1)=="w"&&(M.left=c+r.left+"px",M.right="auto");var P=e.create("div"),H;P.className="flotr-legend",e.setStyles(P,M),e.insert(P,O),e.insert(this.el,P);if(!h)return;var B=s.backgroundColor||i.grid.backgroundColor||"#ffffff";t.extend(M,e.size(P),{backgroundColor:B,zIndex:"",border:""}),M.width+="px",M.height+="px",P=e.create("div"),P.className="flotr-legend-bg",e.setStyles(P,M),e.opacity(P,h),e.insert(P," "),e.insert(this.el,P)}}}}}})}(),function(){function e(e){if(this.options.spreadsheet.tickFormatter)return this.options.spreadsheet.tickFormatter(e);var t=n.find(this.axes.x.ticks,function(t){return t.v==e});return t?t.label:e}var t=Flotr.DOM,n=Flotr._;Flotr.addPlugin("spreadsheet",{options:{show:!1,tabGraphLabel:"Graph",tabDataLabel:"Data",toolbarDownload:"Download CSV",toolbarSelectAll:"Select all",csvFileSeparator:",",decimalSeparator:".",tickFormatter:null,initialTab:"graph"},callbacks:{"flotr:afterconstruct":function(){if(!this.options.spreadsheet.show)return;var e=this.spreadsheet,n=t.node('
    '),r=t.node('
    '+this.options.spreadsheet.tabGraphLabel+"
    "),i=t.node('
    '+this.options.spreadsheet.tabDataLabel+"
    "),s;e.tabsContainer=n,e.tabs={graph:r,data:i},t.insert(n,r),t.insert(n,i),t.insert(this.el,n),s=t.size(i).height+2,this.plotOffset.bottom+=s,t.setStyles(n,{top:this.canvasHeight-s+"px"}),this.observe(r,"click",function(){e.showTab("graph")}).observe(i,"click",function(){e.showTab("data")}),this.options.spreadsheet.initialTab!=="graph"&&e.showTab(this.options.spreadsheet.initialTab)}},loadDataGrid:function(){if(this.seriesData)return this.seriesData;var e=this.series,t={};return n.each(e,function(e,r){n.each(e.data,function(e){var n=e[0],s=e[1],o=t[n];if(o)o[r+1]=s;else{var u=[];u[0]=n,u[r+1]=s,t[n]=u}})}),this.seriesData=n.sortBy(t,function(e,t){return parseInt(t,10)}),this.seriesData},constructDataGrid:function(){if(this.spreadsheet.datagrid)return this.spreadsheet.datagrid;var r=this.series,i=this.spreadsheet.loadDataGrid(),s=[""],o,u,a,f=[''];f.push(""),n.each(r,function(e,t){f.push('"),s.push("")}),f.push(""),n.each(i,function(t){f.push(""),n.times(r.length+1,function(r){var i="td",s=t[r],o=n.isUndefined(s)?"":Math.round(s*1e5)/1e5;if(r===0){i="th";var u=e.call(this,o);u&&(o=u)}f.push("<"+i+(i=="th"?' scope="row"':"")+">"+o+"")},this),f.push("")},this),s.push(""),a=t.node(f.join("")),o=t.node('"),u=t.node('"),this.observe(o,"click",n.bind(this.spreadsheet.downloadCSV,this)).observe(u,"click",n.bind(this.spreadsheet.selectAllData,this));var l=t.node('
    ');t.insert(l,o),t.insert(l,u);var c=this.canvasHeight-t.size(this.spreadsheet.tabsContainer).height-2,h=t.node('
    ');return t.insert(h,l),t.insert(h,a),t.insert(this.el,h),this.spreadsheet.datagrid=a,this.spreadsheet.container=h,a},showTab:function(e){if(this.spreadsheet.activeTab===e)return;switch(e){case"graph":t.hide(this.spreadsheet.container),t.removeClass(this.spreadsheet.tabs.data,"selected"),t.addClass(this.spreadsheet.tabs.graph,"selected");break;case"data":this.spreadsheet.datagrid||this.spreadsheet.constructDataGrid(),t.show(this.spreadsheet.container),t.addClass(this.spreadsheet.tabs.data,"selected"),t.removeClass(this.spreadsheet.tabs.graph,"selected");break;default:throw"Illegal tab name: "+e}this.spreadsheet.activeTab=e},selectAllData:function(){if(this.spreadsheet.tabs){var e,t,n,r,i=this.spreadsheet.constructDataGrid();return this.spreadsheet.showTab("data"),setTimeout(function(){(n=i.ownerDocument)&&(r=n.defaultView)&&r.getSelection&&n.createRange&&(e=window.getSelection())&&e.removeAllRanges?(t=n.createRange(),t.selectNode(i),e.removeAllRanges(),e.addRange(t)):document.body&&document.body.createTextRange&&(t=document.body.createTextRange())&&(t.moveToElementText(i),t.select())},0),!0}return!1},downloadCSV:function(){var t="",r=this.series,i=this.options,s=this.spreadsheet.loadDataGrid(),o=encodeURIComponent(i.spreadsheet.csvFileSeparator);if(i.spreadsheet.decimalSeparator===i.spreadsheet.csvFileSeparator)throw"The decimal separator is the same as the column separator ("+i.spreadsheet.decimalSeparator+")";n.each(r,function(e,n){t+=o+'"'+(e.label||String.fromCharCode(65+n)).replace(/\"/g,'\\"')+'"'}),t+="%0D%0A",t+=n.reduce(s,function(t,n){var r=e.call(this,n[0])||"";r='"'+(r+"").replace(/\"/g,'\\"')+'"';var s=n.slice(1).join(o);return i.spreadsheet.decimalSeparator!=="."&&(s=s.replace(/\./g,i.spreadsheet.decimalSeparator)),t+r+o+s+"%0D%0A"},"",this),Flotr.isIE&&Flotr.isIE<9?(t=t.replace(new RegExp(o,"g"),decodeURIComponent(o)).replace(/%0A/g,"\n").replace(/%0D/g,"\r"),window.open().document.write(t)):window.open("data:text/csv,"+t)}})}(),function(){var e=Flotr.DOM;Flotr.addPlugin("titles",{callbacks:{"flotr:afterdraw":function(){this.titles.drawTitles()}},drawTitles:function(){var t,n=this.options,r=n.grid.labelMargin,i=this.ctx,s=this.axes;if(!n.HtmlText&&this.textEnabled){var o={size:n.fontSize,color:n.grid.color,textAlign:"center"};n.subtitle&&Flotr.drawText(i,n.subtitle,this.plotOffset.left+this.plotWidth/2,this.titleHeight+this.subtitleHeight-2,o),o.weight=1.5,o.size*=1.5,n.title&&Flotr.drawText(i,n.title,this.plotOffset.left+this.plotWidth/2,this.titleHeight-2,o),o.weight=1.8,o.size*=.8,s.x.options.title&&s.x.used&&(o.textAlign=s.x.options.titleAlign||"center",o.textBaseline="top",o.angle=Flotr.toRad(s.x.options.titleAngle),o=Flotr.getBestTextAlign(o.angle,o),Flotr.drawText(i,s.x.options.title,this.plotOffset.left+this.plotWidth/2,this.plotOffset.top+s.x.maxLabel.height+this.plotHeight+2*r,o)),s.x2.options.title&&s.x2.used&&(o.textAlign=s.x2.options.titleAlign||"center",o.textBaseline="bottom",o.angle=Flotr.toRad(s.x2.options.titleAngle),o=Flotr.getBestTextAlign(o.angle,o),Flotr.drawText(i,s.x2.options.title,this.plotOffset.left+this.plotWidth/2,this.plotOffset.top-s.x2.maxLabel.height-2*r,o)),s.y.options.title&&s.y.used&&(o.textAlign=s.y.options.titleAlign||"right",o.textBaseline="middle",o.angle=Flotr.toRad(s.y.options.titleAngle),o=Flotr.getBestTextAlign(o.angle,o),Flotr.drawText(i,s.y.options.title,this.plotOffset.left-s.y.maxLabel.width-2*r,this.plotOffset.top+this.plotHeight/2,o)),s.y2.options.title&&s.y2.used&&(o.textAlign=s.y2.options.titleAlign||"left",o.textBaseline="middle",o.angle=Flotr.toRad(s.y2.options.titleAngle),o=Flotr.getBestTextAlign(o.angle,o),Flotr.drawText(i,s.y2.options.title,this.plotOffset.left+this.plotWidth+s.y2.maxLabel.width+2*r,this.plotOffset.top+this.plotHeight/2,o))}else{t=[],n.title&&t.push('
    ',n.title,"
    "),n.subtitle&&t.push('
    ',n.subtitle,"
    "),t.push(""),t.push('
    '),s.x.options.title&&s.x.used&&t.push('
    ',s.x.options.title,"
    "),s.x2.options.title&&s.x2.used&&t.push('
    ',s.x2.options.title,"
    "),s.y.options.title&&s.y.used&&t.push('
    ',s.y.options.title,"
    "),s.y2.options.title&&s.y2.used&&t.push('
    ',s.y2.options.title,"
    "),t=t.join("");var u=e.create("div");e.setStyles({color:n.grid.color}),u.className="flotr-titles",e.insert(this.el,u),e.insert(u,t)}}})}(); /* ]]> */ WRFILE: bootstrap.css /*! * Bootstrap v2.3.2 * * Copyright 2012 Twitter, Inc * Licensed under the Apache License v2.0 * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world @twitter by @mdo and @fat. */ .clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";line-height:0;} .clearfix:after{clear:both;} .hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;} .input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;} audio,canvas,video{display:inline-block;*display:inline;*zoom:1;} audio:not([controls]){display:none;} html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;} a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} a:hover,a:active{outline:0;} sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;} sup{top:-0.5em;} sub{bottom:-0.25em;} img{max-width:100%;width:auto\9;height:auto;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic;} #map_canvas img,.google-maps img{max-width:none;} button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;} button,input{*overflow:visible;line-height:normal;} button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;} button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;} label,select,button,input[type="button"],input[type="reset"],input[type="submit"],input[type="radio"],input[type="checkbox"]{cursor:pointer;} input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield;} input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;} textarea{overflow:auto;vertical-align:top;} @media print{*{text-shadow:none !important;color:#000 !important;background:transparent !important;box-shadow:none !important;} a,a:visited{text-decoration:underline;} a[href]:after{content:" (" attr(href) ")";} abbr[title]:after{content:" (" attr(title) ")";} .ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:"";} pre,blockquote{border:1px solid #999;page-break-inside:avoid;} thead{display:table-header-group;} tr,img{page-break-inside:avoid;} img{max-width:100% !important;} @page {margin:0.5cm;}p,h2,h3{orphans:3;widows:3;} h2,h3{page-break-after:avoid;}}body{margin:0;font-family:Verdana,sans-serif;font-size:12px;line-height:20px;color:#333333;background-color:#ffffff;} a{color:#2e8aa5;text-decoration:none;} a:hover,a:focus{color:#1d5869;text-decoration:underline;} .img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;} .img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.2);-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);} .img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px;} .row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";line-height:0;} .row:after{clear:both;} [class*="span"]{float:left;min-height:1px;margin-left:20px;} .container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;} .span12{width:940px;} .span11{width:860px;} .span10{width:780px;} .span9{width:700px;} .span8{width:620px;} .span7{width:540px;} .span6{width:460px;} .span5{width:380px;} .span4{width:300px;} .span3{width:220px;} .span2{width:140px;} .span1{width:60px;} .offset12{margin-left:980px;} .offset11{margin-left:900px;} .offset10{margin-left:820px;} .offset9{margin-left:740px;} .offset8{margin-left:660px;} .offset7{margin-left:580px;} .offset6{margin-left:500px;} .offset5{margin-left:420px;} .offset4{margin-left:340px;} .offset3{margin-left:260px;} .offset2{margin-left:180px;} .offset1{margin-left:100px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0;} .row-fluid:after{clear:both;} .row-fluid [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;} .row-fluid [class*="span"]:first-child{margin-left:0;} .row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.127659574468085%;} .row-fluid .span12{width:100%;*width:99.94680851063829%;} .row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%;} .row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%;} .row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%;} .row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%;} .row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%;} .row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%;} .row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%;} .row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%;} .row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%;} .row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%;} .row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%;} .row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%;} .row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%;} .row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%;} .row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%;} .row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%;} .row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%;} .row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%;} .row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%;} .row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%;} .row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%;} .row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%;} .row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%;} .row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%;} .row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%;} .row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%;} .row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%;} .row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%;} .row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%;} .row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%;} .row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%;} .row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%;} .row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%;} .row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%;} .row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%;} [class*="span"].hide,.row-fluid [class*="span"].hide{display:none;} [class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right;} .container{margin-right:auto;margin-left:auto;*zoom:1;}.container:before,.container:after{display:table;content:"";line-height:0;} .container:after{clear:both;} .container-fluid{padding-right:20px;padding-left:20px;*zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";line-height:0;} .container-fluid:after{clear:both;} p{margin:0 0 10px;} .lead{margin-bottom:20px;font-size:18px;font-weight:200;line-height:30px;} small{font-size:85%;} strong{font-weight:bold;} em{font-style:italic;} cite{font-style:normal;} .muted{color:#999999;} a.muted:hover,a.muted:focus{color:#808080;} .text-panic{color:#000000; font-weight: bold}; a.text-panic:hover,a.text-panic:focus{color:#000000;} .text-fatal{color:#7c0208;} a.text-fatal:hover,a.text-fatal:focus{color:#444444;} .text-warning{color:#c09853;} a.text-warning:hover,a.text-warning:focus{color:#a47e3c;} .text-error{color:#b94a48;} a.text-error:hover,a.text-error:focus{color:#953b39;} .text-info{color:#3a87ad;} a.text-info:hover,a.text-info:focus{color:#2d6987;} .text-success{color:#468847;} a.text-success:hover,a.text-success:focus{color:#356635;} .text-left{text-align:left;} .text-right{text-align:right;} .text-center{text-align:center;} h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:20px;color:inherit;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999999;} h1,h2,h3{line-height:40px;} h1{font-size:33px;} h2{font-size:27px;} h3{font-size:21px;} h4{font-size:15px;} h5{font-size:12px;} h6{font-size:10.2px;} h1 small{font-size:21px;} h2 small{font-size:15px;} h3 small{font-size:12px;} h4 small{font-size:12px;} .page-header{padding-bottom:9px;margin:50px 0 30px;border-bottom:1px solid #eeeeee;} ul,ol{padding:0;margin:0 0 10px 25px;} ul ul,ul ol,ol ol,ol ul{margin-bottom:0;} li{line-height:20px;} ul.unstyled,ol.unstyled{margin-left:0;list-style:none;} ul.inline,ol.inline{margin-left:0;list-style:none;}ul.inline>li,ol.inline>li{display:inline-block;*display:inline;*zoom:1;padding-left:5px;padding-right:5px;} dl{margin-bottom:20px;} dt,dd{line-height:20px;} dt{font-weight:bold;} dd{margin-left:10px;} .dl-horizontal{*zoom:1;}.dl-horizontal:before,.dl-horizontal:after{display:table;content:"";line-height:0;} .dl-horizontal:after{clear:both;} .dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;} .dl-horizontal dd{margin-left:180px;} hr{margin:20px 0;border:0;border-top:1px solid #eeeeee;border-bottom:1px solid #ffffff;} abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999999;} abbr.initialism{font-size:90%;text-transform:uppercase;} blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:15px;font-weight:300;line-height:1.25;} blockquote small{display:block;line-height:20px;color:#999999;}blockquote small:before{content:'\2014 \00A0';} blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eeeeee;border-left:0;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;} blockquote.pull-right small:before{content:'';} blockquote.pull-right small:after{content:'\00A0 \2014';} q:before,q:after,blockquote:before,blockquote:after{content:"";} address{display:block;margin-bottom:20px;font-style:normal;line-height:20px;} code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:10px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;white-space:nowrap;} pre{display:block;padding:9.5px;margin:0 0 10px;font-size:11px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}pre.prettyprint{margin-bottom:20px;} pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0;} .pre-scrollable{max-height:340px;overflow-y:scroll;} .label,.badge{display:inline-block;padding:2px 4px;font-size:10.152px;font-weight:bold;line-height:14px;color:#ffffff;vertical-align:baseline;white-space:nowrap;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#999999;} .label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} .badge{padding-left:9px;padding-right:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;} .label:empty,.badge:empty{display:none;} a.label:hover,a.label:focus,a.badge:hover,a.badge:focus{color:#ffffff;text-decoration:none;cursor:pointer;} .label-important,.badge-important{background-color:#b94a48;} .label-important[href],.badge-important[href]{background-color:#953b39;} .label-warning,.badge-warning{background-color:#ea8157;} .label-warning[href],.badge-warning[href]{background-color:#e45f2a;} .label-success,.badge-success{background-color:#468847;} .label-success[href],.badge-success[href]{background-color:#356635;} .label-info,.badge-info{background-color:#3a87ad;} .label-info[href],.badge-info[href]{background-color:#2d6987;} .label-inverse,.badge-inverse{background-color:#333333;} .label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a;} .btn .label,.btn .badge{position:relative;top:-1px;} .btn-mini .label,.btn-mini .badge{top:0;} table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;} .table{width:100%;margin-bottom:20px;}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd;} .table th{font-weight:bold;} .table thead th{vertical-align:bottom;} .table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0;} .table tbody+tbody{border-top:2px solid #5f5555;} .table .table{background-color:#ffffff;} .table-condensed th,.table-condensed td{padding:4px 5px;} .table-bordered{border:1px solid #5f5555;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th,.table-bordered td{border-left:1px solid #5f5555;} .table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;} .table-bordered thead:first-child tr:first-child>th:first-child,.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered tbody:first-child tr:first-child>th:first-child{-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;} .table-bordered thead:first-child tr:first-child>th:last-child,.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered tbody:first-child tr:first-child>th:last-child{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;} .table-bordered thead:last-child tr:last-child>th:first-child,.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tbody:last-child tr:last-child>th:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>th:first-child{-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;} .table-bordered thead:last-child tr:last-child>th:last-child,.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tbody:last-child tr:last-child>th:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>th:last-child{-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;} .table-bordered tfoot+tbody:last-child tr:last-child td:first-child{-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;} .table-bordered tfoot+tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:0;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;} .table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;} .table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;} .table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:transparent;} .table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#f5f5f5;} table td[class*="span"],table th[class*="span"],.row-fluid table td[class*="span"],.row-fluid table th[class*="span"]{display:table-cell;float:none;margin-left:0;} .table td.span1,.table th.span1{float:none;width:44px;margin-left:0;} .table td.span2,.table th.span2{float:none;width:124px;margin-left:0;} .table td.span3,.table th.span3{float:none;width:204px;margin-left:0;} .table td.span4,.table th.span4{float:none;width:284px;margin-left:0;} .table td.span5,.table th.span5{float:none;width:364px;margin-left:0;} .table td.span6,.table th.span6{float:none;width:444px;margin-left:0;} .table td.span7,.table th.span7{float:none;width:524px;margin-left:0;} .table td.span8,.table th.span8{float:none;width:604px;margin-left:0;} .table td.span9,.table th.span9{float:none;width:684px;margin-left:0;} .table td.span10,.table th.span10{float:none;width:764px;margin-left:0;} .table td.span11,.table th.span11{float:none;width:844px;margin-left:0;} .table td.span12,.table th.span12{float:none;width:924px;margin-left:0;} .table tbody tr.success>td{background-color:#dff0d8;} .table tbody tr.error>td{background-color:#f2dede;} .table tbody tr.warning>td{background-color:#fcf8e3;} .table tbody tr.info>td{background-color:#d9edf7;} .table-hover tbody tr.success:hover>td{background-color:#d0e9c6;} .table-hover tbody tr.error:hover>td{background-color:#ebcccc;} .table-hover tbody tr.warning:hover>td{background-color:#faf2cc;} .table-hover tbody tr.info:hover>td{background-color:#c4e3f3;} form{margin:0 0 20px;} fieldset{padding:0;margin:0;border:0;} legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:18px;line-height:40px;color:#333333;border:0;border-bottom:1px solid #e5e5e5;}legend small{font-size:15px;color:#999999;} label,input,button,select,textarea{font-size:12px;font-weight:normal;line-height:20px;} input,button,select,textarea{font-family:Verdana,sans-serif;} label{display:block;margin-bottom:5px;} select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:12px;line-height:20px;color:#555555;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;vertical-align:middle;} input,textarea,.uneditable-input{width:206px;} textarea{height:auto;} textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#ffffff;border:1px solid #cccccc;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-webkit-transition:border linear .2s, box-shadow linear .2s;-moz-transition:border linear .2s, box-shadow linear .2s;-o-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82, 168, 236, 0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);} input[type="radio"],input[type="checkbox"]{margin:4px 0 0;*margin-top:0;margin-top:1px \9;line-height:normal;} input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto;} select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px;} select{width:220px;border:1px solid #cccccc;background-color:#ffffff;} select[multiple],select[size]{height:auto;} select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} .uneditable-input,.uneditable-textarea{color:#999999;background-color:#fcfcfc;border-color:#cccccc;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;} .uneditable-input{overflow:hidden;white-space:nowrap;} .uneditable-textarea{width:auto;height:auto;} input:-moz-placeholder,textarea:-moz-placeholder{color:#999999;} input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999999;} input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999999;} .radio,.checkbox{min-height:20px;padding-left:20px;} .radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-20px;} .controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px;} .radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle;} .radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px;} .input-mini{width:60px;} .input-small{width:90px;} .input-medium{width:150px;} .input-large{width:210px;} .input-xlarge{width:270px;} .input-xxlarge{width:530px;} input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0;} .input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block;} input,textarea,.uneditable-input{margin-left:0;} .controls-row [class*="span"]+[class*="span"]{margin-left:20px;} input.span12,textarea.span12,.uneditable-input.span12{width:926px;} input.span11,textarea.span11,.uneditable-input.span11{width:846px;} input.span10,textarea.span10,.uneditable-input.span10{width:766px;} input.span9,textarea.span9,.uneditable-input.span9{width:686px;} input.span8,textarea.span8,.uneditable-input.span8{width:606px;} input.span7,textarea.span7,.uneditable-input.span7{width:526px;} input.span6,textarea.span6,.uneditable-input.span6{width:446px;} input.span5,textarea.span5,.uneditable-input.span5{width:366px;} input.span4,textarea.span4,.uneditable-input.span4{width:286px;} input.span3,textarea.span3,.uneditable-input.span3{width:206px;} input.span2,textarea.span2,.uneditable-input.span2{width:126px;} input.span1,textarea.span1,.uneditable-input.span1{width:46px;} .controls-row{*zoom:1;}.controls-row:before,.controls-row:after{display:table;content:"";line-height:0;} .controls-row:after{clear:both;} .controls-row [class*="span"],.row-fluid .controls-row [class*="span"]{float:left;} .controls-row .checkbox[class*="span"],.controls-row .radio[class*="span"]{padding-top:5px;} input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eeeeee;} input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent;} .control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853;} .control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;} .control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #dbc59e;} .control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853;} .control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48;} .control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;} .control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #d59392;} .control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48;} .control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847;} .control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;} .control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7aba7b;} .control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847;} .control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad;} .control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad;} .control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;} .control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad;} input:focus:invalid,textarea:focus:invalid,select:focus:invalid{color:#b94a48;border-color:#ee5f5b;}input:focus:invalid:focus,textarea:focus:invalid:focus,select:focus:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;} .form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1;}.form-actions:before,.form-actions:after{display:table;content:"";line-height:0;} .form-actions:after{clear:both;} .help-block,.help-inline{color:#595959;} .help-block{display:block;margin-bottom:10px;} .help-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;padding-left:5px;} .input-append,.input-prepend{display:inline-block;margin-bottom:10px;vertical-align:middle;font-size:0;white-space:nowrap;}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input,.input-append .dropdown-menu,.input-prepend .dropdown-menu,.input-append .popover,.input-prepend .popover{font-size:12px;} .input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2;} .input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:12px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #ffffff;background-color:#eeeeee;border:1px solid #ccc;} .input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} .input-append .active,.input-prepend .active{background-color:#67f5ab;border-color:#0cb75e;} .input-prepend .add-on,.input-prepend .btn{margin-right:-1px;} .input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;} .input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child,.input-append .uneditable-input+.btn-group .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;} .input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px;} .input-append .add-on:last-child,.input-append .btn:last-child,.input-append .btn-group:last-child>.dropdown-toggle{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;} .input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn,.input-prepend.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;} .input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;} .input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;} .input-prepend.input-append .btn-group:first-child{margin-left:0;} input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;} .form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} .form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px;} .form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0;} .form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0;} .form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px;} .form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;*zoom:1;margin-bottom:0;vertical-align:middle;} .form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none;} .form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block;} .form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0;} .form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle;} .form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0;} .control-group{margin-bottom:10px;} legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate;} .form-horizontal .control-group{margin-bottom:20px;*zoom:1;}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";line-height:0;} .form-horizontal .control-group:after{clear:both;} .form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right;} .form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0;}.form-horizontal .controls:first-child{*padding-left:180px;} .form-horizontal .help-block{margin-bottom:0;} .form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .input-append+.help-block{margin-top:10px;} .form-horizontal .form-actions{padding-left:180px;} .btn{display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:12px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333333;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top, #ffffff, #e6e6e6);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(top, #ffffff, #e6e6e6);background-image:-o-linear-gradient(top, #ffffff, #e6e6e6);background-image:linear-gradient(to bottom, #ffffff, #e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);border:1px solid #cccccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333333;background-color:#e6e6e6;*background-color:#d9d9d9;} .btn:active,.btn.active{background-color:#cccccc \9;} .btn:first-child{*margin-left:0;} .btn:hover,.btn:focus{color:#333333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position 0.1s linear;-moz-transition:background-position 0.1s linear;-o-transition:background-position 0.1s linear;transition:background-position 0.1s linear;} .btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} .btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);} .btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} .btn-large{padding:11px 19px;font-size:15px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;} .btn-large [class^="icon-"],.btn-large [class*=" icon-"]{margin-top:4px;} .btn-small{padding:2px 10px;font-size:10.2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} .btn-small [class^="icon-"],.btn-small [class*=" icon-"]{margin-top:0;} .btn-mini [class^="icon-"],.btn-mini [class*=" icon-"]{margin-top:-1px;} .btn-mini{padding:0 6px;font-size:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} .btn-block{display:block;width:100%;padding-left:0;padding-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} .btn-block+.btn-block{margin-top:5px;} input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%;} .btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255, 255, 255, 0.75);} .btn-primary{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#2e7aa5;background-image:-moz-linear-gradient(top, #2e8aa5, #2e62a5);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#2e8aa5), to(#2e62a5));background-image:-webkit-linear-gradient(top, #2e8aa5, #2e62a5);background-image:-o-linear-gradient(top, #2e8aa5, #2e62a5);background-image:linear-gradient(to bottom, #2e8aa5, #2e62a5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff2e8aa5', endColorstr='#ff2e62a5', GradientType=0);border-color:#2e62a5 #2e62a5 #1d3f69;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#2e62a5;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#ffffff;background-color:#2e62a5;*background-color:#285691;} .btn-primary:active,.btn-primary.active{background-color:#234b7d \9;} .btn-warning{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#efa080;background-image:-moz-linear-gradient(top, #f3b49b, #ea8157);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f3b49b), to(#ea8157));background-image:-webkit-linear-gradient(top, #f3b49b, #ea8157);background-image:-o-linear-gradient(top, #f3b49b, #ea8157);background-image:linear-gradient(to bottom, #f3b49b, #ea8157);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff3b49b', endColorstr='#ffea8157', GradientType=0);border-color:#ea8157 #ea8157 #d9521b;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#ea8157;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#ffffff;background-color:#ea8157;*background-color:#e77040;} .btn-warning:active,.btn-warning.active{background-color:#e45f2a \9;} .btn-danger{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#da4f49;background-image:-moz-linear-gradient(top, #ee5f5b, #bd362f);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));background-image:-webkit-linear-gradient(top, #ee5f5b, #bd362f);background-image:-o-linear-gradient(top, #ee5f5b, #bd362f);background-image:linear-gradient(to bottom, #ee5f5b, #bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#bd362f;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#ffffff;background-color:#bd362f;*background-color:#a9302a;} .btn-danger:active,.btn-danger.active{background-color:#942a25 \9;} .btn-success{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#5bb75b;background-image:-moz-linear-gradient(top, #62c462, #51a351);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));background-image:-webkit-linear-gradient(top, #62c462, #51a351);background-image:-o-linear-gradient(top, #62c462, #51a351);background-image:linear-gradient(to bottom, #62c462, #51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#51a351;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#ffffff;background-color:#51a351;*background-color:#499249;} .btn-success:active,.btn-success.active{background-color:#408140 \9;} .btn-info{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#49afcd;background-image:-moz-linear-gradient(top, #5bc0de, #2f96b4);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(to bottom, #5bc0de, #2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#2f96b4;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#ffffff;background-color:#2f96b4;*background-color:#2a85a0;} .btn-info:active,.btn-info.active{background-color:#24748c \9;} .btn-inverse{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#363636;background-image:-moz-linear-gradient(top, #444444, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222));background-image:-webkit-linear-gradient(top, #444444, #222222);background-image:-o-linear-gradient(top, #444444, #222222);background-image:linear-gradient(to bottom, #444444, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#222222;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#ffffff;background-color:#222222;*background-color:#151515;} .btn-inverse:active,.btn-inverse.active{background-color:#080808 \9;} button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px;}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0;} button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px;} button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px;} button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px;} .btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} .btn-link{border-color:transparent;cursor:pointer;color:#2e8aa5;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} .btn-link:hover,.btn-link:focus{color:#1d5869;text-decoration:underline;background-color:transparent;} .btn-link[disabled]:hover,.btn-link[disabled]:focus{color:#333333;text-decoration:none;} [class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat;margin-top:1px;} .icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:focus>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>li>a:focus>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:focus>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:focus>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png");} .icon-glass{background-position:0 0;} .icon-music{background-position:-24px 0;} .icon-search{background-position:-48px 0;} .icon-envelope{background-position:-72px 0;} .icon-heart{background-position:-96px 0;} .icon-star{background-position:-120px 0;} .icon-star-empty{background-position:-144px 0;} .icon-user{background-position:-168px 0;} .icon-film{background-position:-192px 0;} .icon-th-large{background-position:-216px 0;} .icon-th{background-position:-240px 0;} .icon-th-list{background-position:-264px 0;} .icon-ok{background-position:-288px 0;} .icon-remove{background-position:-312px 0;} .icon-zoom-in{background-position:-336px 0;} .icon-zoom-out{background-position:-360px 0;} .icon-off{background-position:-384px 0;} .icon-signal{background-position:-408px 0;} .icon-cog{background-position:-432px 0;} .icon-trash{background-position:-456px 0;} .icon-home{background-position:0 -24px;} .icon-file{background-position:-24px -24px;} .icon-time{background-position:-48px -24px;} .icon-road{background-position:-72px -24px;} .icon-download-alt{background-position:-96px -24px;} .icon-download{background-position:-120px -24px;} .icon-upload{background-position:-144px -24px;} .icon-inbox{background-position:-168px -24px;} .icon-play-circle{background-position:-192px -24px;} .icon-repeat{background-position:-216px -24px;} .icon-refresh{background-position:-240px -24px;} .icon-list-alt{background-position:-264px -24px;} .icon-lock{background-position:-287px -24px;} .icon-flag{background-position:-312px -24px;} .icon-headphones{background-position:-336px -24px;} .icon-volume-off{background-position:-360px -24px;} .icon-volume-down{background-position:-384px -24px;} .icon-volume-up{background-position:-408px -24px;} .icon-qrcode{background-position:-432px -24px;} .icon-barcode{background-position:-456px -24px;} .icon-tag{background-position:0 -48px;} .icon-tags{background-position:-25px -48px;} .icon-book{background-position:-48px -48px;} .icon-bookmark{background-position:-72px -48px;} .icon-print{background-position:-96px -48px;} .icon-camera{background-position:-120px -48px;} .icon-font{background-position:-144px -48px;} .icon-bold{background-position:-167px -48px;} .icon-italic{background-position:-192px -48px;} .icon-text-height{background-position:-216px -48px;} .icon-text-width{background-position:-240px -48px;} .icon-align-left{background-position:-264px -48px;} .icon-align-center{background-position:-288px -48px;} .icon-align-right{background-position:-312px -48px;} .icon-align-justify{background-position:-336px -48px;} .icon-list{background-position:-360px -48px;} .icon-indent-left{background-position:-384px -48px;} .icon-indent-right{background-position:-408px -48px;} .icon-facetime-video{background-position:-432px -48px;} .icon-picture{background-position:-456px -48px;} .icon-pencil{background-position:0 -72px;} .icon-map-marker{background-position:-24px -72px;} .icon-adjust{background-position:-48px -72px;} .icon-tint{background-position:-72px -72px;} .icon-edit{background-position:-96px -72px;} .icon-share{background-position:-120px -72px;} .icon-check{background-position:-144px -72px;} .icon-move{background-position:-168px -72px;} .icon-step-backward{background-position:-192px -72px;} .icon-fast-backward{background-position:-216px -72px;} .icon-backward{background-position:-240px -72px;} .icon-play{background-position:-264px -72px;} .icon-pause{background-position:-288px -72px;} .icon-stop{background-position:-312px -72px;} .icon-forward{background-position:-336px -72px;} .icon-fast-forward{background-position:-360px -72px;} .icon-step-forward{background-position:-384px -72px;} .icon-eject{background-position:-408px -72px;} .icon-chevron-left{background-position:-432px -72px;} .icon-chevron-right{background-position:-456px -72px;} .icon-plus-sign{background-position:0 -96px;} .icon-minus-sign{background-position:-24px -96px;} .icon-remove-sign{background-position:-48px -96px;} .icon-ok-sign{background-position:-72px -96px;} .icon-question-sign{background-position:-96px -96px;} .icon-info-sign{background-position:-120px -96px;} .icon-screenshot{background-position:-144px -96px;} .icon-remove-circle{background-position:-168px -96px;} .icon-ok-circle{background-position:-192px -96px;} .icon-ban-circle{background-position:-216px -96px;} .icon-arrow-left{background-position:-240px -96px;} .icon-arrow-right{background-position:-264px -96px;} .icon-arrow-up{background-position:-289px -96px;} .icon-arrow-down{background-position:-312px -96px;} .icon-share-alt{background-position:-336px -96px;} .icon-resize-full{background-position:-360px -96px;} .icon-resize-small{background-position:-384px -96px;} .icon-plus{background-position:-408px -96px;} .icon-minus{background-position:-433px -96px;} .icon-asterisk{background-position:-456px -96px;} .icon-exclamation-sign{background-position:0 -120px;} .icon-gift{background-position:-24px -120px;} .icon-leaf{background-position:-48px -120px;} .icon-fire{background-position:-72px -120px;} .icon-eye-open{background-position:-96px -120px;} .icon-eye-close{background-position:-120px -120px;} .icon-warning-sign{background-position:-144px -120px;} .icon-plane{background-position:-168px -120px;} .icon-calendar{background-position:-192px -120px;} .icon-random{background-position:-216px -120px;width:16px;} .icon-comment{background-position:-240px -120px;} .icon-magnet{background-position:-264px -120px;} .icon-chevron-up{background-position:-288px -120px;} .icon-chevron-down{background-position:-313px -119px;} .icon-retweet{background-position:-336px -120px;} .icon-shopping-cart{background-position:-360px -120px;} .icon-folder-close{background-position:-384px -120px;width:16px;} .icon-folder-open{background-position:-408px -120px;width:16px;} .icon-resize-vertical{background-position:-432px -119px;} .icon-resize-horizontal{background-position:-456px -118px;} .icon-hdd{background-position:0 -144px;} .icon-bullhorn{background-position:-24px -144px;} .icon-bell{background-position:-48px -144px;} .icon-certificate{background-position:-72px -144px;} .icon-thumbs-up{background-position:-96px -144px;} .icon-thumbs-down{background-position:-120px -144px;} .icon-hand-right{background-position:-144px -144px;} .icon-hand-left{background-position:-168px -144px;} .icon-hand-up{background-position:-192px -144px;} .icon-hand-down{background-position:-216px -144px;} .icon-circle-arrow-right{background-position:-240px -144px;} .icon-circle-arrow-left{background-position:-264px -144px;} .icon-circle-arrow-up{background-position:-288px -144px;} .icon-circle-arrow-down{background-position:-312px -144px;} .icon-globe{background-position:-336px -144px;} .icon-wrench{background-position:-360px -144px;} .icon-tasks{background-position:-384px -144px;} .icon-filter{background-position:-408px -144px;} .icon-briefcase{background-position:-432px -144px;} .icon-fullscreen{background-position:-456px -144px;} .btn-group{position:relative;display:inline-block;*display:inline;*zoom:1;font-size:0;vertical-align:middle;white-space:nowrap;*margin-left:.3em;z-index: 90; }.btn-group:first-child{*margin-left:0;} .btn-group+.btn-group{margin-left:5px;} .btn-toolbar{font-size:0;margin-top:10px;margin-bottom:10px;}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group{margin-left:5px;} .btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} .btn-group>.btn+.btn{margin-left:-1px;} .btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:12px;} .btn-group>.btn-mini{font-size:9px;} .btn-group>.btn-small{font-size:10.2px;} .btn-group>.btn-large{font-size:15px;} .btn-group>.btn:first-child{margin-left:0;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;} .btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;} .btn-group>.btn.large:first-child{margin-left:0;-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px;} .btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px;} .btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2;} .btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0;} .btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);*padding-top:5px;*padding-bottom:5px;} .btn-group>.btn-mini+.dropdown-toggle{padding-left:5px;padding-right:5px;*padding-top:2px;*padding-bottom:2px;} .btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px;} .btn-group>.btn-large+.dropdown-toggle{padding-left:12px;padding-right:12px;*padding-top:7px;*padding-bottom:7px;} .btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);} .btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6;} .btn-group.open .btn-primary.dropdown-toggle{background-color:#2e62a5;} .btn-group.open .btn-warning.dropdown-toggle{background-color:#ea8157;} .btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f;} .btn-group.open .btn-success.dropdown-toggle{background-color:#51a351;} .btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4;} .btn-group.open .btn-inverse.dropdown-toggle{background-color:#222222;} .btn .caret{margin-top:8px;margin-left:0;} .btn-large .caret{margin-top:6px;} .btn-large .caret{border-left-width:5px;border-right-width:5px;border-top-width:5px;} .btn-mini .caret,.btn-small .caret{margin-top:8px;} .dropup .btn-large .caret{border-bottom-width:5px;} .btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;} .btn-group-vertical{display:inline-block;*display:inline;*zoom:1;} .btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} .btn-group-vertical>.btn+.btn{margin-left:0;margin-top:-1px;} .btn-group-vertical>.btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;} .btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;} .btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0;} .btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;} .nav{margin-left:0;margin-bottom:20px;list-style:none;} .nav>li>a{display:block;} .nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eeeeee;} .nav>li>a>img{max-width:none;} .nav>.pull-right{float:right;} .nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999999;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);text-transform:uppercase;} .nav li+.nav-header{margin-top:9px;} .nav-list{padding-left:15px;padding-right:15px;margin-bottom:0;} .nav-list>li>a,.nav-list .nav-header{margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);} .nav-list>li>a{padding:3px 15px;} .nav-list>.active>a,.nav-list>.active>a:hover,.nav-list>.active>a:focus{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.2);background-color:#2e8aa5;} .nav-list [class^="icon-"],.nav-list [class*=" icon-"]{margin-right:2px;} .nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;} .nav-tabs,.nav-pills{*zoom:1;}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";line-height:0;} .nav-tabs:after,.nav-pills:after{clear:both;} .nav-tabs>li,.nav-pills>li{float:left;} .nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px;} .nav-tabs{border-bottom:1px solid #ddd;} .nav-tabs>li{margin-bottom:-1px;} .nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{border-color:#eeeeee #eeeeee #dddddd;} .nav-tabs>.active>a,.nav-tabs>.active>a:hover,.nav-tabs>.active>a:focus{color:#555555;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default;} .nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;} .nav-pills>.active>a,.nav-pills>.active>a:hover,.nav-pills>.active>a:focus{color:#ffffff;background-color:#2e8aa5;} .nav-stacked>li{float:none;} .nav-stacked>li>a{margin-right:0;} .nav-tabs.nav-stacked{border-bottom:0;} .nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} .nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;} .nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;} .nav-tabs.nav-stacked>li>a:hover,.nav-tabs.nav-stacked>li>a:focus{border-color:#ddd;z-index:2;} .nav-pills.nav-stacked>li>a{margin-bottom:3px;} .nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px;} .nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;} .nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;} .nav .dropdown-toggle .caret{border-top-color:#2e8aa5;border-bottom-color:#2e8aa5;margin-top:6px;} .nav .dropdown-toggle:hover .caret,.nav .dropdown-toggle:focus .caret{border-top-color:#1d5869;border-bottom-color:#1d5869;} .nav-tabs .dropdown-toggle .caret{margin-top:8px;} .nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff;} .nav-tabs .active .dropdown-toggle .caret{border-top-color:#555555;border-bottom-color:#555555;} .nav>.dropdown.active>a:hover,.nav>.dropdown.active>a:focus{cursor:pointer;} .nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover,.nav>li.dropdown.open.active>a:focus{color:#ffffff;background-color:#999999;border-color:#999999;} .nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret,.nav li.dropdown.open a:focus .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;opacity:1;filter:alpha(opacity=100);} .tabs-stacked .open>a:hover,.tabs-stacked .open>a:focus{border-color:#999999;} .tabbable{*zoom:1;}.tabbable:before,.tabbable:after{display:table;content:"";line-height:0;} .tabbable:after{clear:both;} .tab-content{overflow:auto;} .tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0;} .tab-content>.tab-pane,.pill-content>.pill-pane{display:none;} .tab-content>.active,.pill-content>.active{display:block;} .tabs-below>.nav-tabs{border-top:1px solid #ddd;} .tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0;} .tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}.tabs-below>.nav-tabs>li>a:hover,.tabs-below>.nav-tabs>li>a:focus{border-bottom-color:transparent;border-top-color:#ddd;} .tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover,.tabs-below>.nav-tabs>.active>a:focus{border-color:transparent #ddd #ddd #ddd;} .tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none;} .tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px;} .tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd;} .tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;} .tabs-left>.nav-tabs>li>a:hover,.tabs-left>.nav-tabs>li>a:focus{border-color:#eeeeee #dddddd #eeeeee #eeeeee;} .tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover,.tabs-left>.nav-tabs .active>a:focus{border-color:#ddd transparent #ddd #ddd;*border-right-color:#ffffff;} .tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd;} .tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;} .tabs-right>.nav-tabs>li>a:hover,.tabs-right>.nav-tabs>li>a:focus{border-color:#eeeeee #eeeeee #eeeeee #dddddd;} .tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover,.tabs-right>.nav-tabs .active>a:focus{border-color:#ddd #ddd #ddd transparent;*border-left-color:#ffffff;} .nav>.disabled>a{color:#999999;} .nav>.disabled>a:hover,.nav>.disabled>a:focus{text-decoration:none;background-color:transparent;cursor:default;} .navbar{overflow:visible;margin-bottom:20px;*position:relative;*z-index:2;} .navbar-inner{min-height:40px;padding-left:20px;padding-right:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top, #ffffff, #f2f2f2);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));background-image:-webkit-linear-gradient(top, #ffffff, #f2f2f2);background-image:-o-linear-gradient(top, #ffffff, #f2f2f2);background-image:linear-gradient(to bottom, #ffffff, #f2f2f2);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 4px rgba(0, 0, 0, 0.065);-moz-box-shadow:0 1px 4px rgba(0, 0, 0, 0.065);box-shadow:0 1px 4px rgba(0, 0, 0, 0.065);*zoom:1;}.navbar-inner:before,.navbar-inner:after{display:table;content:"";line-height:0;} .navbar-inner:after{clear:both;} .navbar .container{width:auto;} .nav-collapse.collapse{height:auto;overflow:visible;} .navbar .brand{float:left;display:block;padding:10px 20px 10px;margin-left:-20px;font-size:22px;font-weight:200;color:#000000;text-shadow:0 1px 0 #ffffff;}.navbar .brand:hover,.navbar .brand:focus{text-decoration:none;} .navbar-text{margin-bottom:0;line-height:40px;color:#777777;} .navbar-link{color:#777777;}.navbar-link:hover,.navbar-link:focus{color:#333333;} .navbar .divider-vertical{height:40px;margin:0 9px;border-left:1px solid #f2f2f2;border-right:1px solid #ffffff;} .navbar .btn,.navbar .btn-group{margin-top:5px;} .navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn,.navbar .input-prepend .btn-group,.navbar .input-append .btn-group{margin-top:0;} .navbar-form{margin-bottom:0;*zoom:1;}.navbar-form:before,.navbar-form:after{display:table;content:"";line-height:0;} .navbar-form:after{clear:both;} .navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px;} .navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0;} .navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px;} .navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap;}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0;} .navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0;}.navbar-search .search-query{margin-bottom:0;padding:4px 14px;font-family:Verdana,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;} .navbar-static-top{position:static;margin-bottom:0;}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} .navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0;} .navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px;} .navbar-fixed-bottom .navbar-inner{border-width:1px 0 0;} .navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-left:0;padding-right:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} .navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;} .navbar-fixed-top{top:0;} .navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,.1);box-shadow:0 1px 10px rgba(0,0,0,.1);} .navbar-fixed-bottom{bottom:0;}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,.1);box-shadow:0 -1px 10px rgba(0,0,0,.1);} .navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0;} .navbar .nav.pull-right{float:right;margin-right:0;} .navbar .nav>li{float:left;} .navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777777;text-decoration:none;text-shadow:0 1px 0 #ffffff;} .navbar .nav .dropdown-toggle .caret{margin-top:8px;} .navbar .nav>li>a:focus,.navbar .nav>li>a:hover{background-color:transparent;color:#333333;text-decoration:none;} .navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0, 0, 0, 0.125);-moz-box-shadow:inset 0 3px 8px rgba(0, 0, 0, 0.125);box-shadow:inset 0 3px 8px rgba(0, 0, 0, 0.125);} .navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#ededed;background-image:-moz-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));background-image:-webkit-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:-o-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:linear-gradient(to bottom, #f2f2f2, #e5e5e5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#e5e5e5;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#ffffff;background-color:#e5e5e5;*background-color:#d9d9d9;} .navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#cccccc \9;} .navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);-moz-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);} .btn-navbar .icon-bar+.icon-bar{margin-top:3px;} .navbar .nav>li>.dropdown-menu:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0, 0, 0, 0.2);position:absolute;top:-7px;left:9px;} .navbar .nav>li>.dropdown-menu:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #ffffff;position:absolute;top:-6px;left:10px;} .navbar-fixed-bottom .nav>li>.dropdown-menu:before{border-top:7px solid #ccc;border-top-color:rgba(0, 0, 0, 0.2);border-bottom:0;bottom:-7px;top:auto;} .navbar-fixed-bottom .nav>li>.dropdown-menu:after{border-top:6px solid #ffffff;border-bottom:0;bottom:-6px;top:auto;} .navbar .nav li.dropdown>a:hover .caret,.navbar .nav li.dropdown>a:focus .caret{border-top-color:#333333;border-bottom-color:#333333;} .navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{background-color:#e5e5e5;color:#555555;} .navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777777;border-bottom-color:#777777;} .navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555555;border-bottom-color:#555555;} .navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{left:auto;right:0;}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{left:auto;right:12px;} .navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{left:auto;right:13px;} .navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{left:auto;right:100%;margin-left:0;margin-right:-1px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px;} .navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top, #222222, #111111);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111));background-image:-webkit-linear-gradient(top, #222222, #111111);background-image:-o-linear-gradient(top, #222222, #111111);background-image:linear-gradient(to bottom, #222222, #111111);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);border-color:#252525;} .navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999999;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover,.navbar-inverse .brand:focus,.navbar-inverse .nav>li>a:focus{color:#ffffff;} .navbar-inverse .brand{color:#999999;} .navbar-inverse .navbar-text{color:#999999;} .navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{background-color:transparent;color:#ffffff;} .navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#ffffff;background-color:#111111;} .navbar-inverse .navbar-link{color:#999999;}.navbar-inverse .navbar-link:hover,.navbar-inverse .navbar-link:focus{color:#ffffff;} .navbar-inverse .divider-vertical{border-left-color:#111111;border-right-color:#222222;} .navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{background-color:#111111;color:#ffffff;} .navbar-inverse .nav li.dropdown>a:hover .caret,.navbar-inverse .nav li.dropdown>a:focus .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;} .navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999999;border-bottom-color:#999999;} .navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;} .navbar-inverse .navbar-search .search-query{color:#ffffff;background-color:#515151;border-color:#111111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none;}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#cccccc;} .navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#cccccc;} .navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#cccccc;} .navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333333;text-shadow:0 1px 0 #ffffff;background-color:#ffffff;border:0;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);outline:0;} .navbar-inverse .btn-navbar{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0e0e0e;background-image:-moz-linear-gradient(top, #151515, #040404);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404));background-image:-webkit-linear-gradient(top, #151515, #040404);background-image:-o-linear-gradient(top, #151515, #040404);background-image:linear-gradient(to bottom, #151515, #040404);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);border-color:#040404 #040404 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#040404;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#ffffff;background-color:#040404;*background-color:#000000;} .navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#12576B \9;} .breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.breadcrumb>li{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 0 #ffffff;}.breadcrumb>li>.divider{padding:0 5px;color:#ccc;} .breadcrumb>.active{color:#999999;} .pagination{margin:20px 0;} .pagination ul{display:inline-block;*display:inline;*zoom:1;margin-left:0;margin-bottom:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);} .pagination ul>li{display:inline;} .pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#ffffff;border:1px solid #dddddd;border-left-width:0;} .pagination ul>li>a:hover,.pagination ul>li>a:focus,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5;} .pagination ul>.active>a,.pagination ul>.active>span{color:#999999;cursor:default;} .pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>a:focus{color:#999999;background-color:transparent;cursor:default;} .pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;} .pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;} .pagination-centered{text-align:center;} .pagination-right{text-align:right;} .pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:15px;} .pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px;} .pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px;} .pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-top-left-radius:3px;-moz-border-radius-topleft:3px;border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-bottomleft:3px;border-bottom-left-radius:3px;} .pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;-moz-border-radius-topright:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;-moz-border-radius-bottomright:3px;border-bottom-right-radius:3px;} .pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:10.2px;} .pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:9px;} .pager{margin:20px 0;list-style:none;text-align:center;*zoom:1;}.pager:before,.pager:after{display:table;content:"";line-height:0;} .pager:after{clear:both;} .pager li{display:inline;} .pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;} .pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#f5f5f5;} .pager .next>a,.pager .next>span{float:right;} .pager .previous>a,.pager .previous>span{float:left;} .pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999999;background-color:#fff;cursor:default;} .thumbnails{margin-left:-20px;list-style:none;*zoom:1;}.thumbnails:before,.thumbnails:after{display:table;content:"";line-height:0;} .thumbnails:after{clear:both;} .row-fluid .thumbnails{margin-left:0;} .thumbnails>li{float:left;margin-bottom:20px;margin-left:20px;} .thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.055);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.055);box-shadow:0 1px 3px rgba(0, 0, 0, 0.055);-webkit-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;} a.thumbnail:hover,a.thumbnail:focus{border-color:#2e8aa5;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);} .thumbnail>img{display:block;max-width:100%;margin-left:auto;margin-right:auto;} .thumbnail .caption{padding:9px;color:#555555;} .alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} .alert,.alert h4{color:#c09853;} .alert h4{margin:0;} .alert .close{position:relative;top:-2px;right:-21px;line-height:20px;} .alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#468847;} .alert-success h4{color:#468847;} .alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;color:#b94a48;} .alert-danger h4,.alert-error h4{color:#b94a48;} .alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#3a87ad;} .alert-info h4{color:#3a87ad;} .alert-block{padding-top:14px;padding-bottom:14px;} .alert-block>p,.alert-block>ul{margin-bottom:0;} .alert-block p+p{margin-top:5px;} @-webkit-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-o-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f7f7f7;background-image:-moz-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));background-image:-webkit-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-o-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:linear-gradient(to bottom, #f5f5f5, #f9f9f9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} .progress .bar{width:0%;height:100%;color:#ffffff;float:left;font-size:12px;text-align:center;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top, #149bdf, #0480be);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));background-image:-webkit-linear-gradient(top, #149bdf, #0480be);background-image:-o-linear-gradient(top, #149bdf, #0480be);background-image:linear-gradient(to bottom, #149bdf, #0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width 0.6s ease;-moz-transition:width 0.6s ease;-o-transition:width 0.6s ease;transition:width 0.6s ease;} .progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);} .progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px;} .progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite;} .progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(to bottom, #ee5f5b, #c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0);} .progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} .progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(to bottom, #62c462, #57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0);} .progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} .progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(to bottom, #5bc0de, #339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0);} .progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} .progress-warning .bar,.progress .bar-warning{background-color:#efa080;background-image:-moz-linear-gradient(top, #f3b49b, #ea8157);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f3b49b), to(#ea8157));background-image:-webkit-linear-gradient(top, #f3b49b, #ea8157);background-image:-o-linear-gradient(top, #f3b49b, #ea8157);background-image:linear-gradient(to bottom, #f3b49b, #ea8157);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff3b49b', endColorstr='#ffea8157', GradientType=0);} .progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#f3b49b;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} .hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eeeeee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;color:inherit;letter-spacing:-1px;} .hero-unit li{line-height:30px;} .media,.media-body{overflow:hidden;*overflow:visible;zoom:1;} .media,.media .media{margin-top:15px;} .media:first-child{margin-top:0;} .media-object{display:block;} .media-heading{margin:0 0 5px;} .media>.pull-left{margin-right:10px;} .media>.pull-right{margin-left:10px;} .media-list{margin-left:0;list-style:none;} .tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0);}.tooltip.in{opacity:0.8;filter:alpha(opacity=80);} .tooltip.top{margin-top:-3px;padding:5px 0;} .tooltip.right{margin-left:3px;padding:0 5px;} .tooltip.bottom{margin-top:3px;padding:5px 0;} .tooltip.left{margin-left:-3px;padding:0 5px;} .tooltip-inner{max-width:200px;padding:8px;color:#ffffff;text-align:center;text-decoration:none;background-color:#000000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} .tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid;} .tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000000;} .tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000000;} .tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000000;} .tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000000;} .popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:500px;padding:1px;text-align:left;background-color:#ffffff;-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);white-space:normal;}.popover.top{margin-top:-10px;} .popover.right{margin-left:10px;} .popover.bottom{margin-top:10px;} .popover.left{margin-left:-10px;} .popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0;}.popover-title:empty{display:none;} .popover-content{padding:9px 14px;} .popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid;} .popover .arrow{border-width:11px;} .popover .arrow:after{border-width:10px;content:"";} .popover.top .arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0, 0, 0, 0.25);bottom:-11px;}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#ffffff;} .popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0, 0, 0, 0.25);}.popover.right .arrow:after{left:1px;bottom:-10px;border-left-width:0;border-right-color:#ffffff;} .popover.bottom .arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0, 0, 0, 0.25);top:-11px;}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#ffffff;} .popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0, 0, 0, 0.25);}.popover.left .arrow:after{right:1px;border-right-width:0;border-left-color:#ffffff;bottom:-10px;} .modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000000;}.modal-backdrop.fade{opacity:0;} .modal-backdrop,.modal-backdrop.fade.in{opacity:0.8;filter:alpha(opacity=80);} .modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#ffffff;border:1px solid #999;border:1px solid rgba(0, 0, 0, 0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;outline:none;}.modal.fade{-webkit-transition:opacity .3s linear, top .3s ease-out;-moz-transition:opacity .3s linear, top .3s ease-out;-o-transition:opacity .3s linear, top .3s ease-out;transition:opacity .3s linear, top .3s ease-out;top:-25%;} .modal.fade.in{top:10%;} .modal-header{padding:9px 15px;border-bottom:1px solid #eee;}.modal-header .close{margin-top:2px;} .modal-header h3{margin:0;line-height:30px;} .modal-body{position:relative;overflow-y:auto;max-height:400px;padding:15px;} .modal-form{margin-bottom:0;} .modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;*zoom:1;}.modal-footer:before,.modal-footer:after{display:table;content:"";line-height:0;} .modal-footer:after{clear:both;} .modal-footer .btn+.btn{margin-left:5px;margin-bottom:0;} .modal-footer .btn-group .btn+.btn{margin-left:-1px;} .modal-footer .btn-block+.btn-block{margin-left:0;} .dropup,.dropdown{position:relative;} .dropdown-toggle{*margin-bottom:-3px;} .dropdown-toggle:active,.open .dropdown-toggle{outline:0;} .caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000000;border-right:4px solid transparent;border-left:4px solid transparent;content:"";} .dropdown .caret{margin-top:8px;margin-left:2px;} .dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#ffffff;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;}.dropdown-menu.pull-right{right:0;left:auto;} .dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;} .dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#5f5555;white-space:nowrap;} .dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-submenu:hover>a,.dropdown-submenu:focus>a{text-decoration:none;color:#ffffff;background-color:#5a5050;background-image:-moz-linear-gradient(top, #5f5555, #524949);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5f5555), to(#524949));background-image:-webkit-linear-gradient(top, #5f5555, #524949);background-image:-o-linear-gradient(top, #5f5555, #524949);background-image:linear-gradient(to bottom, #5f5555, #524949);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5f5555', endColorstr='#ff524949', GradientType=0);} .dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#ffffff;text-decoration:none;outline:0;background-color:#2c839d;background-image:-moz-linear-gradient(top, #2e8aa5, #287991);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#2e8aa5), to(#287991));background-image:-webkit-linear-gradient(top, #2e8aa5, #287991);background-image:-o-linear-gradient(top, #2e8aa5, #287991);background-image:linear-gradient(to bottom, #2e8aa5, #287991);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff2e8aa5', endColorstr='#ff287991', GradientType=0);} .dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999999;} .dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);cursor:default;} .open{*z-index:1000;}.open>.dropdown-menu{display:block;} .dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990;} .pull-right>.dropdown-menu{right:0;left:auto;} .dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000000;content:"";} .dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px;} .dropdown-submenu{position:relative;} .dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px;} .dropdown-submenu:hover>.dropdown-menu{display:block;} .dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0;} .dropdown-submenu>a:after{display:block;content:" ";float:right;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#cccccc;margin-top:5px;margin-right:-10px;} .dropdown-submenu:hover>a:after{border-left-color:#ffffff;} .dropdown-submenu.pull-left{float:none;}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px;} .dropdown .dropdown-menu .nav-header{padding-left:20px;padding-right:20px;} .typeahead{z-index:1051;margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} .accordion{margin-bottom:20px;} .accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} .accordion-heading{border-bottom:0;} .accordion-heading .accordion-toggle{display:block;padding:8px 15px;} .accordion-toggle{cursor:pointer;} .accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5;} .well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);} .well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;} .well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} .close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20);}.close:hover,.close:focus{color:#000000;text-decoration:none;cursor:pointer;opacity:0.4;filter:alpha(opacity=40);} button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none;} .pull-right{float:right;} .pull-left{float:left;} .hide{display:none;} .show{display:block;} .invisible{visibility:hidden;} .affix{position:fixed;} .fade{opacity:0;-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;}.fade.in{opacity:1;} .collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height 0.35s ease;-moz-transition:height 0.35s ease;-o-transition:height 0.35s ease;transition:height 0.35s ease;}.collapse.in{height:auto;} @-ms-viewport{width:device-width;}.hidden{display:none;visibility:hidden;} .visible-phone{display:none !important;} .visible-tablet{display:none !important;} .hidden-desktop{display:none !important;} .visible-desktop{display:inherit !important;} @media (min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit !important;} .visible-desktop{display:none !important ;} .visible-tablet{display:inherit !important;} .hidden-tablet{display:none !important;}}@media (max-width:767px){.hidden-desktop{display:inherit !important;} .visible-desktop{display:none !important;} .visible-phone{display:inherit !important;} .hidden-phone{display:none !important;}}.visible-print{display:none !important;} @media print{.visible-print{display:inherit !important;} .hidden-print{display:none !important;}}@media (max-width:767px){body{padding-left:20px;padding-right:20px;} .navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-left:-20px;margin-right:-20px;} .container-fluid{padding:0;} .dl-horizontal dt{float:none;clear:none;width:auto;text-align:left;} .dl-horizontal dd{margin-left:0;} .container{width:auto;} .row-fluid{width:100%;} .row,.thumbnails{margin-left:0;} .thumbnails>li{float:none;margin-left:0;} [class*="span"],.uneditable-input[class*="span"],.row-fluid [class*="span"]{float:none;display:block;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} .span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} .row-fluid [class*="offset"]:first-child{margin-left:0;} .input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} .input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto;} .controls-row [class*="span"]+[class*="span"]{margin-left:0;} .modal{position:fixed;top:20px;left:20px;right:20px;width:auto;margin:0;}.modal.fade{top:-100px;} .modal.fade.in{top:20px;}}@media (max-width:480px){.nav-collapse{-webkit-transform:translate3d(0, 0, 0);} .page-header h1 small{display:block;line-height:20px;} input[type="checkbox"],input[type="radio"]{border:1px solid #ccc;} .form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left;} .form-horizontal .controls{margin-left:0;} .form-horizontal .control-list{padding-top:0;} .form-horizontal .form-actions{padding-left:10px;padding-right:10px;} .media .pull-left,.media .pull-right{float:none;display:block;margin-bottom:10px;} .media-object{margin-right:0;margin-left:0;} .modal{top:10px;left:10px;right:10px;} .modal-header .close{padding:10px;margin:-10px;} .carousel-caption{position:static;}}@media (min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";line-height:0;} .row:after{clear:both;} [class*="span"]{float:left;min-height:1px;margin-left:20px;} .container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px;} .span12{width:724px;} .span11{width:662px;} .span10{width:600px;} .span9{width:538px;} .span8{width:476px;} .span7{width:414px;} .span6{width:352px;} .span5{width:290px;} .span4{width:228px;} .span3{width:166px;} .span2{width:104px;} .span1{width:42px;} .offset12{margin-left:764px;} .offset11{margin-left:702px;} .offset10{margin-left:640px;} .offset9{margin-left:578px;} .offset8{margin-left:516px;} .offset7{margin-left:454px;} .offset6{margin-left:392px;} .offset5{margin-left:330px;} .offset4{margin-left:268px;} .offset3{margin-left:206px;} .offset2{margin-left:144px;} .offset1{margin-left:82px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0;} .row-fluid:after{clear:both;} .row-fluid [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;} .row-fluid [class*="span"]:first-child{margin-left:0;} .row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.7624309392265194%;} .row-fluid .span12{width:100%;*width:99.94680851063829%;} .row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%;} .row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%;} .row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%;} .row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%;} .row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%;} .row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%;} .row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%;} .row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%;} .row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%;} .row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%;} .row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%;} .row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%;} .row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%;} .row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%;} .row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%;} .row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%;} .row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%;} .row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%;} .row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%;} .row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%;} .row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%;} .row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%;} .row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%;} .row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%;} .row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%;} .row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%;} .row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%;} .row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%;} .row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%;} .row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%;} .row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%;} .row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%;} .row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%;} .row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%;} .row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%;} input,textarea,.uneditable-input{margin-left:0;} .controls-row [class*="span"]+[class*="span"]{margin-left:20px;} input.span12,textarea.span12,.uneditable-input.span12{width:710px;} input.span11,textarea.span11,.uneditable-input.span11{width:648px;} input.span10,textarea.span10,.uneditable-input.span10{width:586px;} input.span9,textarea.span9,.uneditable-input.span9{width:524px;} input.span8,textarea.span8,.uneditable-input.span8{width:462px;} input.span7,textarea.span7,.uneditable-input.span7{width:400px;} input.span6,textarea.span6,.uneditable-input.span6{width:338px;} input.span5,textarea.span5,.uneditable-input.span5{width:276px;} input.span4,textarea.span4,.uneditable-input.span4{width:214px;} input.span3,textarea.span3,.uneditable-input.span3{width:152px;} input.span2,textarea.span2,.uneditable-input.span2{width:90px;} input.span1,textarea.span1,.uneditable-input.span1{width:28px;}}@media (min-width:1200px){.row{margin-left:-30px;*zoom:1;}.row:before,.row:after{display:table;content:"";line-height:0;} .row:after{clear:both;} [class*="span"]{float:left;min-height:1px;margin-left:30px;} .container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px;} .span12{width:1170px;} .span11{width:1070px;} .span10{width:970px;} .span9{width:870px;} .span8{width:770px;} .span7{width:670px;} .span6{width:570px;} .span5{width:470px;} .span4{width:370px;} .span3{width:270px;} .span2{width:170px;} .span1{width:70px;} .offset12{margin-left:1230px;} .offset11{margin-left:1130px;} .offset10{margin-left:1030px;} .offset9{margin-left:930px;} .offset8{margin-left:830px;} .offset7{margin-left:730px;} .offset6{margin-left:630px;} .offset5{margin-left:530px;} .offset4{margin-left:430px;} .offset3{margin-left:330px;} .offset2{margin-left:230px;} .offset1{margin-left:130px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0;} .row-fluid:after{clear:both;} .row-fluid [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;} .row-fluid [class*="span"]:first-child{margin-left:0;} .row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.564102564102564%;} .row-fluid .span12{width:100%;*width:99.94680851063829%;} .row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%;} .row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%;} .row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%;} .row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%;} .row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%;} .row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%;} .row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%;} .row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%;} .row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%;} .row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%;} .row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%;} .row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%;} .row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%;} .row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%;} .row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%;} .row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%;} .row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%;} .row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%;} .row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%;} .row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%;} .row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%;} .row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%;} .row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%;} .row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%;} .row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%;} .row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%;} .row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%;} .row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%;} .row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%;} .row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%;} .row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%;} .row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%;} .row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%;} .row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%;} .row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%;} input,textarea,.uneditable-input{margin-left:0;} .controls-row [class*="span"]+[class*="span"]{margin-left:30px;} input.span12,textarea.span12,.uneditable-input.span12{width:1156px;} input.span11,textarea.span11,.uneditable-input.span11{width:1056px;} input.span10,textarea.span10,.uneditable-input.span10{width:956px;} input.span9,textarea.span9,.uneditable-input.span9{width:856px;} input.span8,textarea.span8,.uneditable-input.span8{width:756px;} input.span7,textarea.span7,.uneditable-input.span7{width:656px;} input.span6,textarea.span6,.uneditable-input.span6{width:556px;} input.span5,textarea.span5,.uneditable-input.span5{width:456px;} input.span4,textarea.span4,.uneditable-input.span4{width:356px;} input.span3,textarea.span3,.uneditable-input.span3{width:256px;} input.span2,textarea.span2,.uneditable-input.span2{width:156px;} input.span1,textarea.span1,.uneditable-input.span1{width:56px;} .thumbnails{margin-left:-30px;} .thumbnails>li{margin-left:30px;} .row-fluid .thumbnails{margin-left:0;}}@media (max-width:979px){body{padding-top:0;} .navbar-fixed-top,.navbar-fixed-bottom{position:static;} .navbar-fixed-top{margin-bottom:20px;} .navbar-fixed-bottom{margin-top:20px;} .navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px;} .navbar .container{width:auto;padding:0;} .navbar .brand{padding-left:10px;padding-right:10px;margin:0 0 0 -5px;} .nav-collapse{clear:both;} .nav-collapse .nav{float:none;margin:0 0 10px;} .nav-collapse .nav>li{float:none;} .nav-collapse .nav>li>a{margin-bottom:2px;} .nav-collapse .nav>.divider-vertical{display:none;} .nav-collapse .nav .nav-header{color:#777777;text-shadow:none;} .nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} .nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} .nav-collapse .dropdown-menu li+li a{margin-bottom:2px;} .nav-collapse .nav>li>a:hover,.nav-collapse .nav>li>a:focus,.nav-collapse .dropdown-menu a:hover,.nav-collapse .dropdown-menu a:focus{background-color:#f2f2f2;} .navbar-inverse .nav-collapse .nav>li>a,.navbar-inverse .nav-collapse .dropdown-menu a{color:#999999;} .navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .nav>li>a:focus,.navbar-inverse .nav-collapse .dropdown-menu a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:focus{background-color:#111111;} .nav-collapse.in .btn-group{margin-top:5px;padding:0;} .nav-collapse .dropdown-menu{position:static;top:auto;left:auto;float:none;display:none;max-width:none;margin:0 15px;padding:0;background-color:transparent;border:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} .nav-collapse .open>.dropdown-menu{display:block;} .nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none;} .nav-collapse .dropdown-menu .divider{display:none;} .nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none;} .nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);} .navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111111;border-bottom-color:#111111;} .navbar .nav-collapse .nav.pull-right{float:none;margin-left:0;} .nav-collapse,.nav-collapse.collapse{overflow:hidden;height:0;} .navbar .btn-navbar{display:block;} .navbar-static .navbar-inner{padding-left:10px;padding-right:10px;}}@media (min-width:980px){.nav-collapse.collapse{height:auto !important;overflow:visible !important;}} /*! * Bootstrap Responsive v2.3.2 * * Copyright 2012 Twitter, Inc * Licensed under the Apache License v2.0 * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world @twitter by @mdo and @fat. */ .clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@-ms-viewport{width:device-width}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}.visible-desktop{display:inherit!important}@media(min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media(max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:inherit!important}.hidden-print{display:none!important}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:30px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.564102564102564%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%}.row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%}.row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%}.row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%}.row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%}.row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%}.row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%}.row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%}.row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%}.row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%}.row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%}.row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%}.row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%}.row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%}.row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%}.row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%}.row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%}.row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%}.row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%}.row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%}.row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%}.row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%}.row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%}.row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%}.row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%}.row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%}.row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%}.row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%}.row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%}.row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%}.row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%}.row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%}.row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%}.row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%}.row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:30px}input.span12,textarea.span12,.uneditable-input.span12{width:1156px}input.span11,textarea.span11,.uneditable-input.span11{width:1056px}input.span10,textarea.span10,.uneditable-input.span10{width:956px}input.span9,textarea.span9,.uneditable-input.span9{width:856px}input.span8,textarea.span8,.uneditable-input.span8{width:756px}input.span7,textarea.span7,.uneditable-input.span7{width:656px}input.span6,textarea.span6,.uneditable-input.span6{width:556px}input.span5,textarea.span5,.uneditable-input.span5{width:456px}input.span4,textarea.span4,.uneditable-input.span4{width:356px}input.span3,textarea.span3,.uneditable-input.span3{width:256px}input.span2,textarea.span2,.uneditable-input.span2{width:156px}input.span1,textarea.span1,.uneditable-input.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.7624309392265194%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:710px}input.span11,textarea.span11,.uneditable-input.span11{width:648px}input.span10,textarea.span10,.uneditable-input.span10{width:586px}input.span9,textarea.span9,.uneditable-input.span9{width:524px}input.span8,textarea.span8,.uneditable-input.span8{width:462px}input.span7,textarea.span7,.uneditable-input.span7{width:400px}input.span6,textarea.span6,.uneditable-input.span6{width:338px}input.span5,textarea.span5,.uneditable-input.span5{width:276px}input.span4,textarea.span4,.uneditable-input.span4{width:214px}input.span3,textarea.span3,.uneditable-input.span3{width:152px}input.span2,textarea.span2,.uneditable-input.span2{width:90px}input.span1,textarea.span1,.uneditable-input.span1{width:28px}}@media(max-width:979px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}[class*="span"],.uneditable-input[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="offset"]:first-child{margin-left:0}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.controls-row [class*="span"]+[class*="span"]{margin-left:0}.modal{position:fixed;top:20px;right:20px;left:20px;width:auto;margin:0}.modal.fade{top:-100px}.modal.fade.in{top:20px}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.media .pull-left,.media .pull-right{display:block;float:none;margin-bottom:10px}.media-object{margin-right:0;margin-left:0}.modal{top:10px;right:10px;left:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}} WRFILE: fontawesome.css /*! * Font Awesome 3.1.0 * the iconic font designed for Bootstrap * ------------------------------------------------------- * The full suite of pictographic icons, examples, and documentation * can be found at: http://fontawesome.io * * License * ------------------------------------------------------- * - The Font Awesome font is licensed under the SIL Open Font License v1.1 - * http://scripts.sil.org/OFL * - Font Awesome CSS, LESS, and SASS files are licensed under the MIT License - * http://opensource.org/licenses/mit-license.html * - Font Awesome documentation licensed under CC BY 3.0 License - * http://creativecommons.org/licenses/by/3.0/ * - Attribution is no longer required in Font Awesome 3.0, but much appreciated: * "Font Awesome by Dave Gandy - http://fontawesome.io" * Contact * ------------------------------------------------------- * Email: dave@fontawesome.io * Twitter: http://twitter.com/fortaweso_me * Work: Lead Product Designer @ http://kyruus.com */ @font-face{font-family:'FontAwesome'; src:url('font/fontawesome-webfont.eot?v=3.1.0'); src:url("data:font/opentype;charset=utf-8;base64,T1RUTwAJAIAAAwAQQ0ZGIIgPTLEAAA0cAADkqk9TLzKSboDVAAABAAAAAGBjbWFwYSUx7AAABLwAAAJsaGVhZP/LNjYAAACcAAAANmhoZWENgwf0AAAA1AAAACRobXR4vmwNkgAABygAAAXUbWF4cAF2UAAAAAD4AAAABm5hbWWfVdNsAAABYAAAA1lwb3N0/30AWgAADPwAAAAgAAEAAAADAIMXjfXEXw889QADBwAAAAAAy1SCMAAAAADN3WqL///+/weBBgEAAAADAAIAAAAAAAAAAQAABgD/AAAAB4D/////B4EAAQAAAAAAAAAAAAAAAAAAAXQAAFAAAXYAAAADBgUBkAAFAAQEjAQzAAAAhgSMBDMAAAJzAFoEMwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABweXJzAEAAIPUABgD/AAAABYABjwAAAAEAAAAABwAHAAAgACAAAAAAABUBAgABAAAAAAAAABkAAAABAAAAAAABAAsAGQABAAAAAAADABEAJAABAAAAAAAEAAsAGQABAAAAAAAFABIANQABAAAAAAAGAAsAGQABAAAAAAAHAFEARwABAAAAAAAIAAwAmAABAAAAAAAJAAoApAABAAAAAAALABUArgADAAEECQAAADIAwwADAAEECQABABYA9QADAAEECQACAA4BCwADAAEECQADACIBGQADAAEECQAEABYA9QADAAEECQAFACQBOwADAAEECQAGABYA9QADAA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nBsL+9QHJB0LFfcQHQv91Af7MwscBcAGC/dUBp0LoHYBiwv7i4MdCx6ZHU4KCxv7uVb77/t2+zYLBtwdCwZDCh8LwB75VPMdC/cJCgYL9xT3IB0L9xTwCgv3FAHnHQv7X/cY+0n3YvsJC3KBc3l5Hvsn+yYL/B38HQv7lPcUCxz7QAYLch0VCwAA") format("truetype"); font-weight:normal;font-style:normal}[class^="icon-"],[class*=" icon-"]{font-family:FontAwesome;font-weight:normal;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;*margin-right:.3em}[class^="icon-"]:before,[class*=" icon-"]:before{text-decoration:inherit;display:inline-block;speak:none}.icon-large:before{vertical-align:-10%;font-size:1.3333333333333333em}a [class^="icon-"],a [class*=" icon-"],a [class^="icon-"]:before,a [class*=" icon-"]:before{display:inline}[class^="icon-"].icon-fixed-width,[class*=" icon-"].icon-fixed-width{display:inline-block;width:1.2857142857142858em;text-align:center}[class^="icon-"].icon-fixed-width.icon-large,[class*=" icon-"].icon-fixed-width.icon-large{width:1.5714285714285714em}ul.icons-ul{list-style-type:none;text-indent:-0.7142857142857143em;margin-left:2.142857142857143em}ul.icons-ul>li .icon-li{width:.7142857142857143em;display:inline-block;text-align:center}[class^="icon-"].hide,[class*=" icon-"].hide{display:none}.icon-muted{color:#eee}.icon-light{color:#fff}.icon-dark{color:#333}.icon-border{border:solid 1px #eee;padding:.2em .25em .15em;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.icon-2x{font-size:2em}.icon-2x.icon-border{border-width:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.icon-3x{font-size:3em}.icon-3x.icon-border{border-width:3px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.icon-4x{font-size:4em}.icon-4x.icon-border{border-width:4px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.icon-5x{font-size:5em}.icon-5x.icon-border{border-width:5px;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.pull-right{float:right}.pull-left{float:left}[class^="icon-"].pull-left,[class*=" icon-"].pull-left{margin-right:.3em}[class^="icon-"].pull-right,[class*=" icon-"].pull-right{margin-left:.3em}[class^="icon-"],[class*=" icon-"]{display:inline;width:auto;height:auto;line-height:normal;vertical-align:baseline;background-image:none;background-position:0 0;background-repeat:repeat;margin-top:0}.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"]{background-image:none}.btn [class^="icon-"].icon-large,.nav [class^="icon-"].icon-large,.btn [class*=" icon-"].icon-large,.nav [class*=" icon-"].icon-large{line-height:.9em}.btn [class^="icon-"].icon-spin,.nav [class^="icon-"].icon-spin,.btn [class*=" icon-"].icon-spin,.nav [class*=" icon-"].icon-spin{display:inline-block}.nav-tabs [class^="icon-"],.nav-pills [class^="icon-"],.nav-tabs [class*=" icon-"],.nav-pills [class*=" icon-"],.nav-tabs [class^="icon-"].icon-large,.nav-pills [class^="icon-"].icon-large,.nav-tabs [class*=" icon-"].icon-large,.nav-pills [class*=" icon-"].icon-large{line-height:.9em}.btn [class^="icon-"].pull-left.icon-2x,.btn [class*=" icon-"].pull-left.icon-2x,.btn [class^="icon-"].pull-right.icon-2x,.btn [class*=" icon-"].pull-right.icon-2x{margin-top:.18em}.btn [class^="icon-"].icon-spin.icon-large,.btn [class*=" icon-"].icon-spin.icon-large{line-height:.8em}.btn.btn-small [class^="icon-"].pull-left.icon-2x,.btn.btn-small [class*=" icon-"].pull-left.icon-2x,.btn.btn-small [class^="icon-"].pull-right.icon-2x,.btn.btn-small [class*=" icon-"].pull-right.icon-2x{margin-top:.25em}.btn.btn-large [class^="icon-"],.btn.btn-large [class*=" icon-"]{margin-top:0}.btn.btn-large [class^="icon-"].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x,.btn.btn-large [class^="icon-"].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-top:.05em}.btn.btn-large [class^="icon-"].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x{margin-right:.2em}.btn.btn-large [class^="icon-"].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-left:.2em}.icon-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:-35%}.icon-stack [class^="icon-"],.icon-stack [class*=" icon-"]{display:block;text-align:center;position:absolute;width:100%;height:100%;font-size:1em;line-height:inherit;*line-height:2em}.icon-stack .icon-stack-base{font-size:2em;*line-height:1em}.icon-spin{display:inline-block;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.icon-rotate-90:before{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1)}.icon-rotate-180:before{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2)}.icon-rotate-270:before{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3)}.icon-flip-horizontal:before{-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.icon-flip-vertical:before{-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}.icon-glass:before{content:"\f000"}.icon-music:before{content:"\f001"}.icon-search:before{content:"\f002"}.icon-envelope:before{content:"\f003"}.icon-heart:before{content:"\f004"}.icon-star:before{content:"\f005"}.icon-star-empty:before{content:"\f006"}.icon-user:before{content:"\f007"}.icon-film:before{content:"\f008"}.icon-th-large:before{content:"\f009"}.icon-th:before{content:"\f00a"}.icon-th-list:before{content:"\f00b"}.icon-ok:before{content:"\f00c"}.icon-remove:before{content:"\f00d"}.icon-zoom-in:before{content:"\f00e"}.icon-zoom-out:before{content:"\f010"}.icon-off:before{content:"\f011"}.icon-signal:before{content:"\f012"}.icon-cog:before{content:"\f013"}.icon-trash:before{content:"\f014"}.icon-home:before{content:"\f015"}.icon-file:before{content:"\f016"}.icon-time:before{content:"\f017"}.icon-road:before{content:"\f018"}.icon-download-alt:before{content:"\f019"}.icon-download:before{content:"\f01a"}.icon-upload:before{content:"\f01b"}.icon-inbox:before{content:"\f01c"}.icon-play-circle:before{content:"\f01d"}.icon-repeat:before,.icon-rotate-right:before{content:"\f01e"}.icon-refresh:before{content:"\f021"}.icon-list-alt:before{content:"\f022"}.icon-lock:before{content:"\f023"}.icon-flag:before{content:"\f024"}.icon-headphones:before{content:"\f025"}.icon-volume-off:before{content:"\f026"}.icon-volume-down:before{content:"\f027"}.icon-volume-up:before{content:"\f028"}.icon-qrcode:before{content:"\f029"}.icon-barcode:before{content:"\f02a"}.icon-tag:before{content:"\f02b"}.icon-tags:before{content:"\f02c"}.icon-book:before{content:"\f02d"}.icon-bookmark:before{content:"\f02e"}.icon-print:before{content:"\f02f"}.icon-camera:before{content:"\f030"}.icon-font:before{content:"\f031"}.icon-bold:before{content:"\f032"}.icon-italic:before{content:"\f033"}.icon-text-height:before{content:"\f034"}.icon-text-width:before{content:"\f035"}.icon-align-left:before{content:"\f036"}.icon-align-center:before{content:"\f037"}.icon-align-right:before{content:"\f038"}.icon-align-justify:before{content:"\f039"}.icon-list:before{content:"\f03a"}.icon-indent-left:before{content:"\f03b"}.icon-indent-right:before{content:"\f03c"}.icon-facetime-video:before{content:"\f03d"}.icon-picture:before{content:"\f03e"}.icon-pencil:before{content:"\f040"}.icon-map-marker:before{content:"\f041"}.icon-adjust:before{content:"\f042"}.icon-tint:before{content:"\f043"}.icon-edit:before{content:"\f044"}.icon-share:before{content:"\f045"}.icon-check:before{content:"\f046"}.icon-move:before{content:"\f047"}.icon-step-backward:before{content:"\f048"}.icon-fast-backward:before{content:"\f049"}.icon-backward:before{content:"\f04a"}.icon-play:before{content:"\f04b"}.icon-pause:before{content:"\f04c"}.icon-stop:before{content:"\f04d"}.icon-forward:before{content:"\f04e"}.icon-fast-forward:before{content:"\f050"}.icon-step-forward:before{content:"\f051"}.icon-eject:before{content:"\f052"}.icon-chevron-left:before{content:"\f053"}.icon-chevron-right:before{content:"\f054"}.icon-plus-sign:before{content:"\f055"}.icon-minus-sign:before{content:"\f056"}.icon-remove-sign:before{content:"\f057"}.icon-ok-sign:before{content:"\f058"}.icon-question-sign:before{content:"\f059"}.icon-info-sign:before{content:"\f05a"}.icon-screenshot:before{content:"\f05b"}.icon-remove-circle:before{content:"\f05c"}.icon-ok-circle:before{content:"\f05d"}.icon-ban-circle:before{content:"\f05e"}.icon-arrow-left:before{content:"\f060"}.icon-arrow-right:before{content:"\f061"}.icon-arrow-up:before{content:"\f062"}.icon-arrow-down:before{content:"\f063"}.icon-share-alt:before,.icon-mail-forward:before{content:"\f064"}.icon-resize-full:before{content:"\f065"}.icon-resize-small:before{content:"\f066"}.icon-plus:before{content:"\f067"}.icon-minus:before{content:"\f068"}.icon-asterisk:before{content:"\f069"}.icon-exclamation-sign:before{content:"\f06a"}.icon-gift:before{content:"\f06b"}.icon-leaf:before{content:"\f06c"}.icon-fire:before{content:"\f06d"}.icon-eye-open:before{content:"\f06e"}.icon-eye-close:before{content:"\f070"}.icon-warning-sign:before{content:"\f071"}.icon-plane:before{content:"\f072"}.icon-calendar:before{content:"\f073"}.icon-random:before{content:"\f074"}.icon-comment:before{content:"\f075"}.icon-magnet:before{content:"\f076"}.icon-chevron-up:before{content:"\f077"}.icon-chevron-down:before{content:"\f078"}.icon-retweet:before{content:"\f079"}.icon-shopping-cart:before{content:"\f07a"}.icon-folder-close:before{content:"\f07b"}.icon-folder-open:before{content:"\f07c"}.icon-resize-vertical:before{content:"\f07d"}.icon-resize-horizontal:before{content:"\f07e"}.icon-bar-chart:before{content:"\f080"}.icon-twitter-sign:before{content:"\f081"}.icon-facebook-sign:before{content:"\f082"}.icon-camera-retro:before{content:"\f083"}.icon-key:before{content:"\f084"}.icon-cogs:before{content:"\f085"}.icon-comments:before{content:"\f086"}.icon-thumbs-up:before{content:"\f087"}.icon-thumbs-down:before{content:"\f088"}.icon-star-half:before{content:"\f089"}.icon-heart-empty:before{content:"\f08a"}.icon-signout:before{content:"\f08b"}.icon-linkedin-sign:before{content:"\f08c"}.icon-pushpin:before{content:"\f08d"}.icon-external-link:before{content:"\f08e"}.icon-signin:before{content:"\f090"}.icon-trophy:before{content:"\f091"}.icon-github-sign:before{content:"\f092"}.icon-upload-alt:before{content:"\f093"}.icon-lemon:before{content:"\f094"}.icon-phone:before{content:"\f095"}.icon-check-empty:before{content:"\f096"}.icon-bookmark-empty:before{content:"\f097"}.icon-phone-sign:before{content:"\f098"}.icon-twitter:before{content:"\f099"}.icon-facebook:before{content:"\f09a"}.icon-github:before{content:"\f09b"}.icon-unlock:before{content:"\f09c"}.icon-credit-card:before{content:"\f09d"}.icon-rss:before{content:"\f09e"}.icon-hdd:before{content:"\f0a0"}.icon-bullhorn:before{content:"\f0a1"}.icon-bell:before{content:"\f0a2"}.icon-certificate:before{content:"\f0a3"}.icon-hand-right:before{content:"\f0a4"}.icon-hand-left:before{content:"\f0a5"}.icon-hand-up:before{content:"\f0a6"}.icon-hand-down:before{content:"\f0a7"}.icon-circle-arrow-left:before{content:"\f0a8"}.icon-circle-arrow-right:before{content:"\f0a9"}.icon-circle-arrow-up:before{content:"\f0aa"}.icon-circle-arrow-down:before{content:"\f0ab"}.icon-globe:before{content:"\f0ac"}.icon-wrench:before{content:"\f0ad"}.icon-tasks:before{content:"\f0ae"}.icon-filter:before{content:"\f0b0"}.icon-briefcase:before{content:"\f0b1"}.icon-fullscreen:before{content:"\f0b2"}.icon-group:before{content:"\f0c0"}.icon-link:before{content:"\f0c1"}.icon-cloud:before{content:"\f0c2"}.icon-beaker:before{content:"\f0c3"}.icon-cut:before{content:"\f0c4"}.icon-copy:before{content:"\f0c5"}.icon-paper-clip:before{content:"\f0c6"}.icon-save:before{content:"\f0c7"}.icon-sign-blank:before{content:"\f0c8"}.icon-reorder:before{content:"\f0c9"}.icon-list-ul:before{content:"\f0ca"}.icon-list-ol:before{content:"\f0cb"}.icon-strikethrough:before{content:"\f0cc"}.icon-underline:before{content:"\f0cd"}.icon-table:before{content:"\f0ce"}.icon-magic:before{content:"\f0d0"}.icon-truck:before{content:"\f0d1"}.icon-pinterest:before{content:"\f0d2"}.icon-pinterest-sign:before{content:"\f0d3"}.icon-google-plus-sign:before{content:"\f0d4"}.icon-google-plus:before{content:"\f0d5"}.icon-money:before{content:"\f0d6"}.icon-caret-down:before{content:"\f0d7"}.icon-caret-up:before{content:"\f0d8"}.icon-caret-left:before{content:"\f0d9"}.icon-caret-right:before{content:"\f0da"}.icon-columns:before{content:"\f0db"}.icon-sort:before{content:"\f0dc"}.icon-sort-down:before{content:"\f0dd"}.icon-sort-up:before{content:"\f0de"}.icon-envelope-alt:before{content:"\f0e0"}.icon-linkedin:before{content:"\f0e1"}.icon-undo:before,.icon-rotate-left:before{content:"\f0e2"}.icon-legal:before{content:"\f0e3"}.icon-dashboard:before{content:"\f0e4"}.icon-comment-alt:before{content:"\f0e5"}.icon-comments-alt:before{content:"\f0e6"}.icon-bolt:before{content:"\f0e7"}.icon-sitemap:before{content:"\f0e8"}.icon-umbrella:before{content:"\f0e9"}.icon-paste:before{content:"\f0ea"}.icon-lightbulb:before{content:"\f0eb"}.icon-exchange:before{content:"\f0ec"}.icon-cloud-download:before{content:"\f0ed"}.icon-cloud-upload:before{content:"\f0ee"}.icon-user-md:before{content:"\f0f0"}.icon-stethoscope:before{content:"\f0f1"}.icon-suitcase:before{content:"\f0f2"}.icon-bell-alt:before{content:"\f0f3"}.icon-coffee:before{content:"\f0f4"}.icon-food:before{content:"\f0f5"}.icon-file-alt:before{content:"\f0f6"}.icon-building:before{content:"\f0f7"}.icon-hospital:before{content:"\f0f8"}.icon-ambulance:before{content:"\f0f9"}.icon-medkit:before{content:"\f0fa"}.icon-fighter-jet:before{content:"\f0fb"}.icon-beer:before{content:"\f0fc"}.icon-h-sign:before{content:"\f0fd"}.icon-plus-sign-alt:before{content:"\f0fe"}.icon-double-angle-left:before{content:"\f100"}.icon-double-angle-right:before{content:"\f101"}.icon-double-angle-up:before{content:"\f102"}.icon-double-angle-down:before{content:"\f103"}.icon-angle-left:before{content:"\f104"}.icon-angle-right:before{content:"\f105"}.icon-angle-up:before{content:"\f106"}.icon-angle-down:before{content:"\f107"}.icon-desktop:before{content:"\f108"}.icon-laptop:before{content:"\f109"}.icon-tablet:before{content:"\f10a"}.icon-mobile-phone:before{content:"\f10b"}.icon-circle-blank:before{content:"\f10c"}.icon-quote-left:before{content:"\f10d"}.icon-quote-right:before{content:"\f10e"}.icon-spinner:before{content:"\f110"}.icon-circle:before{content:"\f111"}.icon-reply:before,.icon-mail-reply:before{content:"\f112"}.icon-folder-close-alt:before{content:"\f114"}.icon-folder-open-alt:before{content:"\f115"}.icon-expand-alt:before{content:"\f116"}.icon-collapse-alt:before{content:"\f117"}.icon-smile:before{content:"\f118"}.icon-frown:before{content:"\f119"}.icon-meh:before{content:"\f11a"}.icon-gamepad:before{content:"\f11b"}.icon-keyboard:before{content:"\f11c"}.icon-flag-alt:before{content:"\f11d"}.icon-flag-checkered:before{content:"\f11e"}.icon-terminal:before{content:"\f120"}.icon-code:before{content:"\f121"}.icon-reply-all:before{content:"\f122"}.icon-mail-reply-all:before{content:"\f122"}.icon-star-half-full:before,.icon-star-half-empty:before{content:"\f123"}.icon-location-arrow:before{content:"\f124"}.icon-crop:before{content:"\f125"}.icon-code-fork:before{content:"\f126"}.icon-unlink:before{content:"\f127"}.icon-question:before{content:"\f128"}.icon-info:before{content:"\f129"}.icon-exclamation:before{content:"\f12a"}.icon-superscript:before{content:"\f12b"}.icon-subscript:before{content:"\f12c"}.icon-eraser:before{content:"\f12d"}.icon-puzzle-piece:before{content:"\f12e"}.icon-microphone:before{content:"\f130"}.icon-microphone-off:before{content:"\f131"}.icon-shield:before{content:"\f132"}.icon-calendar-empty:before{content:"\f133"}.icon-fire-extinguisher:before{content:"\f134"}.icon-rocket:before{content:"\f135"}.icon-maxcdn:before{content:"\f136"}.icon-chevron-sign-left:before{content:"\f137"}.icon-chevron-sign-right:before{content:"\f138"}.icon-chevron-sign-up:before{content:"\f139"}.icon-chevron-sign-down:before{content:"\f13a"}.icon-html5:before{content:"\f13b"}.icon-css3:before{content:"\f13c"}.icon-anchor:before{content:"\f13d"}.icon-unlock-alt:before{content:"\f13e"}.icon-bullseye:before{content:"\f140"}.icon-ellipsis-horizontal:before{content:"\f141"}.icon-ellipsis-vertical:before{content:"\f142"}.icon-rss-sign:before{content:"\f143"}.icon-play-sign:before{content:"\f144"}.icon-ticket:before{content:"\f145"}.icon-minus-sign-alt:before{content:"\f146"}.icon-check-minus:before{content:"\f147"}.icon-level-up:before{content:"\f148"}.icon-level-down:before{content:"\f149"}.icon-check-sign:before{content:"\f14a"}.icon-edit-sign:before{content:"\f14b"}.icon-external-link-sign:before{content:"\f14c"}.icon-share-sign:before{content:"\f14d"} /*Art is code*/ body { background-color:#cdd5da; background: -webkit-linear-gradient( bottom, #cdd5da, #e8e7e7); background: -moz-linear-gradient( bottom, #cdd5da, #e8e7e7); background: -ms-linear-gradient( bottom, #cdd5da, #e8e7e7); background: -o-linear-gradient( bottom, #cdd5da, #e8e7e7); background: linear-gradient( to bottom, #cdd5da, #e8e7e7); } ul.nav li.dropdown:hover ul.dropdown-menu{ display: block; } ul.nav li.dropdown ul.dropdown-menu{ margin: 0; } .navbar-inner { border-radius:0; } #pgbadger-brand { font-size: 1.1em; font-weight: bold; } .popover-content, .popover-title { color:#333; } h3.popover-title { font-weight: bold; font-size: 1.1em; } ul#slides li { list-style-type: none; } h1 { font-size: 2em; } h2 { font-size: 1.6em; } h3, h3 small { font-size: 1.1em; text-transform: uppercase; letter-spacing: .1em; } h3 small { font-size: 1em; } .analysis-item { background: #fff; margin: 2em 0; padding: 2em 0; } .analysis-item h2 { margin: 1em 0 .5em 1em; } h3 { margin: 0; padding: 0; color: #5f5555; } h1.page-header { margin: 1em 0 1em 0; padding: 0; color: #5f5555; border-bottom: none; } h2 { color:#5f5555; } .nav-pills, .nav-tabs { margin: 0 1em; } footer { margin-top: 60px; } .span8 .tabbable { margin-top: 1em; } #global-stats .tab-content { margin: 2em 0 3em 0; } #global-stats .tab-content li { display: block; width:14%; /*160/960*/ float:left; margin-left: 3%; } #global-stats .tab-content li.first { margin-left: 0; } .well { background: #f9f9f9; border-radius: 0; } .key-figures ul { margin: 0; padding: 0; } .key-figures li { list-style-type: none; margin-bottom: 2em; } .figure { font-weight: bold; font-size: 1.4em; color:#2e8aa5; } .figure-label { display: block; color: #666; } .mouse-figures { font-weight: bold; font-size: 1.2em; margin: 0; padding: 0; } .mfigure { font-weight: bold; font-size: 1.4em; color:#d26115; } .smfigure { font-weight: bold; font-size: 1.1em; color:#d26115; } .mfigure small { font-weight: bold; font-size: 0.6em; color:#ffffff; } .smfigure small { font-weight: bold; font-size: 0.6em; color:#ffffff; } .hfigure { font-weight: bold; font-size: 1.0em; color:#8dbd0f; } .hfigure small { font-weight: bold; font-size: 0.6em; color:#ffffff; } .navbar-inverse .navbar-inner { background: #5f5555; border: none; } .navbar-inverse .brand, .navbar-inverse .nav > li > a { color:#eee; } #queriespersecond_graph, #connectionspersecond_graph, #sessionspersecond_graph, #selectqueries_graph, #writequeries_graph, #durationqueries_graph, #checkpointwritebuffers_graph, #checkpointfiles_graph, #temporarydata_graph, #temporaryfile_graph, #autovacuum_graph, #bindpreparequeries_graph, #cancelledqueries_graph, #eventspersecond_graph { width : 100%; height: 400px; } .linegraph width : 100%; height: 400px; } #queriesbytype_graph, #lockbytype_graph, #databasesessions_graph, #usersessions_graph, #hostsessions_graph, #appsessions_graph, #databaseconnections_graph, #userconnections_graph, #hostconnections_graph, #logstype_graph, #tableanalyzes_graph, #tablevacuums_graph, #tuplevacuums_graph, #pagevacuums_graph, #queriesbydatabase_graph, #queriesbyapplication_graph, #queriesbyuser_graph, #queriesbyhost_graph, #histogram_query_times_graph, #histogram_session_times_graph, #durationbyuser_graph { width : 100%; height: 320px; } .piegraph { width : 100%; height: 320px; } .histo-graph { width : 100%; height: 140px; } .duration-histo-graph { width : 100%; height: 300px; } @media (min-width:969px) { #show-hide-menu { position: absolute; left: -9999px; } .navbar ul.collapse { overflow: visible; } } @media (max-width:968px) { #show-hide-menu { position: inherit; } #global-stats .tab-content li { display: block; width:auto; /*160/960*/ float:none; margin-left: 0; margin-bottom: 1em; } ul#slides { margin: 0; padding: 0; } ul#slides li div div { padding:0 1.5em; } #queriespersecond_graph, #connectionspersecond_graph, #sessionspersecond_graph, #selectqueries_graph, #writequeries_graph, #durationqueries_graph, #checkpointwritebuffers_graph, #checkpointfiles_graph, #temporarydata_graph, #temporaryfile_graph, #autovacuum_graph, #bindpreparequeries_graph, #cancelledqueries_graph, #eventspersecond_graph { width : 94.5%; } .linegraph { width : 94.5%; } #queriesbytype_graph, #lockbytype_graph, #databasesessions_graph, #usersessions_graph, #hostsessions_graph, #appsessions_graph, #databaseconnections_graph, #userconnections_graph, #hostconnections_graph, #logstype_graph, #tableanalyzes_graph, #tablevacuums_graph, #tuplevacuums_graph, #pagevacuums_graph, #queriesbydatabase_graph, #queriesbyapplication_graph, #queriesbyuser_graph, #queriesbyhost_graph, #histogram_query_times_graph, #histogram_session_times_graph, #durationbyuser_graph { width : 94.5%; } .piegraph { width : 94.5%; } .histo-graph { width : 84.5%; } .duration-histo-graph { width : 94.5%; } .key-figures ul { margin-top: 1.5em; } .navbar .nav { margin: 0 3em 2em 3em; } .navbar .nav > li { float: none; } .navbar ul.collapse:hover { overflow: visible; } } WRFILE: jquery.js (function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write(""),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t
     '+(e.label||String.fromCharCode(65+t))+"
    a",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="
    t
    ",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="
    ",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;ti.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="
    ",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="

    ",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t0)for(i=r;i=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*\s*$/g,Nt={option:[1,""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X
    ","
    "]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1>");try{for(;r1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]===""&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("
    ").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window); WRFILE: bootstrap.js /* * Bootstrap.js by @fat & @mdo * Copyright 2012 Twitter, Inc. * http://www.apache.org/licenses/LICENSE-2.0.txt */ !function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o;i.carousel(s),(o=n.attr("data-slide-to"))&&i.data("carousel").pause().to(o).cycle(),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning||this.$element.hasClass("in"))return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning||!this.$element.hasClass("in"))return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=e.extend({},e.fn.collapse.defaults,r.data(),typeof n=="object"&&n);i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function r(){e(".dropdown-backdrop").remove(),e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=n&&e(n);if(!r||!r.length)r=t.parent();return r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||("ontouchstart"in document.documentElement&&e('