게시물 1,376건
   
dd status 표시
글쓴이 : 최고관리자 날짜 : 2016-08-16 (화) 13:34 조회 : 4074
글주소 :
                                
:: dd 상태진행 표시
  블록 복제하거나....원하는 사이즈 파일을 만들때 사용

1.  PV(Pipe Viewer) 사용
# sudo apt-get install pv
# dd if=/dev/zero | pv | dd of=test.img bs=2048 count=1000000
dd: warning: partial read (1024 bytes); suggest iflag=fullblock
982442+17558 레코드 들어옴] [            <=>                  ]
982442+17558 레코드 나감
2030613504 bytes (2.0 GB, 1.9 GiB) copied, 5.38553 s, 377 MB/s
1.89GiB 0:00:05 [ 359MiB/s] [              <=>                 ]

※ pv options ( -tpreb )
-t, --timer          Turn the timer on.  This will display the total elapsed time that pv has been running for.
-p, --progress   Turn the progress bar on.  If standard input is not a file and no size was given (with the -s modifier), the progress bar cannot indicate how close to completion the transfer is, so it will just  move  left  and right to indicate that data is moving.
-r ,--rate            Turn the rate counter on.  This will display the current rate of data transfer.
-e, --eta            Turn the ETA timer on.  This will attempt to guess, based on previous transfer rates and the total data size, how long it will be before completion.  This option will have no effect if the total data size cannot be determined.
-b, --bytes        Turn the total byte counter on.  This will display the total amount of data transferred so far.

dialog 화면하고  연동
# sudo apt-get install dialog
# (pv -n /dev/sda | dd of=/dev/sdb bs=128M conv=notrunc,noerror) 2>&1 | dialog --gauge "Running dd command (cloning), please wait..." 10 70 0



2. status=progress
status 옵션중 progress는 coreutils >= 8.24 부터 지원
Ubuntu 16.04 에서는 기본버전이 8.25

# dpkg --list |grep coreutils
ii  coreutils                          8.25-2ubuntu2                       amd64        GNU core utilities

# dd if=/dev/zero of=test.img bs=2048 count=1000000 status=progress
1471096832 bytes (1.5 GB, 1.4 GiB) copied, 2 s, 736 MB/s
1000000+0 레코드 들어옴
1000000+0 레코드 나감
2048000000 bytes (2.0 GB, 1.9 GiB) copied, 2.77894 s, 737 MB/s


참고 http://askubuntu.com/questions/215505/how-do-you-monitor-the-progress-of-dd

이름 패스워드
비밀글 (체크하면 글쓴이만 내용을 확인할 수 있습니다.)
왼쪽의 글자를 입력하세요.
   

 



 
사이트명 : 모지리네 | 대표 : 이경현 | 개인커뮤니티 : 랭키닷컴 운영체제(OS) | 경기도 성남시 분당구 | 전자우편 : mojily골뱅이chonnom.com Copyright ⓒ www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.