I profile running Java applications often with VisualVM but it needs X to run on the machine.
I know I can connect through management port but that will be an offlin
We have used hprof on our servers and it definitely is better than sysouts in case you can't run a full fledged VisualVM session.
Examples of using hprof are plenty out there: