Originally Posted by nukefission
Your O2 sensor is probably dead. I don't think the dead O2 and the knock count are related, though.
O2 sensor is dead, but unrelated to your knock issues. O2 sensor readings are not used when the ecu reverts to open-loop operation, which occurs on cold starts and when you've gone WOT.
Try adding more fuel on your AFC after 5700 rpm's.