get the state of gen_server