A compressor (1, 101, 201, 301) comprising: a casing that stores lubricating oil in its bottom portion; a compression mechanism that is disposed inside the casing and compresses refrigerant; a drive shaft that is disposed inside the casing and drives the compression mechanism; a main frame that has the compression mechanism placed on it, is air-tightly joined to, across the entire periphery of, an inner peripheral surface of the casing, and supports the drive shaft in such a way that the drive shaft may freely rotate; and a motor (16, 316) that is disposed under the main frame and drives the drive shaft, and a flow path forming member (91, 191) that is disposed inside the casing and forms an oil flow path (92, 192, 292, 392) that is a space located in the neighborhood of the inner peripheral surface of the casing and through which lubricating oil that lubricates sliding portions including the compression mechanism and the drive shaft flows; wherein the main frame has an oil return passageway (35, 82) through which lubricating oil that has lubricated the sliding portions flows, the oil flow path being a space to which lubricating oil that has flowed through the oil return passageway is supplied, the oil flow path has a space contiguous to the inner peripheral surface of the casing, the flow path forming member has a section contiguous to the inner peripheral surface of the casing, characterized in that the compressor further comprises a temperature measuring mechanism (76, 176, 276, 376) that is disposed outside the casing and measures the temperature of a section of an outer peripheral surface of the casing positioned in the neighborhood of the oil flow path, and the temperature measuring mechanism measures the temperature of a temperature measuring region that is a section of the outer peripheral surface of the casing corresponding to the back side of a section of the inner peripheral surface of the casing contiguous to the oil flow path and the flow path forming member. a casing that stores lubricating oil in its bottom portion; a compression mechanism that is disposed inside the casing and compresses refrigerant; a drive shaft that is disposed inside the casing and drives the compression mechanism; a main frame that has the compression mechanism placed on it, is air-tightly joined to, across the entire periphery of, an inner peripheral surface of the casing, and supports the drive shaft in such a way that the drive shaft may freely rotate; and a motor (16, 316) that is disposed under the main frame and drives the drive shaft, and a flow path forming member (91, 191) that is disposed inside the casing and forms an oil flow path (92, 192, 292, 392) that is a space located in the neighborhood of the inner peripheral surface of the casing and through which lubricating oil that lubricates sliding portions including the compression mechanism and the drive shaft flows; wherein the main frame has an oil return passageway (35, 82) through which lubricating oil that has lubricated the sliding portions flows, the oil flow path being a space to which lubricating oil that has flowed through the oil return passageway is supplied, the oil flow path has a space contiguous to the inner peripheral surface of the casing, the flow path forming member has a section contiguous to the inner peripheral surface of the casing, characterized in that the compressor further comprises a temperature measuring mechanism (76, 176, 276, 376) that is disposed outside the casing and measures the temperature of a section of an outer peripheral surface of the casing positioned in the neighborhood of the oil flow path, and the temperature measuring mechanism measures the temperature of a temperature measuring region that is a section of the outer peripheral surface of the casing corresponding to the back side of a section of the inner peripheral surface of the casing contiguous to the oil flow path and the flow path forming member.