Skip to content

Commit

Permalink
New template Linux: dmidecode -t processor (#1996)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilmonkey19 authored Feb 14, 2025
1 parent 53439d9 commit 2bd0630
Show file tree
Hide file tree
Showing 4 changed files with 139 additions and 0 deletions.
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,7 @@ juniper_junos_show_vlans.textfsm, .*, juniper_junos, sh[[ow]] vl[[ans]]

juniper_screenos_get_route.textfsm, .*, juniper_screenos, get route

linux_dmidecode_-t_processor.textfsm, .*, linux, dmidecode -t processor
linux_ip_address_show.textfsm, .*, linux, ip a[[ddress]] [[show]]
linux_ip_route_show.textfsm, .*, linux, ip r[[oute]] [[show]]
linux_ip_link_show.textfsm, .*, linux, ip l[[ink]] [[show]]
Expand Down
59 changes: 59 additions & 0 deletions ntc_templates/templates/linux_dmidecode_-t_processor.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Value CPU_SOCKET_DESIGNATION (\S+)
Value CPU_TYPE (\S.+\S)
Value CPU_FAMILY (\S.+\S)
Value CPU_MANUFACTURER (\S.+\S)
Value CPU_ID (\S.+\S)
Value CPU_SIGNATURE (\S.+\S)
Value CPU_VERSION (\S.+\S)
Value CPU_VOLTAGE (\S.+\S)
Value CPU_MAX_SPEED (\S.+\S)
Value CPU_EXTERNAL_CLOCK (\S.+\S)
Value CPU_CURRENT_SPEED (\S.+\S)
Value CPU_STATUS (\S.+\S)
Value CPU_UPGRADE (\S.+\S)
Value CPU_CORE_COUNT (\S+)
Value CPU_CORE_ENABLED (\S+)
Value CPU_THREAD_COUNT (\S+)
Value List CPU_CHARACTERISTICS (\S.*\S)

Start
^\s*\#\s+dmidecode\s+\S+\s*$$
^\s*\#\s+SMBIOS\s+entry\s+point\s+at\s+\S+\s*$$
^\s*Getting\s+SMBIOS\s+data\s+from\s+sysfs\.\s*$$
^\s*SMBIOS\s+\d+\.\d+(?:.\d+)?\s+present\.\s*$$
^\s*\#\s+SMBIOS\s+implementations\s+newer\s+than\s+version\s+\d+\.\d+\s+are\s+not\s*$$
^\s*\#\s+fully\s+supported\s+by\s+this\s+version\s+of\s+dmidecode\.\s*$$
^\s*$$
^\s*Handle\s+\S+,\s+DMI\s+type\s+\d+,\s+\d+\s+bytes$$ -> processor_info
^. -> Error

processor_info
^\s*Processor\s+Information\s*$$
^\s*Socket\s+Designation:\s+${CPU_SOCKET_DESIGNATION}\s*$$
^\s*Type:\s+${CPU_TYPE}\s*$$
^\s*Family:\s+${CPU_FAMILY}\s*$$
^\s*Manufacturer:\s+${CPU_MANUFACTURER}\s*$$
^\s*ID:\s+${CPU_ID}\s*$$
^\s*Signature:\s+${CPU_SIGNATURE}\s*$$
^\s*Flags:\s*$$
^\s*\S+\s+\(\S.+\S\)\s*$$
^\s*Version:\s+${CPU_VERSION}\s*$$
^\s*Voltage:\s+${CPU_VOLTAGE}\s*$$
^\s*External\s+Clock:\s+${CPU_EXTERNAL_CLOCK}\s*$$
^\s*Max\s+Speed:\s+${CPU_MAX_SPEED}\s*$$
^\s*Current\s+Speed:\s+${CPU_CURRENT_SPEED}\s*$$
^\s*Status:\s+${CPU_STATUS}\s*$$
^\s*Upgrade:\s+${CPU_UPGRADE}\s*$$
^\s*L1\s+Cache\s+Handle:\s+\S+\s*$$
^\s*L2\s+Cache\s+Handle:\s+\S+\s*$$
^\s*L3\s+Cache\s+Handle:\s+\S+\s*$$
^\s*Serial\s+Number:\s+\S.+\S\s*$$
^\s*Asset\s+Tag:\s+\S.+\S\s*$$
^\s*Part\s+Number:\s+\S.+\S\s*$$
^\s*Core\s+Count:\s+${CPU_CORE_COUNT}\s*$$
^\s*Core\s+Enabled:\s+${CPU_CORE_ENABLED}\s*$$
^\s*Thread\s+Count:\s+${CPU_THREAD_COUNT}\s*$$
^\s*Characteristics:\s*$$
^\s*${CPU_CHARACTERISTICS}\s*$$
^\s*$$ -> Record
^. -> Error
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# dmidecode 1.1
SMBIOS 1.1 present.

Handle 0x0004, DMI type 4, 42 bytes
Processor Information
Socket Designation: CPU 1
Type: Central Processor
Family: Core 2 Quad
Manufacturer: AMD
ID: AA AA AA AA AA AA AA AA
Signature: Type 0, Family 1, Model 2, Stepping 3
Flags:
FPU (Floating-point unit on-chip)
VME (Virtual mode extension)
DE (Debugging extension)
PSE (Page size extension)
TSC (Time stamp counter)
MSR (Model specific registers)
PAE (Physical address extension)
MCE (Machine check exception)
CX8 (CMPXCHG8 instruction supported)
APIC (On-chip APIC hardware supported)
SEP (Fast system call)
MTRR (Memory type range registers)
PGE (Page global enable)
MCA (Machine check architecture)
CMOV (Conditional move instruction supported)
PAT (Page attribute table)
PSE-36 (36-bit page size extension)
CLFSH (CLFLUSH instruction supported)
DS (Debug store)
ACPI (ACPI supported)
MMX (MMX technology supported)
FXSR (FXSAVE and FXSTOR instructions supported)
SSE (Streaming SIMD extensions)
SSE2 (Streaming SIMD extensions 2)
SS (Self-snoop)
HTT (Multi-threading)
TM (Thermal monitor supported)
PBE (Pending break enabled)
Version: Intel(R) AAAA(R) CPU A1111 @ 1.10GHz
Voltage: 1.2 V
External Clock: 133 MHz
Max Speed: 1100 MHz
Current Speed: 1100 MHz
Status: Populated, Enabled
Upgrade: Slot 1
L1 Cache Handle: 0x0001
L2 Cache Handle: 0x0002
L3 Cache Handle: 0x0003
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: Not Specified
Core Count: 1
Core Enabled: 1
Thread Count: 1
Characteristics:
128-bit capable
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
parsed_sample:
- cpu_characteristics:
- "Socket Designation: CPU 1"
- "128-bit capable"
cpu_core_count: "1"
cpu_core_enabled: "1"
cpu_current_speed: "1100 MHz"
cpu_external_clock: "133 MHz"
cpu_family: "Core 2 Quad"
cpu_id: "AA AA AA AA AA AA AA AA"
cpu_manufacturer: "AMD"
cpu_max_speed: "1100 MHz"
cpu_signature: "Type 0, Family 1, Model 2, Stepping 3"
cpu_socket_designation: ""
cpu_status: "Populated, Enabled"
cpu_thread_count: "1"
cpu_type: "Central Processor"
cpu_upgrade: "Slot 1"
cpu_version: "Intel(R) AAAA(R) CPU A1111 @ 1.10GHz"
cpu_voltage: "1.2 V"

0 comments on commit 2bd0630

Please sign in to comment.