sizetop
Show the 20 largest homepage and PHP responses in the web server access log, with size, host, and request
- Command:
/go/sizetop - Category: Traffic and logs
- Arguments: None
- Output: A table of up to 20 rows
- Last updated: 2026-11-21
On this page: Overview · Quick start · Syntax · Output · Examples · Troubleshooting · Details · See also
Overview
/go/sizetop finds the biggest responses your server has sent. It reads the access log and lists the 20 largest responses to:
- requests for a site's homepage (
GET /) - requests for any PHP file
Use it to find pages or scripts that send a lot of data, such as a script that exports a huge file, a page that is much heavier than it should be, or a URL that bots keep downloading and that is using your bandwidth.
It shows the largest single responses. It does not add up the traffic of each page or visitor. For totals per visitor or per request, see iptop and httptop.
Quick start
/go/sizetop
Syntax
/go/sizetop
The command takes no arguments. Anything you type after it is ignored, and is only written to /var/log/go/sizetop.log together with a timestamp.
Output
The command prints a header and up to 20 rows, largest first.
SIZE HOST REQUEST
------------ ------------------------- ------------------------------------
12.48 MB example.com GET /download.php?id=7 HTTP/1.1
3.20 MB shop.example.net GET /export.php HTTP/1.1
845.12 KB example.com GET / HTTP/1.1
512 B blog.example.org GET /ping.php HTTP/1.1
The values above are only an illustration.
| Column | Meaning |
|---|---|
SIZE |
Bytes sent in the response, shown as MB, KB, or B. |
HOST |
The host name of the site that answered. |
REQUEST |
The request line: the method, the URL, and the protocol. |
Size units
Sizes use multiples of 1024, even though the labels are KB and MB.
| Shown as | Bytes |
|---|---|
B |
Less than 1,024 |
KB |
1,024 up to 1,048,575 |
MB |
1,048,576 and above |
If nothing in the log matches, only the header is printed.
Examples
# Show the 20 largest responses
/go/sizetop
# Keep only one site (this filters the 20 rows already shown, it does not search deeper)
/go/sizetop | grep example.com
# Review recent calls
tail /var/log/go/sizetop.log
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Only the header is shown | The log has no homepage or PHP requests, or its format doesn't match what the command expects. | Check the access log format. See Details. |
| The command hangs and prints nothing | The access log path could not be found, so awk is waiting for input. |
Press Ctrl+C, then check the web server and log settings. |
| Images, videos, or zip downloads are missing | Only homepage and PHP requests are listed. | Search the access log directly for other file types. |
| A site you expect is missing | Its responses are smaller than the top 20, or it uses a different log. | Run /go/sizetop | grep <site> only helps within the top 20. Look in the log itself for more. |
| The same URL appears several times | The responses differ in size. | Expected. Only identical lines are combined. |
| Sizes look smaller than the file | The size is the data actually sent, which may be compressed. | Expected. |
Details
What it does
- Records the call in
/var/log/go/sizetop.log. - Finds the access log path with GoAdmio's
LOGhelper from/go/function. - Reads the whole access log and keeps a line only if its request contains
GET / HTTPor.php. - Takes the size, host, and request from each kept line.
- Sorts by size, largest first, and removes identical repeated lines.
- Keeps the first 20 and prints them with sizes converted to
B,KB, orMB.
flowchart TD
A["sizetop"] --> B["Find the access log"]
B --> C["Keep homepage and .php requests"]
C --> D["Sort by size, largest first"]
D --> E["Remove identical lines, keep the top 20"]
E --> F["Print with B, KB, or MB"]
Log format
The access log uses | between its fields. The command reads three of them by position:
| Field | Used as |
|---|---|
| 2 | Host |
| 10 | Size in bytes |
| 11 | Request |
If the web server's log format changes, the columns will be wrong or empty, with no error message.
What is included
| Request | Listed? |
|---|---|
GET / HTTP/1.1 (a site's homepage) |
Yes |
Any request with .php in it, including POST requests and URLs with .php in the query |
Yes |
| Images, CSS, JavaScript, videos, downloads, and other static files | No |
Limits
- The whole log is read each time, so it can be slow on a very large log.
- There is no date, time, or site filter, and the number of rows can't be changed.
- Only the current access log is read. Older, rotated logs are not (see
logrotate).
See also
| Command | Description |
|---|---|
httptop |
Watch the most frequent recent HTTP requests from the access log in a live terminal view |
iptop |
Report the busiest IPs by request count and block floods and bot networks |
posttop |
Report IPs sending the most POST requests and block POST floods |
404top |
Report IPs causing the most 404 errors and block scanners and probes |
ddos |
Report the busiest IP addresses in the access log and block those that exceed a request limit |
bots |
Report bot visits from the access log |
usertop |
Check recent visitors per domain |
bandwidth |
Calculate each domain's monthly bandwidth usage |
logrotate |
Configure daily or default log rotation for Apache and Nginx |