함수 is ipmiping()

Jmnote bot (토론 | 기여)님의 2020년 11월 2일 (월) 02:36 판 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)


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 }}