[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間: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: 15.7.0keyboard_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)."]]