The easiest way to find the CPU affinity of a process is using the taskset command:
taskset -pc <pid>
will report the CPU affinity as a list of the CPU numbers.
taskset -p <pid>
will report the CPU affinity as a mask of the CPUs included.
If you are looking for the information in /proc, check the file /proc/<pid>/status.
The lines you are looking for are (as in this example):
I hope this helps (/proc information may not be available in all kernels).