Looking at Swami Krishnananda's book on The Brihadaranyaka Upanishad (emphasis mine):
This instruction, which was communicated to the Devas, Manushyās and
Asuras – gods, men and demons – by the single letter Da repeated three
times, meaning Dāmyata, Datta, Dayadhvam – be self-controlled, be
charitable and be compassionate, is applicable to all mankind.
So, this is from the the Brihadaranyaka Upanishad, chapter 5, second Brahmana (one of the more recent ones, looking at the dates given in Wikipedia). If you're new to this, know that many tales of Hindu mythology are about the struggles between Asuras and Devas. Swami Krishnananda says Asuras "are extremely cruel in their nature," "[…] always insult, injure and harm other people," "[…] are hard-hearted people." They're the demons, but not all Asuras are necessarily evil. The antagonist of the Ramayana, Ravan, or the Asura king Mahabali, are considered capable rulers, pious, wise and knowledgeable. However, the constant warring between Asuras and Devas, while good for creating stories, isn't good for the normal people caught underfoot.
Accordingly, in this Brahmana, Lord Brahma, the Creator in the Hindu Trinity, instructs Devas to show restraint (in enjoying pleasures), Asuras to be compassionate, and mankind to be charitable. Mankind has the qualities of both Asuras and Devas, and so mankind should follow all three instructions.
Now, if these three has actually followed these instructions, so many wars could have been averted. If mankind would embrace self-control and compassion, we wouldn't be warring all the time.
Shanti literally means peace, and the triple utterance of shanti is common (see this post on the Hinduism Stack Exchange), so that by itself is not from a particular Upanishad.