Article View: news.software.nntp
Article #91840Re: Interacting with cnfs
From: Julien ÉLIE
Date: Sun, 14 Jul 2024 07:17
Date: Sun, 14 Jul 2024 07:17
69 lines
3361 bytes
3361 bytes
Hi Nigel, > I was thinking about a report I did for my older server, which used the > tradspool storage method, and that was to count how many articles are > in a group and list how many new articles have been added since last > run. > > I can't see a way to make this happen using cnfs without pulling the > storage token using a similar method as 6.4 in the FAQ and then > manually parsing the newsgroups line from each article. You can use overview information to get the number of articles in a newsgroup. % getlist -R counts news.software.nntp 17619 1 13223 y gives you a list of newsgroups containing the information (13223 articles in news.software.nntp, between article numbers 1 and 17619). For accurate results, see the groupexactcount setting in readers.conf. You may want to set it to 0 for connections coming from localhost or whichever server running your command. How many articles have been added since the last run is not straight-forward though... You have to somehow record the latest high water marks for each newsgroup, and see how many articles have a greater article number than these recorded high water marks. Use tdx-util or ovsqlite-util for that, assuming you have a tradindexed or ovsqlite overview. For instance, assuming I have recorded that the latest highest article number for news.software.nntp was 17619, I get the number of new articles with the following command: % ovsqlite-util -g -n news.software.nntp -a 17620- | wc -l 0 Incidentally, you may also use tdx-util or ovsqlite-util instead of "getlist -R counts" for the counts: % ovsqlite-util -i -n news.software.nntp news.software.nntp 17619 1 13223 y 1720923358 0 I hope this could help. > Do we have any better tools for interacting with cnfs...or if not, > should we? Naturally, every tool is perfectible and can be enhanced. It just needs someone to write it and share it with the community. > A similar thought that when looking for text, I could grep through a > group or set of groups. Not sure this would even be possible with cnfs > either? You have to force a text search with "grep -a". -- Julien ÉLIE « Pour aller plus vite, j'additionne toujours de bas en haut : je fais du même coup l'addition et la preuve. » (Aurélien Scholl)
Technical Details
Message-ID:
<v6vu2b$nssu$1@news.trigofacile.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!apf9.newsdeef.eu!not-for-mailReferences:
<20240705023621.62cd4083@wibble.sysadmininc.com>Show Full Headers
Complete Article Headers
Message-ID: <v6vu2b$nssu$1@news.trigofacile.com> Subject: Re: Interacting with cnfs Date: Sun, 14 Jul 2024 09:17:31 +0200 From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> References: <20240705023621.62cd4083@wibble.sysadmininc.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!apf9.newsdeef.eu!not-for-mail Mime-Version: 1.0 In-Reply-To: <20240705023621.62cd4083@wibble.sysadmininc.com> Newsgroups: news.software.nntp Organization: Groupes francophones par TrigoFACILE Content-Transfer-Encoding: 8bit User-Agent: Mozilla Thunderbird Content-Type: text/plain; charset=UTF-8; format=flowed Injection-Date: Sun, 14 Jul 2024 07:17:31 -0000 (UTC) Cancel-Lock: sha1:pRUTdxJpCTHfOmg910qz6n1Xp68= sha256:vATG3QTZf/oWn4PVZOplhUrmRCYc0xp88a1Nuw2QmCE= sha1:YVGu3baGLENeah6+HfFVdDWTWHM= sha256:bm60I0KejSYQaM4jocTwWpkR992SB566/af4jea7hik=