Not sure what exactly you're trying to do, but is it any more complicated than just calling
gcore passing it the SplunkWeb process id number?
Here is what i found:
when you have a case of "slunkweb" hangs, you can ask the customer to do the following:
Get the pid of splunkweb.
pstack pid > splunkweb.pstack
This will create a file named splunkweb.pstack.
This will create a file named core.pid. Upload these files to support and one of our friendly dev's will somehow get their hands on them.