my rpm goes up and down on 1996 Mercedes-Benz S320

it produces smoke from exhaust

Asked by for the 1996 Mercedes-Benz S320
If the RPM is fluctuating it could be from many different things. Something as simple as low coolant level, a vacuum leak at the intake manifold, or air induction. The idle control system could have a problem but the smoke coming out the exhaust, if it is steam due to a blown head gasket the smoke will be white (steam) and maybe smell sweet, if it is excess fuel the exhaust smoke will be black, if the engine is consuming oil the smoke will be gray. It is hard to say what is wrong with out being able to experience the problem first hand.
1 more answer
under the hood on the driver side at the back of engine there is a oil sensor that leaks .change it ,you can get to it under the car .and you can order it at autozone for about $60