This script scans your site index, checking each link to verify they exist in your wiki. It does not verify external links. To use it, just put [(linkrot)] on a page.
For a large site, consider using cron, and setting log=site.brokenlinks or something, and then you'll have a nice report ready for you whenever you check in. In most cases however, the function is fast enough to work dynamically.