Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding juniper_junos_show_system_processes_brief.textfsm support #1922

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ cisco_ios_show_nve_peers.textfsm, .*, cisco_ios, sh[[ow]] nv[[e]] p[[eers]]
cisco_ios_show_route-map.textfsm, .*, cisco_ios, sh[[ow]] route-m[[ap]]
cisco_ios_show_snmp_user.textfsm, .*, cisco_ios, sh[[ow]] sn[[mp]] u[[ser]]
cisco_ios_show_ip_route.textfsm, .*, cisco_ios, sh[[ow]] ip r[[oute]]
cisco_ios_show_platform.textfsm, .*, cisco_ios, sh[[ow]] plat[[form]]
cisco_ios_show_platform.textfsm, .*, cisco_ios, sh[[ow]] plat[[form]]
cisco_ios_show_vrrp_all.textfsm, .*, cisco_ios, sh[[ow]] vrr[[p]] a[[ll]]
cisco_ios_show_aliases.textfsm, .*, cisco_ios, sh[[ow]] alia[[ses]]
cisco_ios_show_archive.textfsm, .*, cisco_ios, sh[[ow]] arc[[hive]]
Expand Down Expand Up @@ -713,6 +713,7 @@ ipinfusion_ocnos_show_lldp_table.textfsm, .*, ipinfusion_ocnos, show ll[[dp]] t[
juniper_junos_show_chassis_cluster_interfaces.textfsm, .*, juniper_junos, sh[[ow]] ch[[assis]] c[[luster]] i[[nterface]]
juniper_junos_show_ethernet-switching_table.textfsm, .*, juniper_junos, sh[[ow]] et[[hernet-switching]] t[[able]]
juniper_junos_show_chassis_cluster_status.textfsm, .*, juniper_junos, sh[[ow]] ch[[assis]] c[[luster]] s[[tatus]]
juniper_junos_show_system_processes_brief.textfsm, .*, juniper_junos, show[[ow]] s[[ystem]] p[[rocesses]] b[[rief]]
juniper_junos_show_chassis_firmware.textfsm, .*, juniper_junos, sh[[ow]] ch[[assis]] fi[[rmware]]
juniper_junos_show_chassis_hardware.textfsm, .*, juniper_junos, sh[[ow]] ch[[assis]] ha[[ardware]]
juniper_junos_show_lacp_interfaces.textfsm, .*, juniper_junos, sh[[ow]] la[[cp]] i[[nterfaces]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Value NODE (\S+)
Value MEMORY_FORMAT (\w)
Value SWAP_FORMAT (\w)
Value MEMORY_ACTIVE (\d*\D*\d*)
Value MEMORY_FREE (\d*\D*\d*)
Value MEMORY_USED (\d*\D*\d*)
Value MEMORY_BUFFER (\d*\D*\d*)
Value SWAP_TOTAL (\d*\D*\d*)
Value SWAP_FREE (\d*\D*\d*)
Value SWAP_USED (\d*\D*\d*)
Value SWAP_AVAIL (\d*\D*\d*)

Start
^-+\s*$$
^node:\s*${NODE}
^top\s*
^Tasks:\s*
^\%Cpu
^${MEMORY_FORMAT}iB\s+(Mem|MEMORY)\s+:\s+${MEMORY_ACTIVE}\s+total,\s+${MEMORY_FREE}\s+free,\s+${MEMORY_USED}\s+used,\s+${MEMORY_BUFFER}\s+buff/cache\s*
^${SWAP_FORMAT}iB\s+Swap:\s+${SWAP_TOTAL}\s+total,\s+${SWAP_FREE}\s+free,\s+${SWAP_USED}\s+used\.\s+${SWAP_AVAIL}\s+avail\s+(Mem|MEMORY)\s* -> Record
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
-------------------------------
node: fpc0
-------------------------------
top - 00:49:18 up 149 days, 5:29, 0 users, load average: 0.85, 1.08, 0.99
Tasks: 271 total, 1 running, 270 sleeping, 0 stopped, 0 zombie
%Cpu(s): 2.0 us, 0.8 sy, 0.0 ni, 97.3 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 31554.4 total, 17292.4 free, 10600.3 used, 3661.7 buff/cache
MiB Swap: 100.0 total, 100.0 free, 0.0 used. 19854.3 avail Mem
-------------------------------
node: re0
-------------------------------
top - 00:49:18 up 149 days, 5:32, 1 user, load average: 1.01, 0.97, 0.93
Tasks: 536 total, 1 running, 533 sleeping, 0 stopped, 2 zombie
%Cpu(s): 1.5 us, 0.3 sy, 0.0 ni, 97.6 id, 0.0 wa, 0.3 hi, 0.3 si, 0.0 st
MiB Mem : 128191.6 total, 65543.4 free, 17551.4 used, 45096.8 buff/cache
MiB Swap: 8192.0 total, 8192.0 free, 0.0 used. 108490.7 avail Mem
-------------------------------
node: re1
-------------------------------
top - 00:49:18 up 149 days, 5:32, 0 users, load average: 0.30, 0.29, 0.27
Tasks: 407 total, 1 running, 406 sleeping, 0 stopped, 0 zombie
%Cpu(s): 2.1 us, 2.7 sy, 0.0 ni, 94.6 id, 0.0 wa, 0.3 hi, 0.3 si, 0.0 st
MiB Mem : 128191.6 total, 93230.9 free, 6286.2 used, 28674.5 buff/cache
MiB Swap: 4096.0 total, 1131.7 free, 2964.2 used. 119812.1 avail Mem
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
parsed_sample:
- memory_active: "31554.4"
memory_buffer: "3661.7"
memory_free: "17292.4"
memory_used: "10600.3"
memory_format: "M"
node: "fpc0"
swap_avail: "19854.3"
swap_format: "M"
swap_free: "100.0"
swap_total: "100.0"
swap_used: "0.0"
- memory_active: "128191.6"
memory_buffer: "45096.8"
memory_free: "65543.4"
memory_used: "17551.4"
memory_format: "M"
node: "re0"
swap_avail: "108490.7"
swap_format: "M"
swap_free: "8192.0"
swap_total: "8192.0"
swap_used: "0.0"
- memory_active: "128191.6"
memory_buffer: "28674.5"
memory_free: "93230.9"
memory_used: "6286.2"
memory_format: "M"
node: "re1"
swap_avail: "119812.1"
swap_format: "M"
swap_free: "1131.7"
swap_total: "4096.0"
swap_used: "2964.2"