refactor show-cpu-and-memory.sh: fix check pid