# Pihole.log for specific device in Web Interface

**URL:** <https://discourse.pi-hole.net/t/pihole-log-for-specific-device-in-web-interface/59589>\
**Category:** Feature Requests\
**Tags:** logs\
**Created:** [December 1, 2022, 10:41am UTC](https://discourse.pi-hole.net/t/pihole-log-for-specific-device-in-web-interface/59589 "2022-12-01T10:41:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lukas\_4596](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/lukas_4596/32/11002_2.png) [@Lukas\_4596](https://discourse.pi-hole.net/u/Lukas_4596)\
**Post date:** [December 1, 2022, 10:41am UTC](https://discourse.pi-hole.net/t/pihole-log-for-specific-device-in-web-interface/59589/1 "2022-12-01T10:41:40Z")

</div>

I would found it useful if you can select a device (for example IP-Address or MAC-Address) for the "Tail pihole.log" feature only, so you don't get the traffic for all devices in the network.

Greetings

---

<div class="post-metadata">

**Author:** ![chrislph](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/chrislph/32/32723_2.png) [@chrislph](https://discourse.pi-hole.net/u/chrislph)\
**Post date:** [December 2, 2022, 7:30pm UTC](https://discourse.pi-hole.net/t/pihole-log-for-specific-device-in-web-interface/59589/5 "2022-12-02T19:30:06Z")

</div>

I think the _ **Tools \> Tail pihole.log** _ feature is available in the web admin interface as a convenience. It might be useful to be able to filter this with a text box on the same page, but the cleanest way to do this is to tail and filter from the command line, which on Pi OS can be done with the command below, with that last text part being for example a device's IP address.

```
sudo tail -f /var/log/pihole.log | grep text_you_want_to_match

```

---

<div class="post-metadata">

**Author:** ![Lukas\_4596](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/lukas_4596/32/11002_2.png) [@Lukas\_4596](https://discourse.pi-hole.net/u/Lukas_4596)\
**Post date:** [December 2, 2022, 8:46pm UTC](https://discourse.pi-hole.net/t/pihole-log-for-specific-device-in-web-interface/59589/6 "2022-12-02T20:46:30Z")

</div>

Thanks for the info!

---

<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 3, 2022, 9:30am UTC](https://discourse.pi-hole.net/t/pihole-log-for-specific-device-in-web-interface/59589/7 "2022-12-03T09:30:07Z")

</div>

For convenience we built in such a function in `pihole`

`pihole -t [arg]`

```auto
  -t, tail [arg] View the live output of the Pi-hole log.
                      Add an optional argument to filter the log
                      (regular expressions are supported)

```

---

<div class="post-metadata">

**Author:** ![chrislph](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/chrislph/32/32723_2.png) [@chrislph](https://discourse.pi-hole.net/u/chrislph)\
**Post date:** [December 3, 2022, 6:58pm UTC](https://discourse.pi-hole.net/t/pihole-log-for-specific-device-in-web-interface/59589/8 "2022-12-03T18:58:48Z")

</div>

This is the best way as the text colouring helps pick things out and the irrelevant dnsmasq text is removed. I've used `pihole -t` before but found it missed things during busy activity (eg when loading an amazon site and filtering for amazon, or when running dnsleaktest and filtering for leak). But I think I might have been piping `pihole -t` through `grep` rather than using the built-in arg. I just tried it now and it worked great with nothing dropped.

---

<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:** [June 1, 2023, 6:59pm UTC](https://discourse.pi-hole.net/t/pihole-log-for-specific-device-in-web-interface/59589/9 "2023-06-01T18:59:27Z")

</div>

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