/usr/libexec/lsd occupied 100% CPU solution

Suddenly discovered a large number of writes on the disk recently,Open the task manager,Found a process called "lsd" continues to occupy 20% – 40% CPU,Very strange。

After some inquiries,Learned that this process is a system process on macOS and iOS,Full name is "Launch Service Daemon",Responsible for all App file type association and startup。But its database is sometimes damaged,This causes it to frequently read and verify certain data。

Once its database is damaged,You will encounter lsd occupation 100% CPU,Or a lot of memory,Even huge disk writes...

In short,We can make it re-register all necessary files,Rebuild the database: find /System/Library/Frameworks -type f -name "lsregister" -exec {} -kill -seed -r \;

or,Use this command: /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user This theoretically performs the same task as the previous sentence,Just the former search lsregister And the latter directly gives the path。

References:

https://discussions.apple.com/thread/8365107?answerId=33313731022#33313731022

https://discussions.apple.com/thread/250050422?answerId=250085966022#250085966022

 

Original article written by Gerber drop-off:R0uter's Blog » /usr/libexec/lsd occupied 100% CPU solution

Reproduced Please keep the source and description link:https://www.logcg.com/archives/3382.html

About the Author

R0uter

The non-declaration,I have written articles are original,Reproduced, please indicate the link on this page and my name。

Comments

  1. Yes! The first command, run as root worked. lsd is no longer using 100% cpu and my Mac is not horribly slow.
    sudo find /System/Library/Frameworks -type f -name “lsregister” -exec {} -kill -seed -r \;

  2. How long will the reconstruction process of this database take? I used this command because the preview of some files is abnormal,The preview is now normal,But always occupy the cpu in the background,It's been a day,46G write capacity,

    1. These two commands are not the same,I tried the above command,Does not occupy cpu now。It seems that the additional parameters will cause problems,It may also be a problem with the macOS version.,I think it seems to be 2009 when the following order was first given on the Internet,,,

          1. Solved the case,Qlmarkdown conflicts with the finder plugin of Nut Cloud,,,Everything is normal after uninstalling Nut Cloud。(Stupid Nutstore,,,)

Leave a Reply

Your email address will not be published. Required fields are marked *