[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[[["\u003cp\u003ePostgreSQL's cumulative statistics system gathers and reports on server activity.\u003c/p\u003e\n"],["\u003cp\u003eServer activity data is stored in system tables accessible via SQL queries.\u003c/p\u003e\n"],["\u003cp\u003eYou can monitor buffer cache usage by tracking \u003ccode\u003eblks_hit\u003c/code\u003e and \u003ccode\u003eblks_read\u003c/code\u003e values.\u003c/p\u003e\n"],["\u003cp\u003eDetailed information about the cumulative statistics system is in the PostgreSQL documentation.\u003c/p\u003e\n"]]],[],null,["# Generate a server activity report\n\nSelect a documentation version: Current (16.8.0)keyboard_arrow_down\n\n- [Current (16.8.0)](/alloydb/omni/current/docs/generate-server-activity-report-reference)\n- [16.8.0](/alloydb/omni/16.8.0/docs/generate-server-activity-report-reference)\n- [16.3.0](/alloydb/omni/16.3.0/docs/generate-server-activity-report-reference)\n- [15.12.0](/alloydb/omni/15.12.0/docs/generate-server-activity-report-reference)\n- [15.7.1](/alloydb/omni/15.7.1/docs/generate-server-activity-report-reference)\n- [15.7.0](/alloydb/omni/15.7.0/docs/generate-server-activity-report-reference)\n\n\u003cbr /\u003e\n\nTo generate a server activity report, you can use the PostgreSQL cumulative statistics system to collect and report information about server activity. The server activity information is exposed as system tables, which can be accessed using SQL queries.\n\n\u003cbr /\u003e\n\nFor example, the query reports the number of disk blocks found in the buffer cache and number of disk blocks read from disk: \n\n SELECT blks_hit, blks_read FROM pg_stat_database;\n\nBy observing the values of these counters over time, you can infer whether the database is making good use of the buffer cache.\n\nThe PostgreSQL documentation has more information about this [cumulative statistics system](https://www.postgresql.org/docs/15/monitoring-stats.html)."]]