diff --git a/src/python/devtest/os/test/cases/LsofUds.py b/src/python/devtest/os/test/cases/LsofUds.py new file mode 100644 index 0000000..3ae63cd --- /dev/null +++ b/src/python/devtest/os/test/cases/LsofUds.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- + +from ..ListCmd import ListCmd + +class LsofUds(ListCmd): # export + + def _row_info(self): + return ( + r'lsof +c 15 -U', + # COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME + # systemd 1 root 45u unix 0xeeb45200 0t0 9856 /run/systemd/journal/stdout type=STREAM + "^ *(\S+) +([0-9]+) +(\S+) +(\S+) +(\S+) +(0x[0-9a-f]+) +(\S+) +([0-9]+) +(\S+) +type=(\S+)", + [ 'cmd', 'pid', 'user','fd', 'type', 'device', 'size/off','node', 'path', 'socktype' ], + [ 'cmd', 'user', 'path', 'socktype' ], + [ 'cmd', 'path' ], + )