From b84e1ed5f26304a039231e9b201bd0263eedf255 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 19 Jun 2012 15:17:53 -0700 Subject: [PATCH] doc: document usage log Modify radosgw, radosgw-admin man page Signed-off-by: Yehuda Sadeh --- doc/man/8/radosgw-admin.rst | 16 +++++++++++++++- doc/man/8/radosgw.rst | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/doc/man/8/radosgw-admin.rst b/doc/man/8/radosgw-admin.rst index d2e248918136a..78a14fc121f3f 100644 --- a/doc/man/8/radosgw-admin.rst +++ b/doc/man/8/radosgw-admin.rst @@ -46,6 +46,12 @@ Commands :command:`log show` Show the log of a bucket (with a specified date) +:command:`usage show` + Show the usage information (with optional user and date range) + +:command:`usage trim` + Trim usage information (with optional user and date range) + Options ======= @@ -86,7 +92,15 @@ Options .. option:: --date=yyyy-mm-dd - The date need for some commands + The date needed for some commands + +.. option:: --start-date=yyyy-mm-dd + + The start date needed for some commands + +.. option:: --end-date=yyyy-mm-dd + + The end date needed for some commands .. option:: --os-user=group:name diff --git a/doc/man/8/radosgw.rst b/doc/man/8/radosgw.rst index 197c41ee25069..66ab2fc4a15b5 100644 --- a/doc/man/8/radosgw.rst +++ b/doc/man/8/radosgw.rst @@ -97,6 +97,37 @@ Now you can start Apache and the radosgw daemon:: /etc/init.d/apache2 start /etc/init.d/radosgw start +Usage Logging +============= + +The **radosgw** maintains an asynchronous usage log. It accumulates +statistics about user operations and flushes it periodically. The +logs can be accessed and managed through **radosgw-admin**. + +The information that is being logged contains total data transfr, +total operations, and total successful operations. The data is being +accounted under the bucket owner, unless the operation was done on +the service (e.g., when listing a bucket) in which case it is +accounted under the operating user. + +Following is an example configuration:: + + [client.radosgw.gateway] + rgw enable usage log = true + rgw usage log tick interval = 30 + rgw usage log flush threshold = 1024 + rgw usage max shards = 32 + rgw usage max user shards = 1 + + +The total number of shards determines how many total objects hold the +usage log information. The per-user number of shards specify how many +objects hold usage information for a single user. The tick interval +configures the number of seconds between log flushes, and the flush +threshold specify how many entries can be kept before resorting to +synchronous flush. + + Availability ============ @@ -109,3 +140,4 @@ See also ======== :doc:`ceph `\(8) +:doc:`radosgw-admin `\(8) -- 2.39.5