In general M codes for coolant On is M8 & Coolant Off is M9. For lube ways there is no M codes it is Timer Based activation it is control by so many methods by the manufacturer.
1) Timer control by PLC
2) Mechanical Gear type ( Motor contineously run )
3) External Timer based Lubrication unit
I dont know which type of Lube system you are having.
If your lube is not working check the type & Diagnose the fault.