1. 程式人生 > 實用技巧 >什麼是opendirectoryed,為什麼它可以在Mac上執行?

什麼是opendirectoryed,為什麼它可以在Mac上執行?

You’re checking Activity Monitor,seeing what’s taking up resources on your Mac, when you notice a process called opendirectoryd. What does that even mean?

當您注意到一個名為opendirectoryd的程序時,您正在檢查Activity Monitor ,檢視Mac上正在佔用的資源。 那有什麼意思?

This article is part of our ongoing seriesexplaining various processes found in Activity Monitor, like

kernel_task, hidd, mdsworker, installd, WindowServer, blued, launchd, backup, and many others. Don’t know what those services are? Better start reading!

這篇文章是一部分我們正在進行一系列解釋各種程序在活動監視器中發現,像kernel_taskhiddmdsworkerINSTALLDWindowServer發藍launchd會備份,和其他許多人。 不知道這些服務是什麼? 最好開始閱讀!

This particular process, opendirectoryd, is a key part of macOS. It is a daemon, which means it runs in the background performing system tasks, and it’s the main process of

Open Directory, the directory service used by macOS. A directory service handles most everything related to local networking, including users and shared folders. To quote the opendirectoryd man page:

這個特定的過程,在opendirectory下,是macOS的關鍵部分。 它是一個守護程式,這意味著它在後臺執行以執行系統任務,並且是Open Directory (macOS使用的目錄服務)的主要過程。 目錄服務處理與本地網路相關的大多數事務,包括使用者和共享資料夾。 引用

opendirectoryd手冊頁

Open Directory forms the foundation of how Mac OS X accesses all authoritative configuration information (users, groups, mounts, managed desktop data, etc.).

Open Directory構成了Mac OS X如何訪問所有權威配置資訊(使用者,組,裝載,託管桌面資料等)的基礎。

The process is particularly important in macOS environments connected to a server, but also serves an important purpose for home users who do things like share files over the network or connect to Wi-Fi enabled printers.

該過程在連線到伺服器的macOS環境中尤其重要,但對於執行諸如通過網路共享檔案或連線到支援Wi-Fi的印表機之類的家庭使用者而言,此過程也非常重要。

如何配置開放目錄 (How to Configure Open Directory)

The man page goes on to say that configuring opendirectoryd mainly happens through the “Users & Groups” section of System Preferences.

該手冊頁繼續說,配置opendirectoryed主要是通過“系統偏好設定”的“使用者和組”部分進行的。

We’ve explained how to set up multiple user accounts in the past, including network-only accounts. You didn’t know it, but you were configuring Open Directory when you did that.

我們已經解釋了過去如何設定多個使用者帳戶,包括僅網路帳戶。 您不知道它,但是您在配置Open Directory時就這麼做了。

And you can dig in deeper, if you’re curious. For more granular control over opendirectoryd you should open the Directory Utility, which you can find from this window. First, click the Login Options button in the left hand panel, then click the “Join” button.

如果您感到好奇,則可以深入研究。 要對opendirectoryed進行更精細的控制,應開啟“目錄實用程式”,您可以在此視窗中找到它。 首先,單擊左側面板中的“登入選項”按鈕,然後單擊“加入”按鈕。

You’ll find a button for the Directory Utility; click it.

您將找到目錄實用程式的按鈕; 點選它。

Now you’ve opened the Directory Utility, which will give you a comprehensive look at what opendirectoryd is doing for you.

現在,您已經打開了目錄實用程式,它將使您全面瞭解opendirectoryed為您提供的服務。

Don’t change anything unless you really, really know what you’re doing, because this is not exactly user friendly. But digging through here should give you a pretty good idea of what it is opendirectoryd does.

除非您真的非常瞭解自己在做什麼,否則請不要進行任何更改,因為這並非完全使用者友好。 但是在這裡進行深入研究應該可以使您對opendirectoryed的功能有一個很好的瞭解。

如果opendirectoryed正在消耗系統資源 (If opendirectoryd Is Using Up System Resources)

It’s relatively rare for opendirectoryd to take up much in the way of system resources, and it tends to mainly happen in managed environments. If you work in an office with a central server, let IT staff know if opendirectoryd is taking up system resources: there might be some issues with your network.

opendirectory佔用系統資源的方式相對很少,而且通常主要發生在託管環境中。 如果您在帶有中央伺服器的辦公室中工作,請讓IT人員知道opendirectoryed是否正在佔用系統資源:您的網路可能存在一些問題。

If you’re just a home user experiencing these sorts of problems, restarting your Mac will solve any spike in opendirectoryd’s resource usage most of the time. If problems persist you’ll have to do some digging, because there are all sorts of reasons this might be happening. Etrecheck runs dozens of diagnostics at once; run that and see if any networking related issues come up. If you don’t find anything consider heading to the Apple Store.

如果您只是遇到此類問題的家庭使用者,那麼重新啟動Mac可以在大多數情況下解決opendirectoryd資源使用方面的任何高峰。 如果問題仍然存在,則必須進行一些挖掘,因為有各種原因可能會發生這種情況。 Etrecheck一次執行數十個診斷程式; 執行它,看看是否有任何與網路相關的問題。 如果找不到任何內容,請考慮前往Apple Store。

Photo Credit: Helloquence

圖片來源: Helloquence

翻譯自: https://www.howtogeek.com/321324/what-is-opendirectoryd-and-why-is-it-running-on-my-mac/