In reply to ring ouzel:
> Probably death watch beetle.
I thought the knocking (which I understood to be a mating behaviour) was more a spring/summer thing. Isn't it a bit late in the year? Mind you, Michaela Strachan kept telling me last week that this autumn was warmer than usual (not noticeably so round here IMO).
I also had an idea that they have a particular penchant for oak. The OP doesn't state what species of tree it was, unfortunately.