久久精品人人爽,华人av在线,亚洲性视频网站,欧美专区一二三

linux中如何使用Sosreport

139次閱讀
沒有評論

共計 2605 個字符,預計需要花費 7 分鐘才能閱讀完成。

這篇文章將為大家詳細講解有關 linux 中如何使用 Sosreport,丸趣 TV 小編覺得挺實用的,因此分享給大家做個參考,希望大家閱讀完這篇文章后可以有所收獲。

Sosreport  :一個可擴展、可移植的支持數據收集工具。它是一個從類 Unix   操作系統中收集系統配置詳細信息和診斷信息的工具。當用戶提出支持服務單時,他 / 她必須運行此工具并將由 Sosreport 工具生成的結果報告發送給  Red Hat 支持人員。然后,執行人員將根據報告進行初步分析,并嘗試找出系統中的問題。不僅在 RHEL 系統上,你可以在任何類 Unix   操作系統上使用它來收集系統日志和其他調試信息。

安裝 Sosreport

Sosreport 在 Red Hat 官方系統倉庫中,因此你可以使用 Yum 或 DNF 包管理器安裝它,如下所示。

$ sudo yum install sos

要么,

$ sudo dnf install sos

在 Debian、Ubuntu 和 Linux Mint 上運行:

$ sudo apt install sosreport

用法

安裝后,運行以下命令以收集系統配置詳細信息和其他診斷信息。

$ sudo sosreport

系統將要求你輸入系統的一些詳細信息,例如系統名稱、案例 ID 等。相應地輸入詳細信息,然后按回車鍵生成報告。如果你不想更改任何內容并使用默認值,只需按回車鍵即可。

我的 CentOS 7 服務器的示例輸出:

sosreport (version 3.5) This command will collect diagnostic and configuration information fromthis CentOS Linux system and installed applications. An archive containing the collected information will be generated in/var/tmp/sos.DiJXi7 and may be provided to a CentOS supportrepresentative. Any information provided to CentOS will be treated in accordance withthe published support policies at: https://wiki.centos.org/ The generated archive may contain data considered sensitive and itscontent should be reviewed by the originating organization before beingpassed to any third party. No changes will be made to system configuration. Press ENTER to continue, or CTRL-C to quit. Please enter your first initial and last name [server.ostechnix.local]:Please enter the case id that you are generating this report for []: Setting up archive ...Setting up plugins ...Running plugins. Please wait ... Running 73/73: yum...Creating compressed archive... Your sosreport has been generated and saved in:/var/tmp/sosreport-server.ostechnix.local-20180628171844.tar.xz The checksum is: 8f08f99a1702184ec13a497eff5ce334 Please send this file to your support representative.

如果你不希望系統提示你輸入此類詳細信息,請如下使用批處理模式。

$ sudo sosreport --batch

正如你在上面的輸出中所看到的,生成了一個歸檔報告并保存在 /var/tmp/sos.DiJXi7 中。在 RHEL 6/CentOS 6 中,報告將在 /tmp 中生成。你現在可以將此報告發送給你的支持人員,以便他可以進行初步分析并找出問題所在。

你可能會擔心或想知道報告中的內容。如果是這樣,你可以通過運行以下命令來查看它:

$ sudo tar -tf /var/tmp/sosreport-server.ostechnix.local-20180628171844.tar.xz

要么,

$ sudo vim /var/tmp/sosreport-server.ostechnix.local-20180628171844.tar.xz

請注意,上述命令不會解壓存檔,而只顯示存檔中的文件和文件夾列表。如果要查看存檔中文件的實際內容,請首先使用以下命令解壓存檔:

$ sudo tar -xf /var/tmp/sosreport-server.ostechnix.local-20180628171844.tar.xz

存檔的所有內容都將解壓當前工作目錄中 ssosreport-server.ostechnix.local-20180628171844/ 目錄中。進入目錄并使用 cat 命令或任何其他文本瀏覽器查看文件內容:

$ cd sosreport-server.ostechnix.local-20180628171844/ $ cat uptime17:19:02 up 1:03, 2 users, load average: 0.50, 0.17, 0.10

有關 Sosreport 的更多詳細信息,請參閱手冊頁。

$ man sosreport

關于“linux 中如何使用 Sosreport”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,使各位可以學到更多知識,如果覺得文章不錯,請把它分享出去讓更多的人看到。

正文完
 
丸趣
版權聲明:本站原創文章,由 丸趣 2023-08-25發表,共計2605字。
轉載說明:除特殊說明外本站除技術相關以外文章皆由網絡搜集發布,轉載請注明出處。
評論(沒有評論)
主站蜘蛛池模板: 新田县| 盈江县| 工布江达县| 紫金县| 拜泉县| 汉源县| 盐亭县| 长武县| 桂平市| 汝南县| 磐安县| SHOW| 普定县| 泰和县| 融水| 江山市| 普安县| 武清区| 东阳市| 遂溪县| 阳曲县| 建昌县| 弥勒县| 吐鲁番市| 柳河县| 新民市| 利川市| 湛江市| 公安县| 七台河市| 大田县| 汾西县| 固安县| 白河县| 石阡县| 宜兴市| 波密县| 东阿县| 澜沧| 定南县| 买车|