Use of fstat instead of netstat on OpenBSD

Allow to know which PID is listening to a port
This commit is contained in:
Jérémy Dubois 2021-05-25 20:55:00 +02:00
parent afb7427e40
commit 582e8e0c9c
1 changed files with 3 additions and 2 deletions

View File

@ -313,8 +313,9 @@ if [ "${LOCAL_TASKS}" = "1" ]; then
${FINDMNT_BIN} > ${LOCAL_BACKUP_DIR}/findmnt.txt
fi
else
## Dump network connections with netstat
netstat -finet -atn > ${LOCAL_BACKUP_DIR}/netstat.out
## Dump network connections with fstat
fstat | head -1 > ${LOCAL_BACKUP_DIR}/netstat.out
fstat | grep internet >> ${LOCAL_BACKUP_DIR}/netstat.out
## List OpenBSD packages
pkg_info -m > ${LOCAL_BACKUP_DIR}/packages