mirror of https://github.com/garabik/grc.git
Fix: brackets, address scope; match process name
Newer versions of ss have a slightly different output syntax: IPv6 addresses are put in brackets (like in URLs). tcp LISTEN 0 32 [::1]:53 [::]:* Also, the addresses' scope may be in the output: 192.168.1.1%eth0:68 0.0.0.0:* users:(("NetworkManager",pid=82,fd=6)) ino:661155 sk:272 <-> I had to move the "status" regex or it would overwrite IPv6 addresses.
This commit is contained in:
parent
92aac170d0
commit
66efc0dc3a
|
@ -1,6 +1,14 @@
|
|||
# Local Address:Port
|
||||
regexp=\s((?:\d+\.){3}\d+|\*|::1?|[\w\d\-\_\.]+):(\S+)\s+\s((?:\d+\.){3}\d+|\*|::1?|[\w\d\-\_\.]+):(\S+)
|
||||
colours=default,bright_green,bright_red,cyan,magenta
|
||||
# status
|
||||
regexp=\[.*\]
|
||||
colours=green
|
||||
=======
|
||||
# Local Address:Port Peer Address:Port
|
||||
regexp=\s((?:\d+\.){3}\d+|\*|\[?::1?\]?|[\w\d\-\_\.]+)(%[\w\d]+)?:(\S+)\s+\s((?:\d+\.){3}\d+|\*|\[?::1?\]?|[\w\d\-\_\.]+):(\S+)
|
||||
colours=default,bright_green,blue,bright_red,cyan,magenta
|
||||
=======
|
||||
# process name
|
||||
regexp=\("([^"]+)",
|
||||
colours=blue
|
||||
=======
|
||||
# ipx hostname
|
||||
regexp=^IPX.*[\dABCDEF]+:[\dABCDEF]+
|
||||
|
@ -67,10 +75,6 @@ colours=green
|
|||
regexp=UNKNOWN
|
||||
colours=blink bold red
|
||||
=======
|
||||
# status
|
||||
regexp=\[.*\]
|
||||
colours=green
|
||||
=======
|
||||
# path
|
||||
regexp=(\@)[\dabcdef]+
|
||||
colours=green, bold green
|
||||
|
|
Loading…
Reference in New Issue