change pid into grep_pattern