#1 You know that 404 errors exist, because you've found them via GWT or similar. Now you want to find out where these bad links are coming from in the first place. Wander through the Forums and you may conclude that much of the time it isn't worth the trouble.*
#2 You want to know whether your site is drawing 404 errors.
Unless you've got an unspeakably complicated site, you need not worry about internal bad links. A quick run with the link checker of your choice will turn up any problems.
* I just took a quick detour to gwt. The latest "not found" is
404 (Not found), ostensibly linked from "1 pages". (Um, g###, have you any idea how easy it is to code that to make it grammatical?) That one page(s) turns out to be some everything-but-the-kitchen-sink site that I've never heard of. Oh, I am so going to seek them out and make them fix the link. Yeah. You betcha. Especially since my page-- minus the "CachedYou"-- doesn't even have any content that belongs in that kitchen sink.
I agree with lucy, it depends on what you want to accomplish, if you want to verify if your site is delivering 404 Xenu may be a good tool to use, if you would like to discover which pages links to a 404 you can put some strings with php like:
I think the Bing wmt equivalent may be more useful than Google's, because it's broken into smaller, discrete pieces. What I especially like is that it tells you how many links you've got to each individual problem URL in all categories. I don't know if this means internal links or all links from everywhere; currently mine are all at zero, meaning that they're Bing's problem, not mine.
so. you can easily use google and its web master tools that will help you in this issue. you are to sing in web master account in the google, then the category crawl errors. click it and observe all the 404 error pages.
If you want to check on your 404s in live mode, you can create a 404 page which emails you every time it's called. It can tell you what was a request, and what/who requested it, and whatever else PHP can derive from it.