How to use logmon to monitor open file handle count on Linux
search cancel

How to use logmon to monitor open file handle count on Linux

book

Article ID: 272571

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM) CA Unified Infrastructure Management On-Premise (Nimsoft / UIM) CA Unified Infrastructure Management SaaS (Nimsoft / UIM)

Issue/Introduction

Please guide us to monitor open file handle count using logmon.

Environment

  • Release: 20.4
  • logmon v4.20

Resolution

Here is the solution for this particular case/scenario:

You cannot use the Test profile or Test string for this command output. Just wait for the logmon monitoring interval to complete and youll see the alarm.

I just tested running the command->

   count=0;for pid in `ps -ef | grep best1adm | grep -v grep | awk '{print $2}'` ; do let count=$count+`ls /proc/${pid}/fd | wc -l` ; done ; echo $count

and it works:

 


Just use/select 'Text Block' under the Variables tab


and the logmon window will display as:


Then finally, select “Match on Every Run” and,

Create your own desired text 'Message to send on match' and use the $variable for the open file handle count value which in my case I named -> ${handle_count}. Youll see it appear as soon as you type in the $ because you already created it.