Skip to content

Commit

Permalink
Capture additional fields and raise Error
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcgill298 committed Oct 28, 2019
1 parent 70db410 commit 54e526f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
22 changes: 17 additions & 5 deletions templates/cisco_ios_show_processes_memory_sorted.template
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
Value memTotal (\d+)
Value memUsed (\d+)
Value memFree (\d+)
Value MEMORY_TOTAL (\d+)
Value MEMORY_USED (\d+)
Value MEMORY_FREE (\d+)
Value List PROCESS_ID (\d+)
Value List PROCESS_ALLOCATED (\d+)
Value List PROCESS_FREED (\d+)
Value List PROCESS_HOLDING (\d+)
Value List PROCESS (.+?)

Start
^Processor Pool Total:\s+${memTotal} Used:\s+${memUsed} Free:\s+${memFree} -> Record
^Processor\s+Pool\s+Total:\s+${MEMORY_TOTAL}\s+Used:\s+${MEMORY_USED}\s+Free:\s+${MEMORY_FREE}
^\s*lsmpi_io\s+Pool
^\s*PID\s+TTY\s+Allocated\s+Freed\s+Holding\s+Getbufs\s+Retbufs\s+Process\s*$$ -> Process
^\s*$$
^. -> Error


Process
^\s*${PROCESS_ID}\s+\d+\s+${PROCESS_ALLOCATED}\s+${PROCESS_FREED}\s+${PROCESS_HOLDING}\s+\d+\s+\d+\s+${PROCESS}\s*$$
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
---
parsed_sample:
- memtotal: "919638648"
memused: "236752096"
memfree: "682886552"
- memory_total: "919638648"
memory_used: "236752096"
memory_free: "682886552"
process_id: ["0", "78", "0", "365", "1", "382", "165", "0", "4", "366", "338", "480", "10"]
process_allocated: ["209299480", "2569666688", "607956496", "3946896", "1583728", "1510464", "2957736", "0", "525856", "381680", "309184", "167752", "4096314696"]
process_freed: ["13474544", "1554280", "428619384", "5680", "3472", "33704", "12304", "0", "23256", "5680", "1640", "448", "4096430632"]
process_holding: ["178205704", "27061536", "6374592", "3983160", "1613672", "1506704", "1112904", "657856", "458696", "417944", "361488", "221248", "215576"]
process: ["*Init*", "IOSD ipc task", "*Dead*", "EEM ED Syslog", "Chunk Manager", "EEM Server", "CWAN OIR Handler", "*MallocLite*", "RF Slave Main Th", "EEM ED Generic", "Crypto IKEv2", "MRIB Process", "Pool Manager"]
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ACCESS-01#show processes memory sorted
Processor Pool Total: 919638648 Used: 236752096 Free: 682886552
lsmpi_io Pool Total: 6295128 Used: 6294296 Free: 832

Expand All @@ -15,4 +14,4 @@ Processor Pool Total: 919638648 Used: 236752096 Free: 682886552
366 0 381680 5680 417944 72316 0 EEM ED Generic
338 0 309184 1640 361488 0 0 Crypto IKEv2
480 0 167752 448 221248 0 0 MRIB Process
10 0 4096314696 4096430632 215576 3914231834 3914277834 Pool Manager
10 0 4096314696 4096430632 215576 3914231834 3914277834 Pool Manager

0 comments on commit 54e526f

Please sign in to comment.