How do I list all extensions on HiPath DX that have class of service 31? 

Use the List extension by class-of-service command.

LECS 31