ls /proc/{pid of MSTRSvr}/fd/ | wc -l
example:
# ps -ef |grep MSTRSvr
root 48144 1 96 Oct26 ? 29-20:41:34 /opt/MicroStrategy/IntelligenceServer/bin/MSTRSvr -s -w /var/opt/MicroStrategy/IntelligenceServer -t status-iserver.xml /opt/MicroStrategy/lib/libMSTRSvr2.so -n
CastorServer
root 108331 105177 0 01:51 pts/0 00:00:00 grep --color=auto MSTRSvr
# ls /proc/48144/fd/ | wc -l
22
• Count all opened files by all processes:
lsof | wc -l
(Count the number of processes running on your system by any user):
ps aux | wc -l
• Get maximum allowed number of open files:
cat /proc/sys/fs/file-max
• lsof | wc -l sums up a lot of duplicated entries (forked processes can share file handles etc). That number could be much higher than the limit set in /proc/sys/fs/file-max.
To get the current number of open files from the Linux kernel's point of view, below command could be used:
cat /proc/sys/fs/file-nr
• If "open files" is too small, it is necessary to increase the open files limit by running ulimit -n 65534. Refer to Knowledge Base article below for more details: KB483972: Settings that need to be checked before starting the Intelligence Server on Linux