Checking for large number of open files

book

Article ID: 168055

calendar_today

Updated On:

Products

XOS

Issue/Introduction

Checking for large number of open filesThis article provides a command that you can use to check for open files that use large amounts of cache memory.

Cause

Goal: To determine if a large amount of cache memory is being used by open files.

Resolution

To determine if a large amount of cache memory is being used by open files, the output from below command shows open files of the process which takes highest amount of memory:


pid=`lsof -s / | awk '{print $7,$2}'| sort -n | tail -1 | awk '{print $2}'`; lsof |grep $pid

Example output:

cplogd 1276 root 101u REG 0,8 521505876 1213014 /var/opt/CPsuite-V40/fw1/CTX/CTX00003/log/fw.log (/dev/root)
cplogd 1276 root 102u sock 0,0 25279 can't identify protocol
cplogd 1276 root 103u REG 0,8 23260752 1213042 /var/opt/CPsuite-V40/fw1/CTX/CTX00003/log/fw.logptr (/dev/root)
cplogd 1276 root 104u REG 0,8 23260752 1213043 /var/opt/CPsuite-V40/fw1/CTX/CTX00003/log/fw.loginitial_ptr (/dev/root)
cplogd 1276 root 105u REG 0,8 80 1213044 /var/opt/CPsuite-V40/fw1/CTX/CTX00003/log/fw.logaccount_ptr (/dev/root)
cplogd 1276 root 106u REG 0,8 218030080 1213057 /var/opt/CPsuite-V40/fw1/CTX/CTX00003/log/fw.logLuuidDB (/dev/root)
cplogd 1276 root 107u REG 0,8 15418052 2130831 /var/opt/CPsuite-V40/fw1/CTX/CTX00005/log/fw.loginitial_ptr (/dev/root)

Workaround

N/A