On my 87'toyota truck the pulley on the ac compressor it smoking bad and making a knock how do you know weither to replace the clutch or the compressor or both or is that even the problem?

Sounds like the compressor is shot and it would be best to replace both. Unfortunately when the compressor goes bad it sends metal trash throughout the system. If you replace the compressor with out having the system flushed clean (which is almost impossible to do) the trash in the system will eventually destroy the new compressor.