CPU Usage at another Compute Node?

Hi,

I am trying to get the cpu usage of a job/process. The machine that has these jobs is a cluster with 1 master node and 10 compute nodes.

Now, the complexity is that not all jobs are on the master node. So, in order to get the cpu usage of a job at another node, I have to ssh into it and then use the ps command with the process id. The problem is that it takes atleast 3.5 seconds to ssh into one of the compute nodes. Using the ps command after that will cause the cpu usage to have the wrong data, or will have the process expired itself. Is there anything that I can use to get the cpu usage of a process id at another node without having to ssh into it.

Thank you all very much for your time and efforts.

P.S. - Dont know if this matters, but just thought I would give some additional info for Python users. I am using these commands in a Python script, by importing the os class, and using os.popen() for the "ps" command, and os.execv() for the ssh command.