 In the end, what was it that O'Leary smelled throughout the story?
His name was Liam O'Leary and there was something stinking in his nostrils. And, what was more important, why she couldn't adjust herself to it, now that she was in. And O'Leary was a man who lived by the book. That old witch Mathias never told me I was supposed to mop up. And then, ten minutes later, she called the guards and told them I refused to mop." He had managed, by strength of will, not to hear that she had omitted to say "sir" every time she spoke to him, but he couldn't keep it up forever and he certainly couldn't overlook hysteria. He handed the rap sheet to Sodaro and said absently: "Too bad a kid like her has to be here. Captain O'Leary took a long drink of water from the fountain marked "Civil Service." If anything, she had had a better environment than O'Leary himself, and look what she had made of it. The ultimate should be the complete segregation of each specialization—social and genetic measures to make them breed true, because the unspecialized man is an uncivilized man, or at any rate he does not advance civilization. A bleary old inmate orderly stood up straight and touched his cap as O'Leary passed by. O'Leary noted, with the part of his mind that always noted those things, that the orderly had been leaning on his broom until he'd noticed the captain coming by.
 The riot. He picked up on the growing unrest, and it came to him as a smell.
 Burning flesh, from Bradley sitting on the bench and hurting herself.  The riot. He picked up on the growing unrest, and it came to him as a smell.  The blue pills the Warden was taking, that were warping his perception and ultimately kept him from realizing the riot was brewing.  Burning flesh, from the shive being formed. It's the "trouble" he was detecting.