溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

systemd switched-root的deserialize參數(shù)有什么用

發(fā)布時間:2022-01-04 17:43:21 來源:億速云 閱讀:1026 作者:iii 欄目:云計算

本篇內(nèi)容主要講解“systemd switched-root的deserialize參數(shù)有什么用”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實用性強(qiáng)。下面就讓小編來帶大家學(xué)習(xí)“systemd switched-root的deserialize參數(shù)有什么用”吧!

systemd --switched-root --deserialize的這兩個參數(shù)是內(nèi)部用的,用于源代碼中,不對外提供接口。

系統(tǒng)中可以通過ps命令來查看,為1號進(jìn)程:

實例1:

root          1  0.0  0.4  45808  4092 ?        Ss   Aug22   0:02 /usr/lib/systemd/systemd --system --deserialize 15

實例2:

root          1  0.0  0.4 128096  4144 ?        Ss   Aug22   0:02 /usr/lib/systemd/systemd --switched-root --system --deserialize 21

These are intentionally undocumented internal parts of systemd. Very simply, therefore:

  • --deserialize is used to restore saved internal state that a previous invocation of systemdexec()ing this one, has written out to a file. Its option argument is an open file descriptor for that process.

  • --switched-root is used to tell this invocation of systemd that it has been invoked from systemd managing an initramfs, and so should behave accordingly — including turning off some of the behaviour otherwise caused by --deserialize.

It's a good answer. To expand on this a bit: systemd running with --deserialize --switched-root essentially means systemd was also used in the initramfs. Nowadays this is pretty common, so those two options are to be expected in the command line of PID 1. 


到此,相信大家對“systemd switched-root的deserialize參數(shù)有什么用”有了更深的了解,不妨來實際操作一番吧!這里是億速云網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢,關(guān)注我們,繼續(xù)學(xué)習(xí)!

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI