-
Notifications
You must be signed in to change notification settings - Fork 732
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_summary.textfsm support #1921
base: master
Are you sure you want to change the base?
adding juniper_junos_show_system_processes_summary.textfsm support #1921
Conversation
Value MEM_ACTIVE (\d*\D*) | ||
Value MEM_INACTIVE (\d*\D*) | ||
Value MEM_WIRED (\d*\D*) | ||
Value MEM_BUFFER (\d*\D*) | ||
Value MEM_FREE (\d*\D*) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Value MEM_ACTIVE (\d*\D*) | |
Value MEM_INACTIVE (\d*\D*) | |
Value MEM_WIRED (\d*\D*) | |
Value MEM_BUFFER (\d*\D*) | |
Value MEM_FREE (\d*\D*) | |
Value MEMORY_ACTIVE (\d*\S*) | |
Value MEMORY_INACTIVE (\d*\S*) | |
Value MEMORY_WIRED (\d*\S*) | |
Value MEMORY_BUFFER (\d*\S*) | |
Value MEMORY_FREE (\d*\S*) |
Keep aligned with your other PR, and avoid capturing trailing space
- mem_active: "3977M " | ||
mem_buffer: "504M " | ||
mem_free: "74G " | ||
mem_inactive: "14G " | ||
mem_wired: "1815M " | ||
swap_free: "12G " | ||
swap_total: "12G " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- mem_active: "3977M " | |
mem_buffer: "504M " | |
mem_free: "74G " | |
mem_inactive: "14G " | |
mem_wired: "1815M " | |
swap_free: "12G " | |
swap_total: "12G " | |
- mem_active: "3977M" | |
mem_buffer: "504M" | |
mem_free: "74G" | |
mem_inactive: "14G" | |
mem_wired: "1815M" | |
swap_free: "12G" | |
swap_total: "12G" |
we should capture trailing space
19743 root -16 - 0B 16K select 7 172:15 0.10% ppt_11_80000013 | ||
21670 root -16 - 0B 16K select 0 166:12 0.10% ppt_11_80000015 | ||
2 root -16 - 0B 16K jfe_jo 2 138:19 0.10% jfe_job_0_0 | ||
24931 root 20 0 14M 3636K CPU5 5 0:00 0.00% top |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
24931 root 20 0 14M 3636K CPU5 5 0:00 0.00% top | |
24931 root 20 0 14M 3636K CPU5 5 0:00 0.00% top | |
^\s*Mem:\s*${MEM_ACTIVE}\s*Active,\s*${MEM_INACTIVE}\s*Inact,\s*${MEM_WIRED}\s*Wired,\s*${MEM_BUFFER}\s*Buf,\s*${MEM_FREE}\s*Free | ||
^\s*Mem:\s*${MEM_ACTIVE}\s*Active,\s*${MEM_INACTIVE}\s*Inact,\s*${MEM_WIRED}\s*Wired,\s*\d*\D*\s*Cache,\s*${MEM_BUFFER}\s*Buf,\s*${MEM_FREE}\s*Free | ||
^\s*Mem:\s*${MEM_ACTIVE}\s*Active,\s*${MEM_INACTIVE}\s*Inact,\s*\d*\D*\s*Laundry,\s*${MEM_WIRED}\s*Wired,\s*${MEM_BUFFER}\s*Buf,\s*${MEM_FREE}\s*Free |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^\s*Mem:\s*${MEM_ACTIVE}\s*Active,\s*${MEM_INACTIVE}\s*Inact,\s*${MEM_WIRED}\s*Wired,\s*${MEM_BUFFER}\s*Buf,\s*${MEM_FREE}\s*Free | |
^\s*Mem:\s*${MEM_ACTIVE}\s*Active,\s*${MEM_INACTIVE}\s*Inact,\s*${MEM_WIRED}\s*Wired,\s*\d*\D*\s*Cache,\s*${MEM_BUFFER}\s*Buf,\s*${MEM_FREE}\s*Free | |
^\s*Mem:\s*${MEM_ACTIVE}\s*Active,\s*${MEM_INACTIVE}\s*Inact,\s*\d*\D*\s*Laundry,\s*${MEM_WIRED}\s*Wired,\s*${MEM_BUFFER}\s*Buf,\s*${MEM_FREE}\s*Free | |
^\s*Mem:\s*${MEMORY_ACTIVE}\s*Active,\s*${MEMORY_INACTIVE}\s*Inact,\s*${MEMORY_WIRED}\s*Wired,\s*${MEMORY_BUFFER}\s*Buf,\s*${MEMORY_FREE}\s*Free | |
^\s*Mem:\s*${MEMORY_ACTIVE}\s*Active,\s*${MEMORY_INACTIVE}\s*Inact,\s*${MEMORY_WIRED}\s*Wired,\s*\d*\D*\s*Cache,\s*${MEMORY_BUFFER}\s*Buf,\s*${MEMORY_FREE}\s*Free | |
^\s*Mem:\s*${MEMORY_ACTIVE}\s*Active,\s*${MEMORY_INACTIVE}\s*Inact,\s*\d*\D*\s*Laundry,\s*${MEMORY_WIRED}\s*Wired,\s*${MEMORY_BUFFER}\s*Buf,\s*${MEMORY_FREE}\s*Free |
Value SWAP_TOTAL (\d*\D*) | ||
Value SWAP_FREE (\d*\D*) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Value SWAP_TOTAL (\d*\D*) | |
Value SWAP_FREE (\d*\D*) | |
Value SWAP_TOTAL (\d*\S*) | |
Value SWAP_FREE (\d*\S*) |
|
||
|
||
Start | ||
^\s*last\s*pid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^\s*last\s*pid | |
^\s*last\s*pid | |
^\s*\d+\s+threads: | |
^\s*CPU: |
^\s*Swap:\s*${SWAP_TOTAL}\s*Total,\s*\d*\D*\s*Used,\s*${SWAP_FREE}\s*Free,\s*\d*%\s*Inuse -> Record | ||
^\s*Swap: -> Record | ||
^\s*PID\s*USERNAME\s*PRI\s*NICE\s*SIZE\s*RES\s*STATE\s*C\s*TIME\s*WCPU\s*COMMAND | ||
^\s* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^\s* |
This is going to nullify the use of ^. -> Error
used to detect failures in our parsing
^\s*$$ | ||
^. -> Error | ||
|
||
EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EOF |
This should not be needed since there aren't any FillDowns
^\s*Swap:\s*${SWAP_TOTAL}\s*Total,\s*\d*\D*\s*Used,\s*${SWAP_FREE}\s*Free -> Record | ||
^\s*Swap:\s*${SWAP_TOTAL}\s*Total,\s*\d*\D*\s*Used,\s*${SWAP_FREE}\s*Free,\s*\d*%\s*Inuse -> Record | ||
^\s*Swap: -> Record | ||
^\s*PID\s*USERNAME\s*PRI\s*NICE\s*SIZE\s*RES\s*STATE\s*C\s*TIME\s*WCPU\s*COMMAND |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^\s*PID\s*USERNAME\s*PRI\s*NICE\s*SIZE\s*RES\s*STATE\s*C\s*TIME\s*WCPU\s*COMMAND | |
^\s*PID\s*USERNAME\s*PRI\s*NICE\s*SIZE\s*RES\s*STATE\s*C\s*TIME\s*WCPU\s*COMMAND -> EOF |
We can end matching lines once we get to this point since we aren't capturing any of the process data
Adding support for Juniper Junos show system processes summary command.