# \# of Top Clients (Total & Blocked)

**URL:** <https://discourse.pi-hole.net/t/of-top-clients-total-blocked/41841>\
**Category:** Community Help\
**Created:** [December 20, 2020, 1:19pm UTC](https://discourse.pi-hole.net/t/of-top-clients-total-blocked/41841 "2020-12-20T13:19:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jockesve](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jockesve/32/59_2.png) [@jockesve](https://discourse.pi-hole.net/u/jockesve)\
**Post date:** [December 20, 2020, 1:19pm UTC](https://discourse.pi-hole.net/t/of-top-clients-total-blocked/41841/1 "2020-12-20T13:19:37Z")

</div>

Hi!

I'm trying to increase number of shown Top Clients (both Total & Blocked) to 25 without success...  
I found some old(ish) guides but couldn't get these to work.  
Anyone who could point out where this change should be done.

All help appreciated!

---

<div class="post-metadata">

**Author:** ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)\
**Post date:** [December 20, 2020, 8:25pm UTC](https://discourse.pi-hole.net/t/of-top-clients-total-blocked/41841/2 "2020-12-20T20:25:58Z")

</div>

This should help you:

> [@Change TOP Clients from default 10 to 20](https://discourse.pi-hole.net/t/change-top-clients-from-default-10-to-20/8935/4):
>
> The code section @ramset quoted is from the legacy API (purely PHP, no FTL) which is not used since over one year and is subject to be removed rather sooner than later. You could change it either where it is requested: [https://github.com/pi-hole/AdminLTE/blob/master/scripts/pi-hole/js/index.js#L415](https://github.com/pi-hole/AdminLTE/blob/master/scripts/pi-hole/js/index.js#L415) where you would put $.getJSON("api.php?summaryRaw&getQuerySources=20", function(data) { or where it is sent to FTL: [https://github.com/pi-hole/AdminLTE/blob/master/api\_FTL.php#L146](https://github.com/pi-hole/AdminLTE/blob/master/api_FTL.php#L146) I'd recomm…

**But beware:** changing the local pihole web interface code might prevent your installation from any further pihole update.

---

<div class="post-metadata">

**Author:** ![jockesve](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jockesve/32/59_2.png) [@jockesve](https://discourse.pi-hole.net/u/jockesve)\
**Post date:** [December 21, 2020, 6:41am UTC](https://discourse.pi-hole.net/t/of-top-clients-total-blocked/41841/3 "2020-12-21T06:41:37Z")

</div>

Sorry but I'm not following.  
It's possible but if modified, this might block future updates??  
That doesn't sound so wise then...

Any plans/possibilities to add this to Web-GUI to be either selectable via 3-4 predefined values (10, 25, 50) or "scroll wheel" (0-99)?

---

<div class="post-metadata">

**Author:** ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)\
**Post date:** [December 21, 2020, 12:49pm UTC](https://discourse.pi-hole.net/t/of-top-clients-total-blocked/41841/4 "2020-12-21T12:49:14Z")

</div>

> [@jockesve](#):
>
> Sorry but I'm not following.  
> It's possible but if modified, this might block future updates??

Exactly. If you modify pihole's code, any future update might break.

> [@jockesve](#):
>
> Any plans/possibilities to add this to Web-GUI to be either selectable via 3-4 predefined values (10, 25, 50) or "scroll wheel" (0-99)?

Not that I'm aware of. You can create a feature request if you like. There is already a similar one, but it only requests to list "all clients"

> [@Option to 'Show all clients'](https://discourse.pi-hole.net/t/option-to-show-all-clients/9076):
>
> Hi, It would be very useful to have a button or option to display all clients. Maybe it's already there, but I can't find it! At the moment I see the top ten, but how do I find out about all the others that are not listed. An option to show all clients would be very useful tracking down things.

---

<div class="post-metadata">

**Author:** ![jfb](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jfb/32/4332_2.png) [@jfb](https://discourse.pi-hole.net/u/jfb)\
**Post date:** [December 21, 2020, 2:42pm UTC](https://discourse.pi-hole.net/t/of-top-clients-total-blocked/41841/5 "2020-12-21T14:42:15Z")

</div>

As an alternate method of obtaining the data (pending your new feature request) there are some example command line entries that will query the long term database:

**top clients for the past 24 hours**

`echo ">top-clients (25) >quit" | nc localhost 4711`

**top blocked domains (limited to 25 in this instance) for the past 24 hours**

`sqlite3 /etc/pihole/pihole-FTL.db "select domain, count(domain) from queries where timestamp>=strftime('%s','now')-86400 group by domain order by count(domain) desc Limit 25"`

---

<div class="post-metadata">

**Author:** ![jockesve](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jockesve/32/59_2.png) [@jockesve](https://discourse.pi-hole.net/u/jockesve)\
**Post date:** [December 21, 2020, 3:13pm UTC](https://discourse.pi-hole.net/t/of-top-clients-total-blocked/41841/6 "2020-12-21T15:13:01Z")

</div>

Ty, but I'm using the gui as my primary interface.  
Better overview and visually more likable.

---

<div class="post-metadata">

**Author:** ![system](https://discourse.pi-hole.net/uploads/default/original/3X/7/c/7c8792f649eeb921c5d2b4c41564ffa873d9a2b8.png) [@system](https://discourse.pi-hole.net/u/system)\
**Post date:** [January 11, 2021, 3:13pm UTC](https://discourse.pi-hole.net/t/of-top-clients-total-blocked/41841/7 "2021-01-11T15:13:02Z")

</div>

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
