Here is a DIY video for replacing the two (2) knock sensors on your BMW E36 M3 (OBD-I S50 motor). I was getting some stuttering when the car was cold and I would go close to 3000 RPM. I would get an intermittent check engine light and it would stop stuttering once the car warmed up. The diagnostic code I was getting was 1-2-2-6 (Knock sensor #2).
This tutorial probably applies to S52 OBD-II cars other than maybe a few other electrical harnesses. Probably also applies to non-M 3-series cars as well.
I did not show the removal of the intake manifold; it's quite there chore but there are many other videos on here that show exactly what to do. Check those out first because it will have to be removed in-order to access the knock sensors.
Knock sensor part number from FCP Euro:
Bosch - 0261231195 (oe p/n 12141738667)
https://www.fcpeuro.com/products/bmw-...
Intake Manifold gaskets (You will need 6)
11611717259
Throttle body gasket
11611716174
Torque spec on the knock sensors is 15 lb/ft. Hope this helps yall!