Score:0

xml2 Ubuntu equivalent on centos / Rocky

re flag

I am setting up monitor for bind service on Rocky Linux.

I need to parse xml output of bind statistics.

On ubuntu I can run the next command and get valid output

root@ubuntu:~# curl -s  172.19.0.30:8053 | xml2 
/statistics/memory/contexts/context/maxinuse=158976
/statistics/memory/contexts/context/blocksize=262144
/statistics/memory/contexts/context/pools=7
/statistics/memory/contexts/context/hiwater=801324922
.......

What will be equivalent command on CentOS / Rocky to parse xml output of bind9.

Did not find the correct command after a hour of googling.

Is there any parameters on xmllint will help me?

jm flag
You ask two questions here. From the title, the package `libxml2` provides `xmllint`. You can find this by the command `dnf whatprovides xmllint`. The command parameters are the same on both distributions so your Ubuntu command should work on Rocky. `man xmllint` also gives pretty good documentation.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.