abstract fetch stat to a single command.