View the download volume of objects in a bucket from the OSS console or from the Simple Log Service (SLS) console. The method that you choose determines whether you can rank objects by outbound traffic and how far back you can query.
Choose a query method
The following table compares the three methods that report the download volume of objects in a bucket.
| Method | What you can view | Query time range | Prerequisites |
| OSS console statistics page | Outbound traffic and page views (PV) per object. Sorting by column is not supported. | The last 7 days. The time picker supports a maximum span of 7 days. | None |
| Simple Log Service dashboard | The PV of objects in the bucket and other access information. | Determined by the log retention period that you configure. | Real-time log query enabled for the bucket |
| Real-time log query with SQL (Recommended for ranking) | Objects ranked by outbound traffic. | Determined by the log retention period that you configure. | Real-time log query enabled for the bucket |
Both Simple Log Service methods require that real-time log query is enabled for the bucket. Real-time log query ships OSS access logs to Simple Log Service, where the log retention period is configurable. As a result, you can query access data that is older than 7 days. For instructions, see Enable real-time log query.
View the outbound traffic and PV of objects by using the OSS console
Log on to the OSS console.
Click Buckets, and then click the name of the target bucket.
In the left-side navigation pane, choose Data Usage > Object Access Statistics.
On the Object Access Statistics page, view the outbound traffic and page views (PV) of objects in the bucket.
The Object Access Statistics page does not support sorting by column. To rank objects by outbound traffic, or to query a longer time range, see Rank objects by outbound traffic by using a real-time log query.
View the PV of objects on a dashboard in the SLS console
Log on to the Simple Log Service console.
In the Projects section, click the project that is automatically created when you enable real-time log query for the bucket.
In the left-side navigation pane, choose Dashboard > Dashboard List.
On the Dashboard page, view information such as the PV of objects in the bucket.
Rank objects by outbound traffic by using a real-time log query
Use a SQL statement to rank the objects in a bucket by object-level outbound traffic. Run this query from the OSS console, not from the Simple Log Service console.
Log on to the OSS console and go to the details page of the target bucket.
In the left-side navigation pane, choose Log Management > Real-time Query.
Enter the following statement in the query box:
* and __topic__: oss_access_log and bucket: examplebucket and operation: GetObject | select object, sum(response_body_length) as total_size group by object order by total_size desc limit 100Replace
examplebucketwith the name of your bucket.
The query results are sorted in descending order by total_size, the total outbound traffic of each object in bytes. The limit 100 clause returns the 100 objects that have the highest outbound traffic.