Measurement of wear or vibration