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

New template for Huawei ONT: display memory info #2055

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
19 changes: 19 additions & 0 deletions ntc_templates/templates/huawei_ont_display_memory_info.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Value MEMORY_TOTAL (\d+)
Value MEMORY_USED (\d+)
Value MEMORY_FREE (\d+)
Value MEMORY_SHARED (\d+)
Value MEMORY_BUFFERS (\d+)
Value BUFFERS_USED (\d+)
Value BUFFERS_FREE (\d+)
Value SWAP_TOTAL (\d+)
Value SWAP_USED (\d+)
Value SWAP_FREE (\d+)

Start
^\s+total\s+used\s+free\s+shared\s+buffers
^\s*Mem:\s+${MEMORY_TOTAL}\s+${MEMORY_USED}\s+${MEMORY_FREE}\s+${MEMORY_SHARED}\s+${MEMORY_BUFFERS}\s*$$
^\s*-\/\+\s+buffers:\s+${BUFFERS_USED}\s+${BUFFERS_FREE}\s*$$
^\s*Swap:\s+${SWAP_TOTAL}\s+${SWAP_USED}\s+${SWAP_FREE}\s*$$
^\s+$$
^\s*success!\s*$$
^. -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@ hp_procurve_show_ip.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] ip
huawei_ont_display_epon_ont_info.textfsm, .*, huawei_ont, di[[splay]] ep[[on]] o[[nt]] i[[nfo]]
huawei_ont_display_inner_version.textfsm, .*, huawei_ont, di[[splay]] in[[ner]] ve[[rsion]]
huawei_ont_display_access_mode.textfsm, .*, huawei_ont, di[[splay]] ac[[cess]] m[[ode]]
huawei_ont_display_memory_info.textfsm, .*, huawei_ont, di[[splay]] me[[mory]] i[[nfo]]
huawei_ont_display_macaddress.textfsm, .*, huawei_ont, di[[splay]] maca[[ddress]]
huawei_ont_display_log_info.textfsm, .*, huawei_ont, di[[splay]] l[[og]] i[[nfo]]

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
total used free shared buffers
Mem: 29816 15892 13924 0 1348
-/+ buffers: 14544 15272
Swap: 0 0 0

success!
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
parsed_sample:
- buffers_free: "15272"
buffers_used: "14544"
memory_buffers: "1348"
memory_free: "13924"
memory_shared: "0"
memory_total: "29816"
memory_used: "15892"
swap_free: "0"
swap_total: "0"
swap_used: "0"