One way to check your posture is to use a mirror to see how you are sitting or ask someone to hold it up for you.
Look for signs of a poor posture-:
It is very important to have an adjustable chair to match your work area.
If you are at a desk for more than a few hours a day investing in a quality chair is very important.
Being aware of your posture via your physio or pilates instructor or yoga teacher is also a benefit.
Building a strong core and correct breathing techniques are very important.
A key to longevity when standing at your desk is to be aware of your feet to engage your core -:
Can you spot the posture issues in the image above?
Granted these are poses, however all have issues with alignment. When one hip takes more weight than the other postural imbalances occur.
You may not even notice yourself doing it. Take notice of how you stand when shopping or other simple activities.
Check the article Squats for Aligning Hips