You seem to run a unix like system since you're talking about the PID.
Indeed use
ps aux | grep processname
under windows you could do the same using
cygwin i think, and there is a 'kill' command for windows (external program something to be found
here).