a handler for the heap state shell command