-
Notifications
You must be signed in to change notification settings - Fork 742
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding juniper_junos_show_system_processes_brief.textfsm support (#1922)
Co-authored-by: Joseph Nicholson <[email protected]> Co-authored-by: Joseph Nicholson <[email protected]> Co-authored-by: Michael Bear <[email protected]>
- Loading branch information
1 parent
2da1bca
commit fe4752d
Showing
4 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
ntc_templates/templates/juniper_junos_show_system_processes_brief.textfsm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 (\S+) | ||
Value MEMORY_FREE (\S+) | ||
Value MEMORY_USED (\S+) | ||
Value MEMORY_BUFFER (\S+) | ||
Value SWAP_TOTAL (\S+) | ||
Value SWAP_FREE (\S+) | ||
Value SWAP_USED (\S+) | ||
Value SWAP_AVAIL (\S+) | ||
|
||
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 |
24 changes: 24 additions & 0 deletions
24
...s/juniper_junos/show_system_processes_brief/juniper_junos_show_system_processes_brief.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
35 changes: 35 additions & 0 deletions
35
...s/juniper_junos/show_system_processes_brief/juniper_junos_show_system_processes_brief.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |