Kamailo - 打开文件的数量

问题描述

是否有可能跟踪在 Kamailio 处理新呼叫时使用的打开文件的数量?到目前为止,我尝试在 bash 中使用脚本并使用 watch 命令启动脚本

FILES=$(ls -l '/proc/'$(pidof kamailio)'/fd' | wc -l)
echo $FILES >> FILES.txt

我得到了这样的结果:

ls: cannot access '1809' : No such file or directory
ls: cannot access '1808' : No such file or directory
ls: cannot access '1807' : No such file or directory
.
.
.
ls: cannot access '1795/fd' : No such file or directory

解决方法

由于kamailio在kamailio用户下运行的大多数系统中,您可以执行以下操作:

lsof -u kamailio | wc -l

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...