The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Detecting incoming files without busy polling baldyeti Shell Programming and Scripting 9 08-15-2008 08:06 AM
Polling an FTP site for a file Peejay UNIX for Advanced & Expert Users 6 07-15-2008 02:22 PM
How to implement polling for a function using timer in C? naan High Level Programming 7 11-19-2007 01:00 AM
Polling/Interrogate Directory Questions dnidiffer Shell Programming and Scripting 1 06-14-2005 06:20 PM
Help - Polling Script brianmu High Level Programming 1 09-06-2001 07:15 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 09-23-2008
Registered User
 

Join Date: Mar 2007
Posts: 36
How to avoid polling???

Hi all,

I have a directory where some process is keeping incremental/new log files. I need to code a program which will periodically poll this directory and if it founds a new file arrived then copy that new file to some other specific directory.
We are OK with this polling approach. I just wanted to know is there any way to get notification i.e. a kind of signal or interrupt which invokes my program after the new file arrives in first directory so that I can avoid this polling time and also save processor memory.

Thanks...
Reply With Quote
Forum Sponsor
  #2  
Old 09-23-2008
radoulov's Avatar
addict
 

Join Date: Jan 2007
Location: Milano, Italia/Варна, България
Posts: 1,931
If you're on Linux check inotify.
Reply With Quote
  #3  
Old 09-24-2008
Registered User
 

Join Date: Mar 2007
Posts: 36
Thanks radoulov .. this is good info..
But I am using SunSolaris ..
Reply With Quote
  #4  
Old 09-24-2008
radoulov's Avatar
addict
 

Join Date: Jan 2007
Location: Milano, Italia/Варна, България
Posts: 1,931
You could try searching the Net for FAM.
I've never used it so I cannot give additional info.

P.S. There is even FEM:

Quote:
Solaris FEM provides close to Linux's inotify kernel-level functionality.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 03:41 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0