Learn to measure your pre-workout and post-workout pain. You can use a one to five or one to ten system, whichever suits you.
Your level of pain should go up a little after exercise as your body adapts. Your pain levels should not, however, increase dramatically and make you very uncomfortable, or increase with time. Instead, one should expect to feel less pain over time.
If your knees hurt more after exercise, simply do less. Your pain could be your muscles and cartilage adapting and you shouldn’t stop that process. Just do less.