MAC OS X lssave database rebuild

July 12, 2012 08:03 PM

얼마전부터인지는 모르겠지만 Activity Monitor에 주기적인 Disk Activity가 있는 것이 보였다. 초당 1~2메가 정도로 작은 피크이지만 아주 등간격으로 6~8초 간격으로 피크가 찍혀있는 그래프를 보고있자니 신경이 너무 쓰였다. 현진님이 iotop으로 액티비티 찍어보는 방법을 알려줘서 찍어보니 lssave라는 프로세스가 주기적으로 뭔가를 하드에 쓰고 있었다.

hyeonseok$ sudo iotop -C 5 12
Password:
dtrace: 1 dynamic variable drop with non-empty dirty list
Tracing... Please wait.
dtrace: 5 dynamic variable drops with non-empty dirty list
2012 Jul 13 10:42:14,  load: 0.59,  disk_r:   2956 KB,  disk_w:   7508 KB

  UID    PID   PPID CMD              DEVICE  MAJ MIN D            BYTES
  502    970    318                  ??       14   1               8192
  502    383    318 Adium            ??       14   1 W            20480
  502    324    318 mdworker         ??       14   1 R           102400
    0      0      0                  ??       14   1             751616
    0      1      0 launchd          ??       14   1 W           806912
  502    970    318 Opera            ??       14   1 R          2924544
  502   1071     30 lssave           ??       14   1 W          3194880
  502    970    318 Opera            ??       14   1 W          3657728

2012 Jul 13 10:42:19,  load: 0.54,  disk_r:      0 KB,  disk_w:     32 KB

  UID    PID   PPID CMD              DEVICE  MAJ MIN D            BYTES
  502    381    318 Skype            ??       14   1 W            32768

2012 Jul 13 10:42:24,  load: 0.50,  disk_r:      0 KB,  disk_w:   3240 KB

  UID    PID   PPID CMD              DEVICE  MAJ MIN D            BYTES
  502    340    318 Activity Monito  ??       14   1 W             8192
  502    970    318 Opera            ??       14   1 W           114688
  502   1078     30 lssave           ??       14   1 W          3194880

2012 Jul 13 10:42:29,  load: 0.46,  disk_r:      4 KB,  disk_w:   1000 KB

  UID    PID   PPID CMD              DEVICE  MAJ MIN D            BYTES
  502   1034    318 Terminal         ??       14   1 R             4096
  502    970    318 Opera            ??       14   1 W           327680
  502   1034    318 Terminal         ??       14   1 W           696320

2012 Jul 13 10:42:34,  load: 0.42,  disk_r:      0 KB,  disk_w:   3144 KB

  UID    PID   PPID CMD              DEVICE  MAJ MIN D            BYTES
  502    970    318 Opera            ??       14   1 W            24576
  502   1083     30 lssave           ??       14   1 W          3194880

2012 Jul 13 10:42:39,  load: 0.47,  disk_r:      0 KB,  disk_w:      0 KB

  UID    PID   PPID CMD              DEVICE  MAJ MIN D            BYTES

2012 Jul 13 10:42:44,  load: 0.43,  disk_r:      8 KB,  disk_w:   3468 KB

  UID    PID   PPID CMD              DEVICE  MAJ MIN D            BYTES
  502   1033    318 quicklookconfig  ??       14   1 R             8192
  502   1033    318 quicklookconfig  ??       14   1 W            24576
    0      0      0                  ??       14   1             268288
    0      1      0 launchd          ??       14   1 W           331776
  502   1090     30 lssave           ??       14   1 W          3194880

2012 Jul 13 10:42:49,  load: 0.55,  disk_r:      0 KB,  disk_w:     20 KB

  UID    PID   PPID CMD              DEVICE  MAJ MIN D            BYTES
  502    381    318 Skype            ??       14   1 W            20480

2012 Jul 13 10:42:54,  load: 0.51,  disk_r:      0 KB,  disk_w:   3120 KB

  UID    PID   PPID CMD              DEVICE  MAJ MIN D            BYTES
  502   1095     30 lssave           ??       14   1 W          3194880

2012 Jul 13 10:42:59,  load: 0.55,  disk_r:      0 KB,  disk_w:      0 KB

  UID    PID   PPID CMD              DEVICE  MAJ MIN D            BYTES

2012 Jul 13 10:43:04,  load: 0.50,  disk_r:    864 KB,  disk_w:   3788 KB

  UID    PID   PPID CMD              DEVICE  MAJ MIN D            BYTES
  502    970    318 Opera            ??       14   1 R           204800
  502   1034    318 Terminal         ??       14   1 R           679936
  502   1034    318 Terminal         ??       14   1 W           684032
  502   1102     30 lssave           ??       14   1 W          3194880

2012 Jul 13 10:43:09,  load: 0.46,  disk_r:    168 KB,  disk_w:     64 KB

  UID    PID   PPID CMD              DEVICE  MAJ MIN D            BYTES
  502    970    318 Opera            ??       14   1 W            65536
  502    970    318 Opera            ??       14   1 R           172032

검색해보니 lssave 데이터 베이스가 망가져서 그럴 수 있으니 데이터 베이스를 다시 만들어 보란다.

hyeonseok$ /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user

완전 알 수 없는 이상한 곳에 있는 명령을 입력했는데 프롬프트 나오는데 시간이 좀 걸린다. 명령을 실행하니 상황 종료. 오늘의 삽질 끝.

Comments

Post a comment

:

: 공개 되지 않습니다. Gravatar를 표시 합니다.

:

: HTML 태그를 사용할 수 없습니다.