Appearance
php artisan top — real-time monitoring of a Laravel site, page by page
A campaign email went out ten minutes ago. Is the site holding up? Pulse will tell you in an hour, in averages. Telescope will tell you tomorrow which request was slow. Right now, you want what top gives a server administrator: a screen that refreshes every second and says what is going on at this moment.
Laravel Top is that screen for a Laravel application. php artisan top shows requests per second with their average duration and memory, database queries per second, cache hits and misses, and the twenty busiest routes, averaged over the last five seconds and refreshed as you watch. Its counters live in Redis for a few seconds, so the figures come from every server of the site at once.
On a CMS it has one blind spot. Every page of the site goes through one route, so the "busiest routes" table is one line long: the whole site. kitloom/top brings Top in and fixes that, and a few other things a live site needs.
The pages, by template
A request of a page is listed under the template it was drawn with, the way the template hierarchy names it and the way Pulse already names the slow pages:
| On the screen | The page |
|---|---|
front-page | The home page |
single-product, single-post, single-book | One record of the type |
taxonomy-product_cat, category, tag | A term's archive |
search | The search results |
404 | Nothing found |
cached page | A page the page cache answered: no template was resolved |
The admin's screens and the site's own endpoints keep Top's own name, their route: /admin/posts/{record}/edit, /livewire/update, /wp-json/…. So during that campaign you see that the product pages take 160 ms and the search 190, that the category archive is the one eating the database, and that 404 has a surprising number of requests per second — someone linked the wrong address.
Ask the agent
With kitloom/ai connected, an agent whose user may watch the site calls top_snapshot:
- "Is the site under load right now?"
- "Which pages are the busiest at this moment, and how slow are they?"
- "Is the cache being hit, or is everything missing?"
The tool turns recording on, waits the five seconds Top averages over, and answers with the same figures and the same page names. Top records only while someone watches, so the reading costs the site five seconds of counting and nothing before or after. The agent then opens Pulse for the history, or the page inspector for the one page that stands out. How to connect one: Run your site from Claude or Cursor.
In the admin, and without Redis
The Top section of the Filament admin has a Live screen: the same boxes and the same table, refreshed every two seconds while it is open, for whoever has no terminal at hand. In Nova the section says where things stand; the live screen there is the terminal.
The section's badge says what the site can do: ready when Redis answers, watching while someone runs php artisan top or has the Live screen open, no Redis client or Redis is down when it cannot record. Top alone would make every request fail on the one Redis call it makes to learn whether top is running; here a site without Redis serves as before, and the badge, the terminal and the agent say in words what is missing and what to set.
Top, Pulse, Telescope, the inspector
| Tool | Shows | For |
|---|---|---|
| Top | The last five seconds, live | What the site is doing right now |
| Pulse | Totals and averages over hours and days | How the site does in general |
| Telescope | Each recorded request, query and job, one by one | Why one thing went wrong |
kitloom:inspect | One page: its queries, what it read, why it is slow | Making one page faster |
Top sees HTTP requests only; queue jobs and console commands are not counted.
For a Laravel developer
It is leventcz/laravel-top as it is (MIT, PHP 8.2+, Redis, pcntl in the console). The module wraps Top's Repository contract: a request is named before it is saved, the Redis repository is made on first use, and a failure to reach Redis becomes a TopUnavailable with words — except where a request is being served, where nothing fails. The name comes from kitloom/site's MainQueryResolved event, kept per request, Octane included. name_pages: false in config/kitloom-top.php leaves Top's own names; Top's own config/top.php keeps the connection and the recording mode. Everything is in the guide.
Watch it
Try it
Open a sandbox in one click, with no sign-up: Filament or Nova. Every detail of the module is in the Top guide.