He knows what's what. He is a shrewd fellow not to be imposed on. One of the senseless questions of logic was “Quid est quid?”
He knew what's what, and that's as high As metaphysic wit can fly.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894
More on What's What from Fact Monster: