An electrosurgical system includes an electrosurgical generator configured to generate electrosurgical energy and a sensor. The sensor is coupled to the electrosurgical generator and senses aerosol and/or smoke generated during application of the electrosurgical energy. The sensor generates data in response to the sensed aerosol and/or smoke and communicates the data to the electrosurgical generator. The electrosurgical generator generates the electrosurgical energy as a function of the data.