Vibhūti Pāda · Sutra 22
सोपक्रमं निरुपक्रमं च कर्म तत्संयमादपरान्तज्ञानमरिष्टेभ्यो वा
sopakramaṃ nirupakramaṃ ca karma tatsaṃyamādaparāntajñānamariṣṭebhyo vā
Karma is of two types: active and latent. From saṃyama on it, or from omens, arises knowledge of death.
Sopakrama is active, in motion. Nirupakrama is latent, dormant. Karma is action and its consequences. Aparānta is the end, death. Ariṣṭa are omens, signs.
Karma can be fructifying now (sopakrama) or awaiting its moment (nirupakrama). Through saṃyama on these two types, the yogī knows when death will come.
Alternatively, it can be known through ariṣṭas, traditional signs or omens indicating the end’s proximity.
Knowing the moment of one’s own death is not morbid in the yogic context. It allows preparation, completing pending matters, consciously directing the process.
Advanced yogīs can even choose the moment of leaving the body, through techniques like mahāsamādhi.
This siddhi also has benevolent use: perceiving others’ karmic state to help them.
Karma is not fixed destiny. Knowing it allows, in some cases, modifying it.