Move getting process pids for server to separate function