X-raying the dynamics of globular clusters