summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIndrajit Raychaudhuri <irc@indrajit.com>2024-01-19 00:11:39 -0600
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-02-01 19:52:15 +0000
commit8996552e61af617c9193895ad5588191615be16d (patch)
tree665e137823ce3417b722f186fcf8dc68503ba4a6
parentc7e01e3e9b6b4a598e85f709ebcb8118e50494c3 (diff)
downloadvyos-1x-8996552e61af617c9193895ad5588191615be16d.tar.gz
vyos-1x-8996552e61af617c9193895ad5588191615be16d.zip
dns: T4578: Remove unnecessary dns forwarding statistics script
(cherry picked from commit 119efb6d8d353482d598287f49e22aa68a22e960)
-rwxr-xr-xsrc/op_mode/dns_forwarding_statistics.py32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/op_mode/dns_forwarding_statistics.py b/src/op_mode/dns_forwarding_statistics.py
deleted file mode 100755
index 32b5c76a7..000000000
--- a/src/op_mode/dns_forwarding_statistics.py
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env python3
-
-import jinja2
-from sys import exit
-
-from vyos.config import Config
-from vyos.utils.process import cmd
-
-PDNS_CMD='/usr/bin/rec_control --socket-dir=/run/powerdns'
-
-OUT_TMPL_SRC = """
-DNS forwarding statistics:
-
-Cache entries: {{ cache_entries }}
-Cache size: {{ cache_size }} kbytes
-
-"""
-
-if __name__ == '__main__':
- # Do nothing if service is not configured
- c = Config()
- if not c.exists_effective('service dns forwarding'):
- print("DNS forwarding is not configured")
- exit(0)
-
- data = {}
-
- data['cache_entries'] = cmd(f'{PDNS_CMD} get cache-entries')
- data['cache_size'] = "{0:.2f}".format( int(cmd(f'{PDNS_CMD} get cache-bytes')) / 1024 )
-
- tmpl = jinja2.Template(OUT_TMPL_SRC)
- print(tmpl.render(data))