Unexplained nightly system shutdown-Collection of common programming errors

I recently took over a Dell XPS 9100, installed Ubuntu 12.04 via PXEboot. I have done big builds and long over-the-net fetches with the machine. In System Settings => Power, for Suspend when inactive for, I have Don't suspend. I was planning to use this machine for overnight builds.

It has never crashed in my presence. However, each morning, I discover the machine is off, not merely suspended. I have not been able to find evidence of an automatic shutdown, but I may not be looking in the right places.

Running last -f /var/log/wtmp, I see entries like:

myuserid pts/2        :0               Thu Nov 21 18:37 - crash  (12:17).

But I think this just means I didn’t log off. Grepping thru /var/log/* only showed shutdown in this file.

How do I find the root cause of this automated shutdown or crash?