함수 is ipmiping()


1 Bash[ | ]

PING_TIMEOUT=2
PING_HOST=8.8.8.8
IS_IPMIPING=`ipmiping -c1 -t$PING_TIMEOUT $PING_HOST | grep 'in time' | awk '{print $4}'`
echo $IS_IPMIPING
# 0

2 PHP[ | ]

  • Linux
function is_ipmiping($host, $timeout = 2) {
	return exec("ping -c1 -t$timeout $host | grep 'in time' | awk '{print $4}'");
}

3 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}