Need script to monitor open file in Linux


 
Thread Tools Search this Thread
Contact Us Post Here to Contact Site Administrators and Moderators Need script to monitor open file in Linux
# 1  
Old 09-08-2017
Need script to monitor open file in Linux

Kindly advice with shell script to monitor open file in linux, if the open file count is greater then 5000 then send me an email..

command : lsof | wc -l
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script to monitor new file in a directory and mail the file content

Hi I am looking for a help in designing a bash script on linux which can do below:- 1) Look in a specific directory for any new files 2) Mail the content of the new file Appreciate any help Regards Neha (5 Replies)
Discussion started by: neha0785
5 Replies

2. Shell Programming and Scripting

Script to monitor log file

Hi, Have written a script to monitor linux non standard log file based on line numbers, so each check store $otalinenum .. then in next check after 10 minutes it compre the current_total_line_num > last_total_line_num then it will parse the log file from last_total_line_num to... (0 Replies)
Discussion started by: Shirishlnx
0 Replies

3. Shell Programming and Scripting

Use script to monitor command output question? (like Linux watch)

Hi I want to write a script, help me to monitor command output. This script like Linux "watch" command. Below is my script: # cat watch.sh #!/bin/bash while true do clear echo "command: $*" ( $* ) sleep 2 done Then I run this script below (2 Replies)
Discussion started by: nnnnnnine
2 Replies

4. Shell Programming and Scripting

Need help on Linux script to monitor hard drive space

I'm new to Linux and have very limited experience with shell scripts in general. I am taking a class and I have to research online and come up with a shell script that monitors disk space. I also have to be able to explain it line by line. I've researched various sites and came across this shell... (3 Replies)
Discussion started by: wgreg23
3 Replies

5. Shell Programming and Scripting

script to monitor mount points on linux box

Hi, the following shell script is not working on linux box sugeestions appreciated. FILE1=/tmp/check1.txt FILE2=/tmp/check2.txt df -k | awk '{if (NR != 1) print $5 $6}' > ${FILE1} awk -F"%" '{if ($1 > 90) print "Warning: Filesystem " $2 " over 90% threshold (" $1 "%)"}' ${FILE1} >... (7 Replies)
Discussion started by: prakash.gr
7 Replies

6. Shell Programming and Scripting

Monitor open file handles used by a process

We have a process that is running out of file handles. Is there some command line way to determine this that we can include into a cron script? Please let me know JAK (3 Replies)
Discussion started by: jakSun8
3 Replies

7. UNIX for Dummies Questions & Answers

How to open WinZip file in linux

Hi i am an fresh engineer working in a Embedding company and i am new to linux so any one help me to teach or tell how to open a WinZip file in linux as i use gunzip but hte file suffix is not gz so can any one healp me... urs ... (2 Replies)
Discussion started by: wagmare
2 Replies
Login or Register to Ask a Question
IP-MONITOR(8)							       Linux							     IP-MONITOR(8)

NAME
ip-monitor, rtmon - state monitoring SYNOPSIS
ip monitor [ all | LISTofOBJECTS ] DESCRIPTION
The ip utility can monitor the state of devices, addresses and routes continuously. This option has a slightly different format. Namely, the monitor command is the first in the command line and then the object list follows: ip monitor [ all | LISTofOBJECTS ] OBJECT-LIST is the list of object types that we want to monitor. It may contain link, address and route. If no file argument is given, ip opens RTNETLINK, listens on it and dumps state changes in the format described in previous sections. If a file name is given, it does not listen on RTNETLINK, but opens the file containing RTNETLINK messages saved in binary format and dumps them. Such a history file can be generated with the rtmon utility. This utility has a command line syntax similar to ip monitor. Ide- ally, rtmon should be started before the first network configuration command is issued. F.e. if you insert: rtmon file /var/log/rtmon.log in a startup script, you will be able to view the full history later. Certainly, it is possible to start rtmon at any time. It prepends the history with the state snapshot dumped at the moment of starting. SEE ALSO
ip(8) AUTHOR
Original Manpage by Michail Litvak <mci@owl.openwall.com> iproute2 20 Dec 2011 IP-MONITOR(8)