know which side one's bread is buttered on

know which side one's bread is buttered (on)
(to know what is most advantageous for one; be aware of where one's best interests lie) — себе на уме; своего не упустит; знать, что выгодно; понимать свою выгоду; ~ губа не дура

Example 1: Jerry always helps out his boss; he knows which side of his bread is buttered. (The American Heritage Dictionary of Idioms)

Example 2: He'll be there on time; he knows which side his bread is buttered on.

know which way the wind blows/how the wind blows — знать / понимать «куда ветер дует», держать нос по ветру

hold one's nose /go whichever way the wind blows – держать нос по ветру

Example: Changes in management don't bother him. He goes whichever way the wind blows. — Смена начальства его не волнует. Он всегда держит нос по ветру. (MB)

[never miss a trick]
[jump on the bandwagon]
[себе на уме]