简体   繁体   中英

Kamailo - number of open files

is there any possibility to track number of open files, which are used while Kamailio handle new calls? So far, I tried to use script in bash and start the script using watch command

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

I got this kind of result:

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

Since kamailio in most systems running under kamailio user, you can do something like this:

lsof -u kamailio | wc -l

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM