Bhartrihari (5th century CE) - is a living account of a person's transformation from a pleasure-loving king to an ascetic. His work "Śatakatraya", consisting "Nītiśataka", "Śṛṅgāraśataka" and "Vairāgyaśataka", reflect his life in three stages: as a king, as a lover and as an ascetic. There are some verses from the Vairaagya Shatakam or the Hundred Verses on Renunciation. (It has reminded me the other king, Solomon, and his "Ecclesiastes").
praaptam na kinchitphalam
Tyaktwaa jaatikulaabhimaanamakhilam seva kritaa nishphalaa
Bhuktam maanavivarjitam paragriheshwaashankaya kaakavat
Trishne jrimbhasi paapakarmanirate naadyaapi santushyasi 
I wandered through many countries, often inaccessible and difficult to traverse, without gaining anything. Service to kings and rich persons, setting aside caste and family dignity, also proved futile. Food was taken in the houses of others without shame like a crow looking askance for fear of being caught. O Greed! You have made me do all these wrong things; still you are far from being satisfied.
Aadityasya gataagatairaharahah samksheeyate jeevitam
Vyaapaarairbahukaaryabhaaragurubhih kaalo’pi na jnaayate
Drishtwaa janma jaraavipattimaranam traasashcha notpadyate
Peetwaa mohamayeem pramaadamadiraam
unmattabhootam jagat 
Every day, as the Sun rises and sets, there is erosion in life, each day bringing one nearer to death. Because of the burden of worldly activities in which human beings are immersed, they are unaware of the inexorable efflux of time. In spite of seeing, before one’s eyes, birth, old age, disease and death, there is no sense of fear. The whole world, because of its indifference and carelessness about these facts of life, has lost its senses intoxicated by the delusion (that every thing would be fine).
Bhogaa na bhuktaa vayameva bhuktaastapo
na taptam vayameva taptaah
Kalo na yaato vayameva yaataastrishnaa
na jeernaa vayameva jeernaah 
We never did consume (enjoyed) the objects of enjoyment; on the contrary we ourselves were consumed (eaten, weakened). We never did any tapas (penance, literally heat); on the contrary we ourselves were heated (subjected to physical suffering). For us Time never passed; we ourselves passed into Time (our life span was reduced day by day). Our greed did not become old (weak); on the contrary we only became old (aged).
Kshaantam na kshamayaa grihochitasukham
tyaktam na santoshatah
Soddhaah dussahasheetavaatatapanakleshaah na taptam tapah
niyamitapraanairna shambhoh padam
Tattatkarma kritam yadeva
munibhistaistaih phalairvanchitaah 
We forgave others not out of an attitude of forgiveness (but because we were powerless to do anything else). We renounced worldly things not willingly (but because we could not afford it or could not enjoy it). We endured extremes of cold, heat and wind but we did not do any tapas (penance). We thought of wealth day and night but we never meditated, controlling our breath, on the lotus-feet of Lord Shiva. We practiced all those things which the saints practice (kshama, renunciation, tapas and dhyaana) but we could not achieve the result (liberation) which the saints achieve by these means.
Avashyam yaataarah chirataramushitwaapi vishayaah
Viyoge ko bhedastyajati na mano yatswayamamoon
Vrajantah swaatantryaadatulaparitaapaaya manasah
Swayam tyaktwaa hyete shamasukhamanantam vidadhati 
Pleasures of the senses will certainly go away, though after staying with us for a long time. What difference does it make if this separation is voluntary? But our mind does not want to leave these pleasures voluntarily. When these pleasures leave us themselves, our mind becomes stricken with grief. On the other hand, if they are voluntarily forsaken, it produces infinite peace and tranquility of mind.
Bhikshaashanam tadapi neerasamekavaaram
Shayyaa cha bhooh parijano nijadehamaatram
Vastram visheernashatakhandamayee cha kanthaa
Ha ha tathaapi vishayaa na parityajanti 
A person eats food, dry and devoid of any taste, once a day by begging. He sleeps on the bare earth. His only servant is his own body. His clothing is very old and tattered. In spite of all this, the desire for the pleasures of the senses does not leave him. It is a pity indeed!
Ajaanan daahaatmyam patatu shalabho deepadahane
Sa meeno’pyajnaanaat badishayutamashnaatu pishitam
Vijaananto’pyete vayamiha vipajjaalajatilaan
Na munchaamah kaamaanahaha gahano mohamahimaa 
The butterfly, without knowing that fire will burn, leaps into the flame of the lamp and gets burnt. Fish, because of their ignorance, bite into the meat tied to the angle of the fishing rod and get pierced. But we, knowing well that these pleasures will ultimately lead to sorrow and suffering, cling to these pleasures and do not leave them. Great indeed is the power of illusion.
Mritpindo jalarekhayaa valayitah sarvopyayam nanvanu
Bhaageekritya sa eva samyugashataih
Te dadyuh dadato’thavaa kimaparam
kshudraa daridraa bhrisham
Dhikdhik taanpurushaadhamaan dhanakanaan
vaanchchhanti tebhyo’pi ye 
The kings have divided a ball of earth, surrounded by water and composed of atoms, into small portions and have taken possession of these portions after fighting with each other. Such being the case, what these kings, mean and poor (stingy), can give to others? Fie on those worst of men who want to get from these very kings little bits of money.
Maane mlaayini khandite cha vasuni vyartham prayaate’rthini
Ksheene bandhujane gate parijane nashte shanairyauvane
Yuktam kevalametadeva sudhiyaam yajjanhukanyaapayah
nivaasah kwachit 
There comes in the life a person a time when his reputation fades, wealth diminishes or is lost, supplicants for alms or money go away disappointed, relatives become rare, servants leave and old age starts creeping in. When that time comes, the only proper thing to do is to retire into one of the caves of a mountain washed by the holy waters of the river Ganga.
Bhoge rogabhayam kule chyutibhayam vitte cripaalaadbhayam
Moune dainyabhayam bale ripubhayam rupe jaraayaa bhayam
Shaastre vaadibhayam gune khalabhayam
kaaye kritaantaat bhayam
Sarvam vastu bhayaanwitam bhuvitale
There is fear of disease in the enjoyment of pleasures. There is fear of fall in status for a reputed dynasty. There is fear from the king for the wealthy. In silence there is fear of weakness. In strength there is fear of enemies. In beauty there is fear from old age. For those proficient in shaastraas there is fear from debaters. For good qualities there is fear from evil men. There is fear from death for the body. Everything in this world has fear from some or other source. Only Vairagyaa (non-attachment to pleasures) has no fears.
Saa ramyaa nagaree mahaan sa nripatih saamantachakram cha tat
Paarshwe tasya sa vidagdhaparishat taashchandrabimbaananaah
Udriktah sa cha raajaputranivahah te bandinastaah kathaah
Sarvam yasya vashaadagaat smritipatham
kaalaaya tasmai namah 
That beautiful city, that great king, that circle of subordinate kings, that assembly of intelligent ministers and those moon-faced (beautiful) women by his side, those enthusiastic princes, those minstrels who sang his praises and those stories they narrated – all these became mere memories by the power of Kaala ( Time). I offer my humble obeisance to Kaala.
Mahaadevodevah saridapi cha saishaa surasarit
Guhaa evaagaaram vasanamapi taa eva haritah
Suhridwaa kaalo’yam vratamidamadainya vratamidam
Kiyadwaa vakshyaamo vatavitapa evastu dayitaa 
Shiva is the God. Ganga is the holy river. Cave is the shelter. The four quarters are the clothes. Kala (Death) is the friend. Vow is courage. What else is to be said? Let the banyan tree which provides the shelter be the loved one.
Ekaakee nisprihah shaantah paanipaatro digambarah
Kadaa shambho bhavishyaami karmanirmoolanakshamah
O Lord! Alone and without desires, tranquil and having nothing other than my palms for receiving alms, having only the four quarters as my clothes, when shall I be capable of destroying the results of my actions?
Aashaa naama nadee manorathajalaa trishnaatarangaakulaa
Raagagraahavatee vitarkavihagaa dhairyadrumadhwamsinee
Tasyaah paaragataah vishuddhamanaso
nandanti yogeeshwaraah 
The river desire has imagination as water, greed as its waves, and attachment as crocodiles and debate as the birds. This river sweeps away the tree of courage. It is difficult to cross because of the whirls of delusion and its depth. Its high banks are thoughts (worries). Only the yogis of pure mind who cross this river will attain real happiness.
Vayamiha paritushtaa valkalaistwam dukoolaih
Sama iha paritosho nirvishesho visheshah
Sa tu bhavatu daridro yasya trishnaa vishaalaa
Manasi cha paritushte ko’rthavaan ko daridrah 
One who has renounced the world speaks to the King thus:
We are happy with our clothes made of tree barks. You are happy with silken clothes. The happiness of both is equal; one is not greater than the other. The one who is extremely greedy is the real poor man. When one is mentally content with what one has who is rich and who is poor?
Chandaalah kimayam dwijaatirathavaa shoodro’tha kim taapasah
Kim va tattwavivekapeshalamatiryogeeshwara ko’pi kim
Ityutpanna vikalpajalpamukharaih sambhaashyamaanaa janai-
rnakruddhaah pathi naiva tushtamanaso
yaanti swayam yoginah 
When a group of yogis is passing through a village, people have doubts about their identities. One may be a chandala, a brahmin, a shoodra, an ascetic, one who has known the highest truth, or a yogi. They talk among themselves loudly. But the yogis hear their comments calmly; they are neither angry nor happy, they move on with their tranquility undisturbed by the loud noises made by the crowd.
Moham maarjaya taamupaarjaya ratim
Ko va veechishu budbudeshu cha
tadillekhaasu cah streeshu cha
Jwaalaagreshu cha pannageshu cha
saridwegeshu cha pratyayah 
Wipe out your illusions, develop love for Lord Shiva who sports the half-moon on his locks and set your heart on the banks of the celestial river Ganga. How can you trust waves, bubbles, flashes of lightning, women, volcanoes, snakes and flow of the rivers? (All things material are ever-changing, evanescent.)
Mahee ramyaa shayyaa vipulamupadhaanam bhujalataa,
Vitaanam chaakaasham vyajanamanukooloyamanilah
Sukham shaantah shete muniratanubhootirnripa iva 
The earth is a beautiful bed, the hand folded at the elbow serves as a pillow, the canopy is the sky, the cool breeze is like a fan, and the moon serves the purpose of a lamp, the damsel virati (non-attachment, renunciation) provides company – in this environment the saint sleeps happily like a king.
Kim vedaih smritibhih puraanapathanaih shaastrairmahaavistaraih
Swargagraamakutee nivaasaphaladaih karmkriyaavibhramaih
sheshaa vanigvrittayah 
What is the use of studying and performing the complex rituals expounded in the Vedas, smritis, puranas and shastras, the only fruit of which is living in a small house in a small village in Heaven? Except the effort which will burn all the sorrows and miseries of the samsaaraa and enable one to attain the bliss of the Self, other things are simply trading, giving something in exchange for something else.
Maatarmedini taata maruta sakhe tejah subandho jala
Bhraatarvyoma nibaddha eva bhavataamesha pranaamaanjalih
Jnaanaapaasta-samasta-mohamahimaa leeye pare brahmani 
O mother Earth! father Air! friend Fire! relative Water! brother Space! I offer Salutations to you all by joining the palms of my hands. With your help I have done meritorious deeds and thus purified I have attained to true knowledge which has dispelled my delusions and now I merge my self in the Brahman.
Dhanyaanaam girikandareshu vasataam
jyotih param dhyaayataam
Aanandaashrukanaan pibanti shakunaah nihshankamankeshayaah
Asmaakam tu manorathaavirachita praasaada-vaapeetata-
Kreedakaanana-kelikautukajushaam aayuh param ksheeyate 
Those realized souls who live in the caves of mountains and meditate upon the Supreme self shed tears of joy which the birds of the wild drink sitting on their laps without fear or apprehension. For us who build castles, lagoons and gardens in our imagination and entertain ourselves in a dream-like state, only the ayuh (life span) goes on diminishing; no higher goal is achieved.
Aayurvarshashatam nrinaam parimitam raatrau tadardham gatam
Shesham vyadhiviyogadukhasahitam sevaadibhirneeyate
saukhyam kutah praaninaam 
The lifetime of a person is limited to one hindered years. Half of this is wasted in the night. One half of the remaining half is spent in childhood and old age. The balance period is somehow lived by service or other occupations undergoing sufferings by disease, separation from loved ones and grief from misfortunes. Where is happiness in this life which is as transient as the waves in the ocean?
Snaatwaa gaangaih payobhih
shuchikusumphhalairarchayitwaa vibho twaa,
Dhyeye dhyaanam niyojya
Aaatmaaraamah phalaashee guruvachanaratastwatprasaadaatsmaraare,
Dukhaanmokshye kadaa’ham tava charanarato dhyaanamaargaikanishthah 
Bathing in the sacred waters of the Ganga, worshipping You, O Lord!, with fresh flowers and fruits, meditating on your beautiful form seated on a rock in a Himalayan cave, experiencing the bliss of the self, living only on fruits, following the advice of the guru, heart set on your lotus feet and establishing myself in dhyaanayoga, when shall I, by Your grace, be liberated from the miseries of this samsara ?
Ahau vaa haare vaa balavati ripau vaa suhridi vaa,
Manau vaa loshte va kusumashayane vaa drishadi vaa
Trine vaa straine vaa mama samadrisho yaanti divasaah
Kwachitpunye’ranye shivashivashiveti pralapatah 
My days are passed in a sacred forest chanting the name of Shiva and having the same equal vision whether it is a snake or a garland, an enemy or a friend, a diamond or a lump of clay, a bed of flowers or of stone, a bundle of grass or a group of women.
Chalaa lakshmeeshchalaa praanaashchalam jeevitayauvanam
Chalaachale cha samsaare dharma eko hi nishchalah 
Wealth is fleeting, breath is fleeting, life is fleeting and youth is fleeting. In this world of moveable life forms only dharma is stable and permanent.