A generator comprising: an internal combustion engine; an alternator having a rotor driven by the internal combustion engine and a stator in which alternator output power is induced when the rotor is driven; a power outlet coupled to the alternator to provide power to a device coupled to the power outlet; and an electronic processor communicatively coupled to the engine and configured to determine when the generator is operating in a confined space and to shut down the generator by obtaining an engine speed of the engine, determining that the engine speed is below an engine speed threshold for a predetermined period of time, or determining that the engine speed has decreased below an engine speed threshold a predetermined number of times within a predetermined period of time, determining, in response to determining that the engine speed is below the engine speed threshold for the predetermined period of time, or in response to determining that the engine speed has decreased below the engine speed threshold the predetermined number of times within the predetermined period of time, that a predetermined number of a plurality of secondary parameters of the generator have crossed respective secondary thresholds, and shutting down the generator in response to determining that the predetermined number of the secondary parameters have crossed the respective secondary thresholds. an internal combustion engine; an alternator having a rotor driven by the internal combustion engine and a stator in which alternator output power is induced when the rotor is driven; a power outlet coupled to the alternator to provide power to a device coupled to the power outlet; and an electronic processor communicatively coupled to the engine and configured to determine when the generator is operating in a confined space and to shut down the generator by obtaining an engine speed of the engine, determining that the engine speed is below an engine speed threshold for a predetermined period of time, or determining that the engine speed has decreased below an engine speed threshold a predetermined number of times within a predetermined period of time, determining, in response to determining that the engine speed is below the engine speed threshold for the predetermined period of time, or in response to determining that the engine speed has decreased below the engine speed threshold the predetermined number of times within the predetermined period of time, that a predetermined number of a plurality of secondary parameters of the generator have crossed respective secondary thresholds, and shutting down the generator in response to determining that the predetermined number of the secondary parameters have crossed the respective secondary thresholds. obtaining an engine speed of the engine, determining that the engine speed is below an engine speed threshold for a predetermined period of time, or determining that the engine speed has decreased below an engine speed threshold a predetermined number of times within a predetermined period of time, determining, in response to determining that the engine speed is below the engine speed threshold for the predetermined period of time, or in response to determining that the engine speed has decreased below the engine speed threshold the predetermined number of times within the predetermined period of time, that a predetermined number of a plurality of secondary parameters of the generator have crossed respective secondary thresholds, and shutting down the generator in response to determining that the predetermined number of the secondary parameters have crossed the respective secondary thresholds. <EOS>