I am running tomcat 5.5 on x86_64 CentOS 5.7 using 32-bit Oracle Java 1.6.0.
JVM process used by tomcat has 6421 pid. Tomcat is working fine.
When run
Probably the easiest way is:
see the owner of the process by ps -ef | grep "process name"
then switch to that user and run the command.
jcmd PID GC.run or any other java utility
One thing i noticed that nobody discussed here is; you also need to have JAVA_HOME variable set. check this by echo $JAVA_HOME