(Apologies for not replying sooner, sometimes I'm torn between getting more stats, or setting up DSL Stats Anonymous, a support group to help people overcome their stats addiction and go back to just using the Internet.)
The first step is to upload a specially modified config file, which I have attached, inside a zip file. This will reset the device to factory default settings. The device will reboot and then you will have to set everything up from scratch again.
You then telnet to the router on port 1023, the login user/pass is admin/1234. Then to get the stats, you have to run lots of /firmware/dsl_cpe_pipe.sh commands, the problem with these is that it's hard to remember if the necessary 0s and 1s stand for upstream and downstream, or near end (downstream) and far end (upstream).
I'll try and list some of the most useful commands, I hope I've got the ones and zeroes the right way round, sometimes its obvious which is which, sometimes not:
Cabinet / Exchange vendor:
/firmware/dsl_cpe_pipe.sh g997listrg 1
Upstream:
/firmware/dsl_cpe_pipe.sh g997csg 0 0
/firmware/dsl_cpe_pipe.sh g997lsg 0 1
/firmware/dsl_cpe_pipe.sh g997lspbg 0
/firmware/dsl_cpe_pipe.sh g997bang 0
/firmware/dsl_cpe_pipe.sh g997sang 0
/firmware/dsl_cpe_pipe.sh lfsg 0
/firmware/dsl_cpe_pipe.sh pmcctg 0 1
/firmware/dsl_cpe_pipe.sh pmdpctg 0 1
/firmware/dsl_cpe_pipe.sh pmdpfctg 0 1
/firmware/dsl_cpe_pipe.sh pmlsctg 1
Downstream:
/firmware/dsl_cpe_pipe.sh g997csg 0 1
/firmware/dsl_cpe_pipe.sh g997lsg 1 1
/firmware/dsl_cpe_pipe.sh g997lspbg 1
/firmware/dsl_cpe_pipe.sh g997bang 1
/firmware/dsl_cpe_pipe.sh g997sang 1
/firmware/dsl_cpe_pipe.sh lfsg 1
/firmware/dsl_cpe_pipe.sh pmcctg 0 0
/firmware/dsl_cpe_pipe.sh pmdpctg 0 0
/firmware/dsl_cpe_pipe.sh pmdpfctg 0 0
/firmware/dsl_cpe_pipe.sh pmlsctg 0
There are lots of other commands, "/firmware/dsl_cpe_pipe.sh help" gives a list, but you then have to look up or work out how many parameters they take and what the numbers stand for. Usually the get commands should be fairly safe and not disconnect the VDSL2 link, although it's possible some of the "delt" commands might disconnect the VDSL2 and put it into a diagnostic mode.