Ignore the knock sensor code for now, it won't cause running problems. Diag. the o2 sensor code.
If you are watching the timing on the scanner, what you are seeing may be normal esp. if it is running bad. The PCM moves timing around after looking at inputs from all the sensors.
Cheap Thrills Off Road
2003 F-250 4X4 7.3 PSD Crew Cab