attagutto: attagutta-, Adj.: self-guarded.
It is a compound of:atta-, N.m.: it is the compound
form of the word attan-, N.m.: see above.gutta-, Adj.: guarded, protected.
It is a p.p. of the verb root gup- (to protect).Nom.Sg.m. = attagutto.

vihahisi,
V.: stay, dwell, live. The verb root is har- (to carry) with the
prefix vi- (denoting separation). Thus viharati, V.: to live,
to stay, to dwell. 3.Sg.act.fut. = vihahisi.
This form is very peculiar and the reading is doubtful.

This verse consists of three syntactically
separate sentences. They are: 1) attana
codayattanaj
(exhort yourself by yourself). The subject is omitted; the verb implies
the second person singular pronoun. The verb is codaya (exhort,
2nd person, singular, active, imperative). It has an attribute,
the noun attana (by oneself, instrumental
singular). The object is the noun attanaj
(oneself, accusative singular). 2) patimajsetha
attana (one should control [oneself] by
oneself). The subject is omitted; the verb implies the third person singular
pronoun. The verb is patimajsetha
(one should control, 3rd person, singular, active, optative).
It has an attribute, the noun attana
(by oneself, instrumental singular). 3) so attagutto satima
sukhaj bhikkhu vihahisi
(the monk, who is self-guarded and mindful, will live happily). The subject
is the noun bhikkhu (monk, nominative singular). It has three attributes,
the pronoun so (he, nominative singular), the compound attagutto
(self-guarded, nominative singular) and the adjective satima
(mindful, nominative singular). The verb is vihahisi
(will live, 3rd person, singular, active, optative). It has
an attribute, the adverb sukhaj (happily).

Commentary:

There was a poor farmer named Nangala
Kula. Once he was ploughing a field wearing his old clothes, when he saw
a monk passing by. He asked to be ordained and became a monk on the spot.
He left his plough and old clothes there and went to the monastery, which
was not very far. After a time he would grow discontented
with a life of a monk. In that case, he would go back to the tree, where
he left his plough and clothes and would remind himself of his poor past.
Thus his discontent left and he went back to his meditation practice. This
happened several times. Other monks observed his visits to
the tree and asked him what it meant. He replied that he had to go to his
teacher. After some time he attained the Arahantship and stopped going
to the tree. The monks asked him why he stopped. He told them that he did
not need a teacher any longer. The monks asked the Buddha if that was so
and the Buddha confirmed that Nangala Kula has indeed attained the Arahantship.
The Buddha then added this verse (and the following one, DhP 380).