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

Juniper junos show system processes brief #1974

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
Value NODE (\S+)
Value TASK_TOTAL (\S+)
Value TASK_RUNNING (\S+)
Value TASK_SLEEPING (\S+)
Value TASK_STOPPED (\S+)
Value TASK_ZOMBIE (\S+)
Value TASK_WAITING (\S+)
Value CPU_USER (\S+)
Value CPU_SYSTEM (\S+)
Value CPU_NICE (\S+)
Value CPU_IDLE (\S+)
Value CPU_WAIT (\S+)
Value CPU_HW_IRQ (\S+)
Value CPU_SW_IRQ (\S+)
Value CPU_STEAL (\S+)
Value MEMORY_FORMAT (\w)
Value SWAP_FORMAT (\w)
Value MEMORY_ACTIVE (\S+)
Expand All @@ -11,12 +25,27 @@ Value SWAP_USED (\S+)
Value SWAP_AVAIL (\S+)

Start
^-+\s*$$ -> TYPE1
^last\s*pid: -> TYPE2

# JUNOS EVO template
TYPE1
^-+\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
^node:\s+${NODE}
^top\s+
^Tasks:\s+${TASK_TOTAL}\s+total,\s+${TASK_RUNNING}\s+running,\s+${TASK_SLEEPING}\s+sleeping,\s+${TASK_STOPPED}\s+stopped,\s+${TASK_ZOMBIE}\s+zombie\s*
^%Cpu\(s\):\s+${CPU_USER}\s+us,\s+${CPU_SYSTEM}\s+sy,\s+${CPU_NICE}\s+ni,\s+${CPU_IDLE}\s+id,\s+${CPU_WAIT}\s+wa,\s+${CPU_HW_IRQ}\s+hi,\s+${CPU_SW_IRQ}\s+si,\s+${CPU_STEAL}\s+st\s*
^${MEMORY_FORMAT}iB\s+M(em|EMORY)\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+M(em|EMORY)\s* -> Record
^{(master|backup)}\s*$$
^\s*$$
^. -> Error

# Junos Classic template
TYPE2
^last\s+pid:
^${TASK_TOTAL}\s+processes:\s+${TASK_RUNNING}+\s+running,\s+${TASK_SLEEPING}\s+sleeping,\s+${TASK_ZOMBIE}\s+zombie,\s+${TASK_WAITING}\s+waiting\s*$$
^CPU:\s+${CPU_USER}\%\s+user,\s+${CPU_NICE}\%\s+nice,\s+${CPU_SYSTEM}\%\s+system,\s+${CPU_HW_IRQ}\%\s+interrupt,\s+${CPU_IDLE}\%\s+idle\s*$$
^Mem:\s+${MEMORY_ACTIVE}${MEMORY_FORMAT}\s+Active,\s+\S+\s+Inact,\s+\S+\s+Wired,\s+${MEMORY_BUFFER}\S+\s+Buf,\s+${MEMORY_FREE}\S+\s+Free\s*$$
^Swap:\s+${SWAP_TOTAL}${SWAP_FORMAT}\s+Total,\s+${SWAP_FREE}\S+\s+Free\s*$$
^. -> Error
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
last pid: 98312; load averages: 1.72, 1.70, 1.70 up 87+21:25:46 15:51:17
302 processes: 5 running, 295 sleeping, 1 zombie, 1 waiting
CPU: 14.7% user, 0.0% nice, 4.2% system, 0.2% interrupt, 80.9% idle
Mem: 3532M Active, 33G Inact, 2458M Wired, 1046M Buf, 55G Free
Swap: 12G Total, 12G Free
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
parsed_sample:
- cpu_hw_irq: "0.2"
cpu_idle: "80.9"
cpu_nice: "0.0"
cpu_steal: ""
cpu_sw_irq: ""
cpu_system: "4.2"
cpu_user: "14.7"
cpu_wait: ""
memory_active: "3532"
memory_buffer: "1046"
memory_format: "M"
memory_free: "55"
memory_used: ""
node: ""
swap_avail: ""
swap_format: "G"
swap_free: "12"
swap_total: "12"
swap_used: ""
task_running: "5"
task_sleeping: "295"
task_stopped: ""
task_total: "302"
task_waiting: "1"
task_zombie: "1"
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ 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

{master}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
parsed_sample:
- cpu_hw_irq: "0.0"
cpu_idle: "97.3"
cpu_nice: "0.0"
cpu_steal: "0.0"
cpu_sw_irq: "0.0"
cpu_system: "0.8"
cpu_user: "2.0"
cpu_wait: "0.0"
memory_active: "31554.4"
memory_buffer: "3661.7"
memory_format: "M"
memory_free: "17292.4"
memory_used: "10600.3"
node: "fpc0"
swap_avail: "19854.3"
swap_format: "M"
swap_free: "100.0"
swap_total: "100.0"
swap_used: "0.0"
task_running: "1"
task_sleeping: "270"
task_stopped: "0"
task_total: "271"
task_waiting: ""
task_zombie: "0"
- cpu_hw_irq: "0.3"
cpu_idle: "97.6"
cpu_nice: "0.0"
cpu_steal: "0.0"
cpu_sw_irq: "0.3"
cpu_system: "0.3"
cpu_user: "1.5"
cpu_wait: "0.0"
memory_active: "128191.6"
memory_buffer: "45096.8"
memory_format: "M"
memory_free: "65543.4"
memory_used: "17551.4"
node: "re0"
swap_avail: "108490.7"
swap_format: "M"
swap_free: "8192.0"
swap_total: "8192.0"
swap_used: "0.0"
task_running: "1"
task_sleeping: "533"
task_stopped: "0"
task_total: "536"
task_waiting: ""
task_zombie: "2"
- cpu_hw_irq: "0.3"
cpu_idle: "94.6"
cpu_nice: "0.0"
cpu_steal: "0.0"
cpu_sw_irq: "0.3"
cpu_system: "2.7"
cpu_user: "2.1"
cpu_wait: "0.0"
memory_active: "128191.6"
memory_buffer: "28674.5"
memory_format: "M"
memory_free: "93230.9"
memory_used: "6286.2"
node: "re1"
swap_avail: "119812.1"
swap_format: "M"
swap_free: "1131.7"
swap_total: "4096.0"
swap_used: "2964.2"
task_running: "1"
task_sleeping: "406"
task_stopped: "0"
task_total: "407"
task_waiting: ""
task_zombie: "0"

This file was deleted.