(To) know what’s what
Sometimes said of society matrons who understand perfect etiquette and the science of dinner-table seating. Or pundits who know local political gossip and the status of the financial markets. The term first appears in Hudibras by Samuel Butler (1663):
He knew what’s what, and that’s as high
As metaphysic wit can fly.
(Memorably quoted by Mae West when a lifejacket was named after her:
I’ve been in Who’s who and I know what’s what,
but this is the first time I’ve been in a dictionary.’)