Diagnostics of hydraulic systems