Linux shell編程學習筆記51: cat /proc/cpuinfo:查看CPU詳細信息

0?前言

2024年的網絡安全檢查又開始了,對于使用基于Linux的國產電腦,我們可以編寫一個腳本來收集系統的有關信息。對于中央處理器CPU比如,我們可以使用cat /proc/cpuinfo命令來收集中央處理器CPU的信息。

1.?/proc/cpuinfo?保存了系統的cpu信息

在linux系統中,/proc目錄下的文件保存了系統的軟硬件信息。

[purpleendurer @ bash /] ls -l /proc
total 0
dr-xr-xr-x ?9 csdn csdn ? ?0 5月 ?28 22:19 1
dr-xr-xr-x ?9 csdn csdn ? ?0 5月 ?28 22:22 102
dr-xr-xr-x ?9 csdn csdn ? ?0 5月 ?28 22:22 127
dr-xr-xr-x ?9 csdn csdn ? ?0 5月 ?28 22:23 155
dr-xr-xr-x ?9 csdn csdn ? ?0 5月 ?28 22:24 170
dr-xr-xr-x ?9 csdn csdn ? ?0 5月 ?28 22:19 47
dr-xr-xr-x ?9 csdn csdn ? ?0 5月 ?28 22:19 72
drwxrwxrwt ?2 root root ? 40 5月 ?28 22:19 acpi
-rw------- ?1 root root ? ?0 5月 ?28 22:23 async_load_calc
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 buddyinfo
dr-xr-xr-x ?4 root root ? ?0 5月 ?28 22:19 bus
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 cgroups
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 cmdline
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 consoles
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 cpuinfo
dr-xr-xr-x ?3 root root ? ?0 5月 ?28 22:23 cpusli
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 crypto
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 devices
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 diskstats
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 dma
dr-xr-xr-x ?4 root root ? ?0 5月 ?28 22:23 driver
dr-xr-xr-x ?3 root root ? ?0 5月 ?28 22:23 dynamic_debug
--w------- ?1 root root ? ?0 5月 ?28 22:23 dyn_isolcpus
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 execdomains
-rw-r--r-- ?1 root root ? ?0 5月 ?28 22:23 fault_events
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 fb
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:19 filesystems
dr-xr-xr-x ?9 root root ? ?0 5月 ?28 22:19 fs
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 interrupts
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 iomem
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 ioports
dr-xr-xr-x 28 root root ? ?0 5月 ?28 22:19 irq
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 kallsyms
crw-rw-rw- ?1 root root 1, 3 5月 ?28 22:19 kcore
crw-rw-rw- ?1 root root 1, 3 5月 ?28 22:19 keys
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 key-users
-r-------- ?1 root root ? ?0 5月 ?28 22:23 kmsg
-r-------- ?1 root root ? ?0 5月 ?28 22:23 kpagecgroup
-r-------- ?1 root root ? ?0 5月 ?28 22:23 kpagecount
-r-------- ?1 root root ? ?0 5月 ?28 22:23 kpageflags
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 loadavg
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 locks
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 mdstat
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:19 meminfo
dr-xr-xr-x ?3 root root ? ?0 5月 ?28 22:23 memsli
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 misc
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 modules
lrwxrwxrwx ?1 root root ? 11 5月 ?28 22:23 mounts -> self/mounts
-rw-r--r-- ?1 root root ? ?0 5月 ?28 22:23 mtrr
lrwxrwxrwx ?1 root root ? ?8 5月 ?28 22:23 net -> self/net
-r-------- ?1 root root ? ?0 5月 ?28 22:23 pagetypeinfo
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 partitions
crw-rw-rw- ?1 root root 1, 3 5月 ?28 22:19 sched_debug
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 schedstat
drwxrwxrwt ?2 root root ? 40 5月 ?28 22:19 scsi
lrwxrwxrwx ?1 root root ? ?0 5月 ?28 22:19 self -> 170
-r-------- ?1 root root ? ?0 5月 ?28 22:23 slabinfo
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 softirqs
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 stat
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 swaps
dr-xr-xr-x ?1 root root ? ?0 5月 ?28 22:19 sys
--w------- ?1 root root ? ?0 5月 ?28 22:19 sysrq-trigger
dr-xr-xr-x ?5 root root ? ?0 5月 ?28 22:23 sysvipc
lrwxrwxrwx ?1 root root ? ?0 5月 ?28 22:19 thread-self -> 170/task/170
crw-rw-rw- ?1 root root 1, 3 5月 ?28 22:19 timer_list
dr-xr-xr-x ?6 root root ? ?0 5月 ?28 22:23 tty
dr-xr-xr-x ?4 root root ? ?0 5月 ?28 22:23 unevictable
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 uptime
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 version
-r-------- ?1 root root ? ?0 5月 ?28 22:23 vmallocinfo
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 vmstat
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 zerobuddyinfo
-r--r--r-- ?1 root root ? ?0 5月 ?28 22:23 zoneinfo
[purpleendurer @ bash /]?

如果想了解和獲取系統中CPU的提供商和相關配置信息,則可以查看/proc/cpuinfo。

2.cat /proc/cpuinfo:查看CPU詳細信息

2.1?實例

2.1.1?實例1

[purpleendurer @ bash /] cat /proc/cpuinfo
processor ? ? ? : 0
vendor_id ? ? ? : GenuineIntel
cpu family ? ? ?: 6
model ? ? ? ? ? : 85
model name ? ? ?: Intel(R) Xeon(R) Platinum
stepping ? ? ? ?: 4
microcode ? ? ? : 0x1
cpu MHz ? ? ? ? : 2499.442
cache size ? ? ?: 33792 KB
physical id ? ? : 0
siblings ? ? ? ?: 2
core id ? ? ? ? : 0
cpu cores ? ? ? : 1
apicid ? ? ? ? ?: 0
initial apicid ?: 0
fpu ? ? ? ? ? ? : yes
fpu_exception ? : yes
cpuid level ? ? : 22
wp ? ? ? ? ? ? ?: yes
flags ? ? ? ? ? : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves arat
bugs ? ? ? ? ? ?: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa itlb_multihit mmio_stale_data retbleed
bogomips ? ? ? ?: 4998.88
clflush size ? ?: 64
cache_alignment : 64
address sizes ? : 46 bits physical, 48 bits virtual
power management:processor ? ? ? : 1
vendor_id ? ? ? : GenuineIntel
cpu family ? ? ?: 6
model ? ? ? ? ? : 85
model name ? ? ?: Intel(R) Xeon(R) Platinum
stepping ? ? ? ?: 4
microcode ? ? ? : 0x1
cpu MHz ? ? ? ? : 2499.442
cache size ? ? ?: 33792 KB
physical id ? ? : 0
siblings ? ? ? ?: 2
core id ? ? ? ? : 0
cpu cores ? ? ? : 1
apicid ? ? ? ? ?: 1
initial apicid ?: 1
fpu ? ? ? ? ? ? : yes
fpu_exception ? : yes
cpuid level ? ? : 22
wp ? ? ? ? ? ? ?: yes
flags ? ? ? ? ? : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves arat
bugs ? ? ? ? ? ?: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa itlb_multihit mmio_stale_data retbleed
bogomips ? ? ? ?: 4998.88
clflush size ? ?: 64
cache_alignment : 64
address sizes ? : 46 bits physical, 48 bits virtual
power management:[purpleendurer @ bash /]?

2.1.2?實例2

[purpleendurer @ bash ~] cat /proc/cpuinfo
processor	: 0
model name	: Phytium,FT-2000/4
bogomips	: 3456.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
flags		: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x70
CPU architecture: 8
CPU variant	: 0x1
CPU part	: 0x663
CPU revision	: 3processor	: 1
model name	: Phytium,FT-2000/4
bogomips	: 3456.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
flags		: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x70
CPU architecture: 8
CPU variant	: 0x1
CPU part	: 0x663
CPU revision	: 3processor	: 2
model name	: Phytium,FT-2000/4
bogomips	: 3456.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
flags		: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x70
CPU architecture: 8
CPU variant	: 0x1
CPU part	: 0x663
CPU revision	: 3processor	: 3
model name	: Phytium,FT-2000/4
bogomips	: 3456.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
flags		: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x70
CPU architecture: 8
CPU variant	: 0x1
CPU part	: 0x663
CPU revision	: 3

?

?2.2?返回信息說明

不同的系統返回的信息內容也不盡相同,以下是一些常見的信息項。

輸出項含義備注
address sizes可訪問地址空間位數
apicid用來區分不同邏輯核的編號,系統中每個邏輯核的此編號必然不同,此編號不一定連續
bogomips在系統內核啟動時粗略測算的CPU速度Million Instructions Per Second
cache_alignment緩存地址對齊單位
cache sizeCPU二級緩存大小
clflush size每次刷新緩存的大小單位
core id當前物理核在其所處CPU中的編號這個編號不一定連續
cpu cores該邏輯核所處CPU的物理核數比如此處cpu cores 是4個,那么對應core id 可能是 1、3、4、5。
cpu familyCPU產品系列代號
cpuid level執行cpuid指令前,eax寄存器中的值,根據不同的值cpuid指令會返回不同的內容
cpu MHzCPU的實際使用主頻
flags當前CPU支持的功能
fpu是否具有浮點運算單元(Floating Point Unit)
fpu_exception是否支持浮點計算異常
initial apicid
microcode

model

CPU屬于其系列中的哪一代的代號
model nameCPU全名,包括處理器品牌。一旦您知道您擁有的 CPU 的確切類型,您就可以查看有關處理器規格的產品文檔。CPU屬于的名字及其編號、標稱主頻
processor

系統中邏輯處理核心的編號,從0開始排序。

對于單核處理器,則認為是其CPU編號

對于多核處理器則可以是物理核、或者使用超線程技術虛擬的邏輯核

physical id單個CPU的標號
power management?對能源管理的支持
siblings單個CPU邏輯物理核數
steppingCPU屬于制作更新版本
vendor_idCPU制造商
wp表明當前CPU是否在內核態支持對用戶空間的寫保護Write Protection

2.3?關于物理CPU、核數、邏輯cpu數的概念

2.3.1 物理CPU數(physical id)

主板上實際插入的cpu數量,可以數不重復的 physical id 有幾個

2.3.2 CPU核心數(cpu cores)

單塊CPU上面能處理數據的芯片組的數量,如雙核、四核等?

2.3.3邏輯CPU數

一般情況下:

在不支持超線程技術或沒有開啟次技術的情況下:

邏輯CPU=物理CPU個數×每顆核數

在服務器的CPU支持超線程技術的情況下:

邏輯CPU=物理CPU個數×每顆核數 *2??

簡單來說,在這種情況下,處理器中的1 顆內核會像2 顆內核那樣在操作系統中發揮作用。

這樣一來,操作系統可使用的執行資源擴大了一倍,大幅提高了系統的整體性能。

3?應用實例

3.1?grep -m 1 'model name' /proc/cpuinfo :顯示CPU名稱

[purpleendurer @ bash ~] grep -m 1 'model name' /proc/cpuinfo?
model name ? ? ?: Intel(R) Xeon(R) Platinum
[purpleendurer @ bash ~]?

3.2?grep -c 'model name' /proc/cpuinfo:顯示CPU數量

[purpleendurer @ bash ~] grep -c 'model name' /proc/cpuinfo
2
[purpleendurer @ bash ~]?

3.3?grep -c "cpu cores" /proc/cpuinfo :?獲取CPU核數

[purpleendurer @ bash ~] grep -c "cpu cores" /proc/cpuinfo
2
[purpleendurer @ bash ~]?

3.4?grep -c "processor" /proc/cpuinfo:獲取系統中的邏輯CPU數量

[purpleendurer @ bash ~] grep -c "processor" /proc/cpuinfo?
2
[purpleendurer @ bash ~]?

3.5 grep -c "siblings" /proc/cpuinfo:獲取每個物理CPU中邏輯CPU的個數?

[purpleendurer @ bash ~] grep -c "siblings" /proc/cpuinfo
2
[purpleendurer @ bash ~]?

3.6?檢測cpu是否使用了超級程Hyper-Threading

我們可以通過比較cpu cores數量和siblings數量來判斷:

如果cpu cores數量和siblings數量一致,說明沒有啟用超線程,否則就是啟用了超線程。

我們把cpu cores數量保存到變量a,把siblings數量保存到變量b,然后用if語句比變量a和b的值,并輸出相應的結果

[purpleendurer @ bash ~] grep -c "cpu cores" ?/proc/cpuinfo
2
[purpleendurer @ bash ~] grep -c "siblings" ?/proc/cpuinfo
2
[purpleendurer @ bash ~] a=$(grep -c "cpu cores" ?/proc/cpuinfo);b=$(grep -c "siblings" ?/proc/cpuinfo);if [ $a = $b ]; then echo 'No Hyper-Threading'; else echo 'Hyper-Threading'; ?fi
No Hyper-Threading
[purpleendurer @ bash ~]?

?cpu cores數量和siblings數量一致,都是2,說明沒有啟用超線程。

4.其它相關命令

?除了利用/proc/cpuinfo文件,我們還可以使用其它命令,比如?lscpu、nproc,留待下回講解。

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/bicheng/18415.shtml
繁體地址,請注明出處:http://hk.pswp.cn/bicheng/18415.shtml
英文地址,請注明出處:http://en.pswp.cn/bicheng/18415.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

樹莓派開箱

1.樹莓派4B配置 CPU:64位1.5GHZ四核處理器。 GPU:Broadcom VideoCore VI500MHZ 藍牙5.0 電源Type C(5V 3A),也可以使用排針鏈接5V鋰電池最大放電電流必須達到3A。 還有千兆以太網等以后用到再說。 接下來進入文章重點 2.鏡像文件燒錄 前期準備:1…

「TypeScript系列」TypeScript 命名空間

文章目錄 一、TypeScript 命名空間1. 使用命名空間2. 命名空間與模塊的區別3. 總結 二、命名空間使用場景1. 防止命名沖突2. 組織和管理代碼3. 兼容其他庫或框架4. 大型項目中封裝功能模塊5. 總結 三、命名空間有哪些優缺點1. 優點:2. 缺點: 四、相關鏈接…

AI賦能數字人:打造與語音節奏完美匹配的高質量手勢動畫

在數字化時代,人機交互正以前所未有的速度進化,而AI數字人的發展正是這一進程中的重要里程碑。近期,一項旨在根據語音內容自動生成匹配手勢的技術方案引起了廣泛關注,該技術不僅增強了數字人的表現力,也為遠程溝通、教育、娛樂等多個領域帶來了革新性的應用潛力。本文將深…

【leetcode1944--隊列中可以看到的人數】

有n人排成一個隊列,從左到右編號為0到n-1,height數組記錄每個人的身高,返回一個數組,記錄每個人能看到幾個人。 類比:山峰問題,高的后面的矮的看不見。 從后往前,最后一個元素入棧&#xff0c…

Apifox 更新|編排模式、Markdown 編輯器升級、自動申請 SSL 證書、用戶反饋問題優化

Apifox 新版本上線啦! 看看本次版本更新主要涵蓋的重點內容,有沒有你所關注的功能特性: 自動化測試新增「編排模式」Markdown 編輯器全新升級返回響應直接預覽 PDF 及視頻自動申請 SSL 證書支持配置自定義域名的子目錄流式接口支持篩選和清…

Canny算子

Canny算子_百度百科 (baidu.com)https://baike.baidu.com/item/Canny%E7%AE%97%E5%AD%90/8821789?frge_ala 圖像處理中最經典的邊沿檢測算法: Canny邊緣檢測_嗶哩嗶哩_bilibilihttps://www.bilibili.com/video/BV1U4411277i/?spm_id_from333.1007.top_right_bar_…

基于模糊PID控制器的汽車電磁懸架控制系統simulink建模與仿真

目錄 1.課題概述 2.系統仿真結果 3.核心程序與模型 4.系統原理簡介 5.完整工程文件 1.課題概述 基于模糊PID控制器的汽車電磁懸架控制系統simulink建模與仿真。 2.系統仿真結果 上面的仿真結果是無控制器和LQG的對比,以及有控制器和LQG的對比仿真。 3.核心程…

win10桌面右鍵-新建文件夾-死機-修復

死機->任務管理器->重新啟動 任務管理器:重新啟動“文件資源管理器”或者關閉“文件資源管理器” 快捷鍵:CtrlAltEsc 關閉后桌面黑屏重新啟動:文件->運行新任務->輸入 explorer ->確定 死機-> 事件查看器->排查錯誤 …

Qt串口異步通信案例(從機線程)

文章目錄 串口線程類初始化串口類打開串口并發送數據析構函數 窗口設置窗口函數實現 串口線程類 SlaveThread(從機線程) 目的:等待并響應來自主機的請求,然后發送預設的響應數據。 關鍵行為:線程啟動后,通過…

STL庫--string

目錄 string的定義 string中內存的訪問 string常用函數實例解析 string的定義 定義string的方式跟基本類型相同,只需要在string后跟上變量名即可: string str; 如果要初始化,可以直接給string類型的變量進行賦值: string s…

Vue3+vite項目中使用mock模擬接口

安裝依賴 分別安裝vite-plugin-mock跟mockjs兩個插件 npm install -D vite-plugin-mock mockjs vite.config.ts中添加配置,主要是紅色標記的配置 注意此處如果配置出錯可能是vite-plugin-mock依賴的版本有問題,重新安裝一下依賴指定版本即可&#xf…

Pytorch環境配置2.0.1+ Cuda11.7

查找cuda、cudnn、Pytorch(GPU)及cuda和NVIDIA顯卡驅動對應關系 查詢可支持的最高cuda版本 nvidia-smi查看支持的cuda的版本 CUDA版本對應表 我的顯卡驅動是Driver Version:535.40.,那么左邊對應的CUDA都可以兼容 右上角為CUDA 版本,可以看…

Ubuntu配置Git

安裝git sudo apt install git 查看是否安裝成功 git --version 配置git 用github上注冊的用戶名和郵箱地址,配置git git config --global user.name "username" git config --global user.email "usernameemail.com" 重啟ubuntu查看…

Collection(一)[集合體系]

說明&#xff1a;Collection代表單列集合&#xff0c;每個元素&#xff08;數據&#xff09;只包含一個值。 Collection集合體系&#xff1a; Collection<E> 接口 (一&#xff09;List<E> 接口 說明&#xff1a;添加的元素是有序、可重復、有索引。 1. ArrayLi…

vue3中的toRaw API

文章目錄 什么是toRaw API&#xff1f;為什么需要toRaw&#xff1f;如何使用toRaw&#xff1f;實際應用場景 這兩天在寫項目的時候&#xff0c;發現了一個之前沒用過的api&#xff0c;于是上網查了一下&#xff0c;發現這個api還是挺常用&#xff0c;所以在這記錄一下 什么是t…

Pytorch實用教程:多分類任務中使用的交叉熵損失函數nn.CrossEntropyLoss

nn.CrossEntropyLoss 在 PyTorch 中是處理多分類問題的常用損失函數,它是兩個函數 nn.LogSoftmax 和 nn.NLLLoss(Negative Log Likelihood Loss)的組合。使用這個損失函數可以直接從模型得到原始的輸出分數(logits),而不需要單獨對輸出進行 Softmax 處理。下面詳細介紹這…

【Postman接口測試】第二節.Postman界面功能介紹(上)

文章目錄 前言一、Postman前言介紹二、Postman界面導航說明三、使用Postman發送第一個請求四、Postman 基礎功能介紹 4.1 常見類型的接口請求 4.1.1 查詢參數的接口請求 4.1.2 表單類型的接口請求 4.1.3 上傳文件的表單請求 4.1.4 JSON 類…

HCIP-Datacom-ARST自選題庫__BGP/MPLS IP VPN簡答【3道題】

1.在BGP/MPLSIPVPN場景中&#xff0c;如果PE設備收到到達同一目的網絡的多條路由時&#xff0c;將按照定的順序選擇最優路由。請將以下內容按照比較順序進行排序。 2.在如圖所示的BGP/MPLSIP VPN網絡中&#xff0c;管理員準備通過Hub-Spoke組網實現H站點對VPM流量的集中管控&am…

C# 配置文件設置詳解

文章目錄 1. 配置文件在 C# 項目中的作用和重要性2. 不同類型的配置文件app.configconfig.exejson 3. 創建和修改配置文件文件位置添加內容修改內容保存和加載 4. 讀取和寫入配置文件app.config 文件讀取config.exe 文件寫入JSON 文件讀寫 5. 示例代碼演示6. 配置文件在安全性方…

【kubernetes】關于k8s集群的污點、容忍、驅逐以及k8s集群故障排查思路

目錄 一、污點(Taint) 1.1污點介紹 1.2污點的組成格式 1.3當前 taint effect 支持如下三個選項&#xff1a; 1.4污點的增刪改查 1.4.1驗證污點的作用——NoExecute 1.4.2驗證污點的作用——NoSchedule 1.4.3 驗證污點的作用——PreferNoSchedule 1.5污點的配置與管理…