I don't know how Emperor Kangxi maintained it.
I know something about how emperor Qianlong maintained it.
When Qianlong was in office, he paid great attention to health preservation. He summed up his longevity as the following 16 words: exhale and nourish the heart, exercise the bones and muscles, often do ten things and four things, and make up in time.
Exhale from the heart, that is, spit out the turbid air and make your mind clear. No matter how late the emperor Qianlong worked that day, he would get up at dawn the next day, close his eyes and concentrate under the imperial garden, exhaling for more than an hour at a time. Not only is he alert and clear-headed, but his limbs are strong and comfortable.
Exercise bones and muscles: After breathing for an hour, Gan Long will do some simple exercises, including walking, climbing mountains, boxing and playing fitness balls. If the official business is not busy, Emperor Qianlong will lead a team out of the palace, or hunt or climb mountains or travel, which not only fully moves the limbs, but also delights the body and mind.
Ten times and four noes: exercise body parts every day, specifically: teeth often knock, body fluids often swallow, ears often bounce, nose often rub, eyes often turn, face often rub, feet often rub, abdomen often touch, limbs often stretch, anus often lift; Don't talk when eating, don't talk when lying down, don't get drunk when drinking, and don't get confused.
Timely tonic: that is, make necessary food supplements according to the characteristics of solar terms and physical condition. Gan Long often eats tonics such as Guilingji Prescription, Songling Taipingchun Liquor Prescription, Jianpi Zishen Zhuangyuan Prescription and Guben Xianfang. These tonics are all prepared by imperial doctors according to the physical condition and solar terms of Qianlong. It is mostly used for warming kidney, strengthening yang, invigorating spleen, promoting qi circulation, relaxing bowels, clearing heat and stopping bleeding. They are not royal secret products, and their efficacy is no different from that of folk things. They just insist on taking them and conditioning them in time.