On 2017 Feb 09 15:54:54, you wrote to Ragnarok:
open files by sbbs:
root@scarlet:/etc/sysctl.d# lsof|grep sbbs |wc -l
11314
By default, lsof outputs sockets as well as "files". To just get a
list of files, use "lsof /".
when i went researching and digging after reading the initial post, i found a page that basically said to find out what the PID of the program in question is
and then use that on the lsof command line... on max's system i ran the following...
ps -C sbbs -o pid=
which gave me the PID i needed so that now gets fed to lsof...
sudo lsof -p $(ps -C sbbs -o pid=)
which gave me only what the sbbs task was using... from there, one might filter
for lines containing a '/' but that may not be what one wants... in my research, i found a page on lsof for AIX systems that uses "-t type" to list only items of that type... on my ubuntu system, the lines with file names are of type "REG" (regular file) but i don't find a command line option to output only those lines... so grep to the rescue in the end...
sudo lsof -p $(ps -C sbbs -o pid=) | grep -e " REG "
and i have only the open files... i've added the header for clarity of the fields...
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sbbs 902 sbbs txt REG 253,1 180592 1068949 /sbbs/src/sbbs3/gcc.linux.x64.exe.release/sbbs
sbbs 902 sbbs mem REG 253,1 43616 670420 /lib/x86_64-linux-gnu/libnss_files-2.19.so
sbbs 902 sbbs mem REG 253,1 47760 670412 /lib/x86_64-linux-gnu/libnss_nis-2.19.so
sbbs 902 sbbs mem REG 253,1 97296 670408 /lib/x86_64-linux-gnu/libnsl-2.19.so
sbbs 902 sbbs mem REG 253,1 39824 670407 /lib/x86_64-linux-gnu/libnss_compat-2.19.so
sbbs 902 sbbs mem REG 253,1 31792 670416 /lib/x86_64-linux-gnu/librt-2.19.so
sbbs 902 sbbs mem REG 253,1 14664 670404 /lib/x86_64-linux-gnu/libdl-2.19.so
sbbs 902 sbbs mem REG 253,1 90160 655389 /lib/x86_64-linux-gnu/libgcc_s.so.1
sbbs 902 sbbs mem REG 253,1 1071552 665000 /lib/x86_64-linux-gnu/libm-2.19.so
sbbs 902 sbbs mem REG 253,1 979056 1793 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19
sbbs 902 sbbs mem REG 253,1 239440 1342 /usr/lib/x86_64-linux-gnu/libnspr4.so
sbbs 902 sbbs mem REG 253,1 10680 670419 /lib/x86_64-linux-gnu/libutil-2.19.so
sbbs 902 sbbs mem REG 253,1 1840928 670417 /lib/x86_64-linux-gnu/libc-2.19.so
sbbs 902 sbbs mem REG 253,1 141574 670409 /lib/x86_64-linux-gnu/libpthread-2.19.so
sbbs 902 sbbs mem REG 253,1 99085 1068947 /sbbs/src/sbbs3/gcc.linux.x64.lib.release/libservices.so
sbbs 902 sbbs mem REG 253,1 158767 1068946 /sbbs/src/sbbs3/gcc.linux.x64.lib.release/libmailsrvr.so
sbbs 902 sbbs mem REG 253,1 152444 1068948 /sbbs/src/sbbs3/gcc.linux.x64.lib.release/libwebsrvr.so
sbbs 902 sbbs mem REG 253,1 126447 1068771 /sbbs/src/sbbs3/gcc.linux.x64.lib.release/libftpsrvr.so
sbbs 902 sbbs mem REG 253,1 7373462 1061592 /sbbs/src/sbbs3/gcc.linux.x64.lib.release/libsbbs.so
sbbs 902 sbbs mem REG 253,1 18952 655531 /lib/x86_64-linux-gnu/libcap.so.2.24
sbbs 902 sbbs mem REG 253,1 149120 670410 /lib/x86_64-linux-gnu/ld-2.19.so
sbbs 902 sbbs 10uR REG 253,1 871 1059009 /sbbs/ctrl/cryptlib.key
sbbs 902 sbbs 15u REG 253,1 150 1058387 /sbbs/ctrl/node.dab
sbbs 902 sbbs 17u REG 253,1 150 1058387 /sbbs/ctrl/node.dab
sorry for the wrap... there's nine columns ending with the full path and file name...
i notice that node.dab is opened twice... maybe there's something to that with the problem we see on Max's system about not being able to lock it or whatever that error is that we've been seeing?
)\/(ark
Always Mount a Scratch Monkey
Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
... WYMI - the all-philosophy radio station.
---
* Origin: (1:3634/12.73)
þ Synchronet þ Vertrauen þ Home of Synchronet þ
telnet://vert.synchro.net