These are chat archives for CZ-NIC/knot-resolver

23rd
Jan 2019
edoo
@ookangzheng
Jan 23 08:20
Is there any quick way to see current rpz.deny counts inside interactive mode
like
cache.count()
Petr Špaček
@pspacek
Jan 23 08:21
You can have a look at stats.list(), but I don't remember if its there.
If it is not there then the statics it available - feel free to send merge request to add that!
edoo
@ookangzheng
Jan 23 08:25
it return
stats.list()
[string "return table_print(stats.list())"]:1: attempt to index global 'stats' (a nil value)
Petr Špaček
@pspacek
Jan 23 08:26
In that case stats module is not loaded, do modules.load('stats') or see manual: https://knot-resolver.readthedocs.io/en/stable/modules.html#statistics-collector
edoo
@ookangzheng
Jan 23 08:27
imposible, I do load these module
modules = {
        'policy',
        'hints > iterate',
        'serve_stale < cache',
        'workarounds < iterate',
        --'view',
        'stats',
        'predict',
        --'daf',
}
Petr Špaček
@pspacek
Jan 23 08:28
Well, I don't know why, but if stats is nil then it is not loaded :-)
edoo
@ookangzheng
Jan 23 08:29
kk
I see.. Im runnig knot-resolver with screen -dmS xxx
but I think it is possible just run cmd kresd and get the statistics data.. Im wrong .. so now I got all the data I need.
thanks
Vladimír Čunát
@vcunat
Jan 23 09:37
@ookangzheng: each policy has a count how many times it's fired. Just input policy.rules into the interpreter and you'll see the table. Of course, there's a complication that the rules are opaque, i.e. you can't really introspect which rule does what...