There are four subjects in this sentence. They are: 1) ekasanaj (sitting alone, accusative singular). 2) ekaseyyaj (sleeping in solitude, accusative singular). 3) eko caram atandito (wandering alone and active). The subject here is the numeral eko (one, alone, nominative singular). It has an attribute, the adjective atandito (active, nominative singular). The verb is in the active present participle, caram (wandering, nominative singular). 4) eko damayam attanaj (alone subduing oneself). The subject is the numeral eko (one, alone, nominative singular). The verb is in the active present participle, damayam (subduing, nominative singular). The object is the noun/pronoun attanaj (oneself, accusative singular). The verb is siya (should be, 3rd person, singular, active, optative). It has two attributes, the past participle ramito (delighted, enjoying, nominative singular) and the noun vanante (at the edge of the forest, locative singular).
Venerable Ekavihari used to live alone, eat alone and meditating in solitude. He did not like to keep company of other monks. Some monks did not understand why he did so and reported the matter to the Buddha. The Buddha praised Ekavihari and spoke this verse about how good it is for a monk to concentrate on meditation in seclusion.