<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>watch Archives - pigletstory 블로그</title>
	<atom:link href="https://pigletstory.co.kr/tag/watch/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>pigletstory</description>
	<lastBuildDate>Wed, 17 Feb 2021 10:42:15 +0000</lastBuildDate>
	<language>ko-KR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.4</generator>
<site xmlns="com-wordpress:feed-additions:1">221109878</site>	<item>
		<title># linux / Centos / Redhat watch 명령어 / 시간 명령어 #</title>
		<link>https://pigletstory.co.kr/850/</link>
					<comments>https://pigletstory.co.kr/850/#respond</comments>
		
		<dc:creator><![CDATA[piglet]]></dc:creator>
		<pubDate>Wed, 17 Feb 2021 10:42:15 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux watch]]></category>
		<category><![CDATA[linux 시간 명령어]]></category>
		<category><![CDATA[watch]]></category>
		<guid isPermaLink="false">https://pigletstory.co.kr/726-2/</guid>

					<description><![CDATA[<p># linux / Centos / Redhat watch 명령어 / 시간 명령어 # linux 에서 watch 명령어는 원하는 명령어의 결과를 원하는 시간 주기로 리프레시 하여 결과를 보여주는 명령어 입니다. hardware 의 성능 , 사용량 , 자원 등을 모니터링 하거나 특정 명령어를 반복적으로 입력해서 결과값을 확인하여야 할 때 유용하게 사용 할 수 있습니다. # watch &#8211;help # # 기본 사용방법 # watch [-d] [-n seconds] &#8216;command&#8217; 종료는 [Ctrl + c] -d 옵션은 ... <a title="# linux / Centos / Redhat watch 명령어 / 시간 명령어 #" class="read-more" href="https://pigletstory.co.kr/850/" aria-label="# linux / Centos / Redhat watch 명령어 / 시간 명령어 #에 대해 더 자세히 알아보세요">더 읽기</a></p>
<p>The post <a href="https://pigletstory.co.kr/850/"># linux / Centos / Redhat watch 명령어 / 시간 명령어 #</a> appeared first on <a href="https://pigletstory.co.kr">pigletstory 블로그</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="contents_style">
<p># linux / Centos / Redhat watch 명령어 / 시간 명령어 #</p>
<p>linux 에서 watch 명령어는 원하는 명령어의 결과를 원하는 시간 주기로 리프레시 하여 결과를 보여주는 명령어 입니다.</p>
<p>hardware 의 성능 , 사용량 , 자원 등을 모니터링 하거나 특정 명령어를 반복적으로 입력해서 결과값을 확인하여야 할 때 유용하게 사용 할 수 있습니다.</p>
<p># watch &#8211;help #</p>
<figure class="imageblock alignLeft" data-origin-width="0" data-origin-height="0" data-ke-mobilestyle="widthContent"><span data-lightbox="lightbox"><img data-recalc-dims="1" fetchpriority="high" decoding="async" class="alignnone size-full wp-image-250" src="https://i0.wp.com/pigletstory.co.kr/wp-content/uploads/2021/02/img.png?resize=531%2C358&#038;ssl=1" alt="" width="531" height="358" /></span><figcaption></figcaption></figure>
<p># 기본 사용방법 #</p>
<p>watch [-d] [-n seconds] &#8216;command&#8217;</p>
<p>종료는 [Ctrl + c]</p>
<figure class="imageblock alignLeft" data-origin-width="0" data-origin-height="0" data-ke-mobilestyle="widthContent"><span data-lightbox="lightbox"><img data-recalc-dims="1" decoding="async" class="alignnone size-full wp-image-251" src="https://i0.wp.com/pigletstory.co.kr/wp-content/uploads/2021/02/img_1.png?resize=389%2C19&#038;ssl=1" alt="" width="389" height="19" /></span><figcaption></figcaption></figure>
<p>-d 옵션은 이전 출력 결과와 비교하여 변경된 부분을 표시해 줍니다.</p>
<p>-n 옵션은 입력한 명령어의 결과를 원하는 시간(초단위) 간격으로 출력해 줍니다. *(default 값은 2초 입니다.)</p>
<p>*ex)</p>
<p>&#8211; 시스템의 uptime 값을 계속 출력 (default 값인 2초간)</p>
<p>[root@file ~]# watch uptime</p>
<figure class="imageblock alignLeft" data-origin-width="0" data-origin-height="0" data-ke-mobilestyle="widthContent"><span data-lightbox="lightbox"><img data-recalc-dims="1" decoding="async" class="alignnone size-full wp-image-252" src="https://i0.wp.com/pigletstory.co.kr/wp-content/uploads/2021/02/img_2.png?resize=574%2C57&#038;ssl=1" alt="" width="574" height="57" /></span><figcaption></figcaption></figure>
<p>&#8211; -d 옵션을 사용하여 출력 (변경된 부분을 강조)</p>
<p>[root@file ~]# watch -d uptime</p>
<figure class="imageblock alignLeft" data-origin-width="0" data-origin-height="0" data-ke-mobilestyle="widthContent"><span data-lightbox="lightbox"><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-253" src="https://i0.wp.com/pigletstory.co.kr/wp-content/uploads/2021/02/img_3.png?resize=576%2C59&#038;ssl=1" alt="" width="576" height="59" /></span><figcaption></figcaption></figure>
<p>&#8211;  변경된 부분을 강조하며 1초 간격으로 iostat 모니터링</p>
<p>[root@idisk ~]# watch -d -n 1 iostat</p>
<figure class="imageblock alignLeft" data-origin-width="0" data-origin-height="0" data-ke-mobilestyle="widthContent"><span data-lightbox="lightbox"><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-254" src="https://i0.wp.com/pigletstory.co.kr/wp-content/uploads/2021/02/img_4.png?resize=624%2C167&#038;ssl=1" alt="" width="624" height="167" /></span><figcaption></figcaption></figure>
<p>&#8211; command 가 들어갈 경우 &#8216; &#8216; 으로 묶어줍니다.</p>
<p>A 서버에서 B 서버로 파일을 이동 중인데 /data1 의 용량 늘어나는걸 계속 보고싶다</p>
<p>[root@file ~]# watch -d -n 1 &#8216;df -h&#8217;</p>
<figure class="imageblock alignLeft" data-origin-width="0" data-origin-height="0" data-ke-mobilestyle="widthContent"><span data-lightbox="lightbox"><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-255" src="https://i0.wp.com/pigletstory.co.kr/wp-content/uploads/2021/02/img_5.png?resize=428%2C212&#038;ssl=1" alt="" width="428" height="212" /></span><figcaption></figcaption></figure>
<p>&#8211; 여러가지 명령어를 조합해서 사용해 보겠습니다.</p>
<p>-d 로 변경된 사항 강조</p>
<p>-n 으로 1초 간격으로 출력</p>
<p>w 명령어로 접속자 , loadaverage , uptime 확인</p>
<p>df -h 명령어로 디스크 사용량 확인</p>
<p>현재 경로에 있는 ./memory_usage.sh 파일을 실행하여 메모리 사용량을 조회</p>
<p>[root@file woo]# watch -d -n 1 &#8216;w; df -h; ./memory_usage.sh&#8217;</p>
<figure class="imageblock alignLeft" data-origin-width="0" data-origin-height="0" data-ke-mobilestyle="widthContent"><span data-lightbox="lightbox"><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-256" src="https://i0.wp.com/pigletstory.co.kr/wp-content/uploads/2021/02/img_6.png?resize=900%2C276&#038;ssl=1" alt="" width="900" height="276" /></span><figcaption></figcaption></figure>
<p>이상 입니다.</p>
</div>
<p>The post <a href="https://pigletstory.co.kr/850/"># linux / Centos / Redhat watch 명령어 / 시간 명령어 #</a> appeared first on <a href="https://pigletstory.co.kr">pigletstory 블로그</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://pigletstory.co.kr/850/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">850</post-id>	</item>
	</channel>
</rss>
