From aliakc@web.de Sat Apr 5 10:01:42 2003 Received: with ECARTIS (v1.0.0; list fam); Sat, 05 Apr 2003 10:01:48 -0800 (PST) Received: from smtp.web.de (smtp03.web.de [217.72.192.158]) by oss.sgi.com (8.12.3/8.12.5) with SMTP id h35I1eDH028021 for ; Sat, 5 Apr 2003 10:01:41 -0800 Received: from [217.229.99.72] (helo=pD9E56348.dip.t-dialin.net) by smtp.web.de with esmtp (TLSv1:RC4-MD5:128) (WEB.DE(Exim) 4.97 #53) id 191ryw-0007gx-00 for fam@oss.sgi.com; Sat, 05 Apr 2003 20:01:34 +0200 From: Ali Akcaagac To: fam@oss.sgi.com Subject: fam test Date: Sat, 5 Apr 2003 20:02:05 +0200 User-Agent: KMail/1.5.9 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200304052002.05137.aliakc@web.de> X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-archive-position: 103 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: aliakc@web.de Precedence: bulk X-list: fam Hello, I saw that there is a new fam testing version in the test directory on your ftp server. Is it possible to download it somewhere and test it ? The version on the ftp is not downloadable due to restricted file attributes. I'm not subscribed so please CC me. From michael.wardle@adacel.com Sun Apr 6 18:19:23 2003 Received: with ECARTIS (v1.0.0; list fam); Sun, 06 Apr 2003 18:19:27 -0700 (PDT) Received: from adacel.com ([210.11.130.7]) by oss.sgi.com (8.12.3/8.12.5) with SMTP id h371JLDH025810 for ; Sun, 6 Apr 2003 18:19:23 -0700 Received: from nexus.adacel.com (Not Verified[10.32.240.1]) by adacel.com with MailMarshal (v5,0,3,91) id ; Mon, 07 Apr 2003 11:16:58 +1000 Received: (qmail 607 invoked from network); 7 Apr 2003 01:14:57 -0000 Received: from unknown (HELO hera.wodonga.adacel.com.au) (192.168.75.251) by nexus.adacel.com with SMTP; 7 Apr 2003 01:14:56 -0000 Received: from selene.wodonga.adacel.com.au (selene.wodonga.adacel.com.au [192.168.75.55]) by hera.wodonga.adacel.com.au (8.11.6/8.11.6) with ESMTP id h371JEE28030 for ; Mon, 7 Apr 2003 11:19:14 +1000 Subject: new features planned for FAM 2.7 From: Michael Wardle To: fam@oss.sgi.com Content-Type: text/plain Organization: Adacel Technologies Message-Id: <1049678354.2710.16.camel@selene.wodonga.adacel.com.au> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 07 Apr 2003 11:19:14 +1000 Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-archive-position: 104 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: michael.wardle@adacel.com Precedence: bulk X-list: fam Hi I've just begun working on a new FAM release in my spare time. The things I'd like to accomplish are: - rewrite manual pages - rewrite autoconf scripts - provide generic Monitor interface instead of IMon interface - include DNotify and kqueue support - wrap FAM in a namespace (possibly) - remove automatic configuration file handling in make install - make FAM work on systems that don't have the mntent header - fix limits on the number of files that can be monitored simultaneously Since there's no CVS tree, I plan on doing this myself when I find the time. I've already begun work on some of them. If you have any feedback, or would like to help out with any of this (particularly on improving DNotify and kqueue support and fixing the limits on the number of files that can be monitored), I would like to hear from you. Thanks -- Michael Wardle Adacel Technologies From sgi-fam@gmane.org Mon Apr 7 07:11:27 2003 Received: with ECARTIS (v1.0.0; list fam); Mon, 07 Apr 2003 07:11:31 -0700 (PDT) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by oss.sgi.com (8.12.3/8.12.5) with SMTP id h37EBPDH019224 for ; Mon, 7 Apr 2003 07:11:26 -0700 Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 192XKB-0002tW-00 for ; Mon, 07 Apr 2003 16:10:15 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: fam@oss.sgi.com Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 192X4h-0001R0-00 for ; Mon, 07 Apr 2003 15:54:15 +0200 From: Nicholas Wourms Subject: Re: new features planned for FAM 2.7 Date: Mon, 07 Apr 2003 09:49:44 -0400 Lines: 27 Message-ID: <3E9181F8.4010000@gentoo.org> References: <1049678354.2710.16.camel@selene.wodonga.adacel.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@main.gmane.org User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Accept-Language: en-us, en X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-archive-position: 105 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: dragon@gentoo.org Precedence: bulk X-list: fam Michael Wardle wrote: > Hi > > I've just begun working on a new FAM release in my spare time. > > The things I'd like to accomplish are: > - rewrite manual pages > - rewrite autoconf scripts > - provide generic Monitor interface instead of IMon interface When you say "generic interface", will this be in-kernel or userland? After the poor perfomance experienced from DNotify, I hope something faster will be implimented. BTW, I'm the gentoo developer who has been carrying the Imon patch into later kernels. All I did was to resolve conflicts from the last "offical" patch in the most logical manner possible. I can't be sure if there were other areas added that needed fixing up. However, FWICT, the interface seems to be working fine. I'll see about fixing up a patch against a vanilla kernel 2.4.20 and 2.4.21-pre7, however it would be nice if the former IMon author would check it for accuracy and completeness. Cheers, Nicholas From michael.wardle@adacel.com Mon Apr 7 16:43:09 2003 Received: with ECARTIS (v1.0.0; list fam); Mon, 07 Apr 2003 16:43:19 -0700 (PDT) Received: from adacel.com ([210.11.130.7]) by oss.sgi.com (8.12.3/8.12.5) with SMTP id h37Nh5Dq012919 for ; Mon, 7 Apr 2003 16:43:08 -0700 Received: from nexus.adacel.com (Not Verified[10.32.240.1]) by adacel.com with MailMarshal (v5,0,3,91) id ; Tue, 08 Apr 2003 09:40:35 +1000 Received: (qmail 3786 invoked from network); 7 Apr 2003 23:38:34 -0000 Received: from unknown (HELO hera.wodonga.adacel.com.au) (192.168.75.251) by nexus.adacel.com with SMTP; 7 Apr 2003 23:38:34 -0000 Received: from selene.wodonga.adacel.com.au (selene.wodonga.adacel.com.au [192.168.75.55]) by hera.wodonga.adacel.com.au (8.11.6/8.11.6) with ESMTP id h37NgvE28729; Tue, 8 Apr 2003 09:42:57 +1000 Subject: Re: new features planned for FAM 2.7 From: Michael Wardle To: Nicholas Wourms Cc: fam@oss.sgi.com In-Reply-To: <3E9181F8.4010000@gentoo.org> References: <1049678354.2710.16.camel@selene.wodonga.adacel.com.au> <3E9181F8.4010000@gentoo.org> Content-Type: text/plain Organization: Adacel Technologies Message-Id: <1049758976.2230.15.camel@selene.wodonga.adacel.com.au> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 08 Apr 2003 09:42:57 +1000 Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-archive-position: 106 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: michael.wardle@adacel.com Precedence: bulk X-list: fam On Mon, 2003-04-07 at 23:49, Nicholas Wourms wrote: > > I've just begun working on a new FAM release in my spare time. > > > > The things I'd like to accomplish are: > > - rewrite manual pages > > - rewrite autoconf scripts > > - provide generic Monitor interface instead of IMon interface > > When you say "generic interface", will this be in-kernel or > userland? I simply mean there will now be a Monitor base class implemented by IMon, DNotify, etc. classes in the FAM daemon source. This should not affect the user or the kernel as far as I can tell, just make it easier to add support for monitors on other platforms in a consistent manner. If this didn't make sense, apply the DNotify patch and look at Monitor.h. It will almost certainly look like this. > After the poor perfomance experienced from > DNotify, I hope something faster will be implimented. I'm not sure what I can do about this. The aim is to use whatever monitoring API the operating system provides and otherwise poll. On Linux, the monitoring API is DNotify. I agree, however, that (with no disrespect intended to those involved with DNotify or the DNotify patch) DNotify has been responsible for many of the recent problems in FAM, and that this has weakened FAM's reputation and usefulness. For this reason, I would like the DNotify functionality to be improved and further tested before I include it as an official part of FAM. > BTW, I'm the gentoo developer who has been carrying the Imon > patch into later kernels. All I did was to resolve > conflicts from the last "offical" patch in the most logical > manner possible. That is probably all that was required. Please send them my way, and I'll place them in the contrib section on the FAM download area on oss. Thanks -- Michael Wardle Adacel Technologies From rodrigo.lists@fabricadeideias.com Wed Apr 9 06:58:51 2003 Received: with ECARTIS (v1.0.0; list fam); Wed, 09 Apr 2003 06:59:06 -0700 (PDT) Received: from kubrick.fabricadeideias.com.br (saura.fabricadeideias.com.br [200.197.121.100]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h39DwnFu028881 for ; Wed, 9 Apr 2003 06:58:50 -0700 Received: (qmail 10474 invoked by uid 514); 9 Apr 2003 13:59:01 -0000 Received: from rodrigo.lists@fabricadeideias.com by saura.fabricadeideias.com.br by uid 514 with qmail-scanner-1.14 (avp: 3.0/136. Clear:. Processed in 1.124844 secs); 09 Apr 2003 13:58:39 -0000 Received: from unknown (HELO fabricadeideias.com) (192.168.109.50) by empirecenter.com.br with SMTP; 9 Apr 2003 13:59:00 -0000 Message-ID: <3E9426F9.5090706@fabricadeideias.com> Date: Wed, 09 Apr 2003 10:58:17 -0300 From: Rodrigo Severo User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: fam@oss.sgi.com Subject: Re: FAM compilation problems under Linux. References: <3E3EB49E.5020505@fabricadeideias.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-archive-position: 107 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: rodrigo.lists@fabricadeideias.com Precedence: bulk X-list: fam Robert Sander wrote: > On Mon, 3 Feb 2003 18:33:25 +0000 (UTC), > Rodrigo Severo wrote: > >>I am getting an error complaining about not finding librpcsvc required >>through -lrpcsvc. I can't find where I get this lib. Any suggestions? > > I got mine in libc6-dev: > > # dpkg -S librpcsvc > libc6-dev: /usr/lib/librpcsvc.a I call it a complete fiasco. I have still not managed to compile Fam in my Linux box because of the lack of librpcsvc.(so|a). I am using the Conectiva distribution which, I think, is based in the RedHat one. There is not a libc6-dev package. There is a glibc-devel and a libstdc++-devel package. I have already compiled several applications in this same machine: kernel, courier, mysql, BerkeleyDB, OpenLDAP, apache, php... This make me sure I am not lacking any obvious package necessary for compilation, still I don't have a librpcsvc.(so|a). I am running out of ideas where to look for or what to do so I came here to ask you all for one. TIA, Rodrigo Severo From rodrigo.lists@fabricadeideias.com Wed Apr 9 07:11:49 2003 Received: with ECARTIS (v1.0.0; list fam); Wed, 09 Apr 2003 07:11:53 -0700 (PDT) Received: from kubrick.fabricadeideias.com.br (saura.fabricadeideias.com.br [200.197.121.100]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h39EBmFu029065 for ; Wed, 9 Apr 2003 07:11:49 -0700 Received: (qmail 11331 invoked by uid 514); 9 Apr 2003 14:12:02 -0000 Received: from rodrigo.lists@fabricadeideias.com by saura.fabricadeideias.com.br by uid 514 with qmail-scanner-1.14 (avp: 3.0/136. Clear:. Processed in 0.596531 secs); 09 Apr 2003 14:11:40 -0000 Received: from unknown (HELO fabricadeideias.com) (192.168.109.50) by empirecenter.com.br with SMTP; 9 Apr 2003 14:12:01 -0000 Message-ID: <3E942A07.7070300@fabricadeideias.com> Date: Wed, 09 Apr 2003 11:11:19 -0300 From: Rodrigo Severo User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: fam@oss.sgi.com Subject: Re: FAM compilation problems under Linux. References: <3E3EB49E.5020505@fabricadeideias.com> <3E9426F9.5090706@fabricadeideias.com> In-Reply-To: <3E9426F9.5090706@fabricadeideias.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-archive-position: 108 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: rodrigo.lists@fabricadeideias.com Precedence: bulk X-list: fam Rodrigo Severo wrote: > > I call it a complete fiasco. Just to be clear, the fiasco it mine, not Fam's. Rodrigo -- ---------------------------------------------------- Rodrigo Severo Fábrica de Idéias Fone: +55(61)321 1357 Fax: +55(61)223 1712 SCS - Quadra 2 - Ed. Empire Center - Sala 1301 Brasília/DF - Brasil CEP: 70.070-904 ---------------------------------------------------- From lp@arosii.dk Thu Apr 10 09:36:51 2003 Received: with ECARTIS (v1.0.0; list fam); Thu, 10 Apr 2003 09:36:55 -0700 (PDT) Received: from sloth.intern.arosii.com ([130.228.101.222]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h3AGanFu029421 for ; Thu, 10 Apr 2003 09:36:50 -0700 Received: from dogbert.intern.arosii.com (dogbert.intern.arosii.com [192.168.0.80]) by sloth.intern.arosii.com (8.11.6/8.11.0) with ESMTP id h3AGOgG05071 for ; Thu, 10 Apr 2003 18:24:42 +0200 Subject: [ANN] Java FAM From: Lars Pedersen To: fam@oss.sgi.com Content-Type: text/plain Organization: Arosii Information Systems ApS Message-Id: <1049990981.1873.74.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.3 Date: 10 Apr 2003 18:09:41 +0200 Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-archive-position: 109 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: lp@arosii.dk Precedence: bulk X-list: fam Hello, I've written a simple JNI wrapper for libfam. It has only been tested on Linux, but should work on other platforms with little or no tweaking. The source is available at: http://opensource.arosii.dk/projects/java-fam/ Regards -- Lars Pedersen Arosii Information Systems ApS From ktanzer@desc.org Fri Apr 11 09:55:59 2003 Received: with ECARTIS (v1.0.0; list fam); Fri, 11 Apr 2003 09:56:02 -0700 (PDT) Received: from mail.desc.org (splash195.drizzle.com [216.162.197.195]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h3BGtwFu022104 for ; Fri, 11 Apr 2003 09:55:58 -0700 Received: from desc.org (test.desc.org [192.168.6.205]) by mail.desc.org (8.9.3/8.9.3) with ESMTP id JAA22339 for ; Fri, 11 Apr 2003 09:55:58 -0700 Message-ID: <3E96F39E.1090105@desc.org> Date: Fri, 11 Apr 2003 09:55:58 -0700 From: Ken Tanzer Organization: Downtown Emergency Service Center User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 To: fam@oss.sgi.com Subject: FAM not notifying of non-local changes on NFS files Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-archive-position: 110 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: ktanzer@desc.org Precedence: bulk X-list: fam We're trying to use FAM to monitor files on a directory that is mounted via NFS. This works fine when a file is modified via the local machine on which FAM is running. When the file is changed from the server that is exporting NFS, however, FAM does not detect this, and does nothing. I have tried this two ways: At first, we had a FAM server running on the NFS server (as well as on our client). When that didn't work, we disabled the FAM server on the NFS server, so that only the client has a FAM server running. As I understand it, it should do polling in this case. I've checked all the config files & options and everything seems to be OK. We're invoking FAM with "/usr/bin/fam -t 6 -T 0". The -t 6 should be the default, but I tried it anyway. I've tried it with -C, and that doesn't make any difference. I also ran with the "-d" option to see debugging messages, and nothing is generated when the file is changed remotely. Both client and server are RedHat 8.0 machines. Does anyone know what the problem could be, or can offer any suggestions? Thanks. -- Kenneth Tanzer Information Services Manager Downtown Emergency Service Center www.desc.org From michael.wardle@adacel.com Sun Apr 13 19:13:27 2003 Received: with ECARTIS (v1.0.0; list fam); Sun, 13 Apr 2003 19:13:35 -0700 (PDT) Received: from adacel.com (gunsmoke.adacel.com.au [210.11.130.7]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h3E2DPFu025962 for ; Sun, 13 Apr 2003 19:13:27 -0700 Received: from nexus.adacel.com (Not Verified[10.32.240.1]) by adacel.com with MailMarshal (v5,0,3,91) id ; Mon, 14 Apr 2003 12:11:44 +1000 Received: (qmail 14757 invoked from network); 13 Apr 2003 23:21:32 -0000 Received: from unknown (HELO hera.wodonga.adacel.com.au) (192.168.75.251) by nexus.adacel.com with SMTP; 13 Apr 2003 23:21:32 -0000 Received: from selene.wodonga.adacel.com.au (selene.wodonga.adacel.com.au [192.168.75.55]) by hera.wodonga.adacel.com.au (8.11.6/8.11.6) with ESMTP id h3DNQbE07827 for ; Mon, 14 Apr 2003 09:26:37 +1000 Subject: Re: FAM not notifying of non-local changes on NFS files From: Michael Wardle To: fam@oss.sgi.com In-Reply-To: <3E96F39E.1090105@desc.org> References: <3E96F39E.1090105@desc.org> Content-Type: text/plain Organization: Adacel Technologies Message-Id: <1050276396.2229.6.camel@selene.wodonga.adacel.com.au> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 14 Apr 2003 09:26:37 +1000 Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-archive-position: 111 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: michael.wardle@adacel.com Precedence: bulk X-list: fam On Sat, 2003-04-12 at 02:55, Ken Tanzer wrote: > We're trying to use FAM to monitor files on a directory that is mounted > via NFS. > > This works fine when a file is modified via the local machine on which > FAM is running. When the file is changed from the server that is > exporting NFS, however, FAM does not detect this, and does nothing. By default, Red Hat ships with the FAM daemon bound to the loopback interface so that it can only be used by the local machine. Try removing the "bind = 127.0.0.1" entry in /etc/xinetd.d/sgi_fam. -- Michael Wardle Adacel Technologies From ktanzer@desc.org Mon Apr 14 17:13:46 2003 Received: with ECARTIS (v1.0.0; list fam); Mon, 14 Apr 2003 17:13:57 -0700 (PDT) Received: from mail.desc.org (splash195.drizzle.com [216.162.197.195]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h3F0DjFu027648 for ; Mon, 14 Apr 2003 17:13:45 -0700 Received: from desc.org (test.desc.org [192.168.6.205]) by mail.desc.org (8.9.3/8.9.3) with ESMTP id RAA18229 for ; Mon, 14 Apr 2003 17:13:44 -0700 Message-ID: <3E9B4EB8.1050107@desc.org> Date: Mon, 14 Apr 2003 17:13:44 -0700 From: Ken Tanzer User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: fam@oss.sgi.com Subject: Re: FAM not notifying of non-local changes on NFS files References: <3E96F39E.1090105@desc.org> <1050276396.2229.6.camel@selene.wodonga.adacel.com.au> In-Reply-To: <1050276396.2229.6.camel@selene.wodonga.adacel.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-archive-position: 112 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: ktanzer@desc.org Precedence: bulk X-list: fam I took the "bind" entry out as suggested, and it doesn't seem to help. I don't think that setting should matter anyway, as we're not trying to use FAM on a non-local machine. The only thing running on a non-local machine is the NFS server. Here's a bad diagram: MACHINE A FAM Client Running FAM Server Running Watching /mnt/nfs/somedir-->NFS---->/somedir/somefile NFS Server MACHINE B From Machine A, "touch /mnt/nfs/somedir/somefile" is picked up by FAM. When you do "touch /somedir/somefile" from Machine B, nothing happens. I've been wondering if this is the same problem described in FAM bug #166 ("Pollster broken by DNotify patch", http://oss.sgi.com/bugzilla/show_bug.cgi?id=166). Looking at the RH source, it does seem to have the DNotify patch. The code referenced in comment #2 is not the same as the code in the patched RH source, though, and I can't really tell if this bug was addressed in their code or not. I'm not even sure which version of FAM the bug report would apply to. Does anyone know about this, or have some suggestions? Thanks! Michael Wardle wrote: >On Sat, 2003-04-12 at 02:55, Ken Tanzer wrote: > > >>We're trying to use FAM to monitor files on a directory that is mounted >>via NFS. >> >>This works fine when a file is modified via the local machine on which >>FAM is running. When the file is changed from the server that is >>exporting NFS, however, FAM does not detect this, and does nothing. >> >> > >By default, Red Hat ships with the FAM daemon bound to the loopback >interface so that it can only be used by the local machine. > >Try removing the "bind = 127.0.0.1" entry in /etc/xinetd.d/sgi_fam. > > > From michael.wardle@adacel.com Mon Apr 14 17:34:51 2003 Received: with ECARTIS (v1.0.0; list fam); Mon, 14 Apr 2003 17:35:00 -0700 (PDT) Received: from adacel.com (gunsmoke.adacel.com.au [210.11.130.7]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h3F0YoFu027824 for ; Mon, 14 Apr 2003 17:34:51 -0700 Received: from nexus.adacel.com (Not Verified[10.32.240.1]) by adacel.com with MailMarshal (v5,0,3,91) id ; Tue, 15 Apr 2003 10:33:03 +1000 Received: (qmail 9774 invoked from network); 15 Apr 2003 00:29:32 -0000 Received: from unknown (HELO hera.wodonga.adacel.com.au) (192.168.75.251) by nexus.adacel.com with SMTP; 15 Apr 2003 00:29:31 -0000 Received: from selene.wodonga.adacel.com.au (selene.wodonga.adacel.com.au [192.168.75.55]) by hera.wodonga.adacel.com.au (8.11.6/8.11.6) with ESMTP id h3F0YhE08757 for ; Tue, 15 Apr 2003 10:34:43 +1000 Subject: Re: FAM not notifying of non-local changes on NFS files From: Michael Wardle To: fam@oss.sgi.com In-Reply-To: <3E9B4EB8.1050107@desc.org> References: <3E96F39E.1090105@desc.org> <1050276396.2229.6.camel@selene.wodonga.adacel.com.au> <3E9B4EB8.1050107@desc.org> Content-Type: text/plain Organization: Adacel Technologies Message-Id: <1050366882.15710.8.camel@selene.wodonga.adacel.com.au> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 15 Apr 2003 10:34:42 +1000 Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-archive-position: 113 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: michael.wardle@adacel.com Precedence: bulk X-list: fam On Tue, 2003-04-15 at 10:13, Ken Tanzer wrote: > I took the "bind" entry out as suggested, and it doesn't seem to help. > I don't think that setting should matter anyway, as we're not trying to > use FAM on a non-local machine. It will matter on the server, I think. I can't see how it would matter on the client, but you might like to try it there as well, just in case. > The only thing running on a non-local > machine is the NFS server. Here's a bad diagram: > > MACHINE A > FAM Client Running > FAM Server Running > Watching /mnt/nfs/somedir-->NFS---->/somedir/somefile > NFS Server > MACHINE B > > From Machine A, "touch /mnt/nfs/somedir/somefile" is picked up by FAM. > When you do "touch /somedir/somefile" from Machine B, nothing happens. > > I've been wondering if this is the same problem described in FAM bug > #166 ("Pollster broken by DNotify patch", > http://oss.sgi.com/bugzilla/show_bug.cgi?id=166). This should only apply if your kernel does not provide the DNotify API. Red Hat has only used the DNotify patch on versions of their distributions using Linux kernel 2.4 and higher, so provided you are also using a 2.4 or higher kernel, I'm not sure that this bug affects you. Maybe it would be useful for me to write another test script that tests whether a local famd can connect to -- and get updates from -- a remote famd. Thanks for mentioning this problem to me. I'm glad you're investigating the possible causes, but I don't think we've yet hit it on the head. Some other things I'd suggest trying are: - running famd with the debug flag (-d) on the server and the client - ensuring the sgi_fam service is registered on the server using portmap - ensuring fam is not blocked by firewalling or tcp wrappers - ensuring the contents of /etc/mtab and /etc/exports are sane - monitoring network traffic using tcpdump I haven't used the NFS functionality in FAM for a while now (partly because all my Linux servers are running Red Hat which disables FAM networking out of the box). I'll have a look at it myself when time permits, but this isn't likely to be soon. Thanks and good luck -- Michael Wardle Adacel Technologies From ktanzer@desc.org Mon Apr 14 18:14:21 2003 Received: with ECARTIS (v1.0.0; list fam); Mon, 14 Apr 2003 18:14:34 -0700 (PDT) Received: from mail.desc.org (splash195.drizzle.com [216.162.197.195]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h3F1EKFu002677 for ; Mon, 14 Apr 2003 18:14:20 -0700 Received: from desc.org (test.desc.org [192.168.6.205]) by mail.desc.org (8.9.3/8.9.3) with ESMTP id SAA19208 for ; Mon, 14 Apr 2003 18:14:19 -0700 Message-ID: <3E9B5CEB.2040202@desc.org> Date: Mon, 14 Apr 2003 18:14:19 -0700 From: Ken Tanzer User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: fam@oss.sgi.com Subject: Re: FAM not notifying of non-local changes on NFS files References: <3E96F39E.1090105@desc.org> <1050276396.2229.6.camel@selene.wodonga.adacel.com.au> <3E9B4EB8.1050107@desc.org> <1050366882.15710.8.camel@selene.wodonga.adacel.com.au> In-Reply-To: <1050366882.15710.8.camel@selene.wodonga.adacel.com.au> Content-Type: multipart/alternative; boundary="------------070005060301040003090303" X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-archive-position: 114 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: ktanzer@desc.org Precedence: bulk X-list: fam This is a multi-part message in MIME format. --------------070005060301040003090303 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Michael Wardle wrote: >On Tue, 2003-04-15 at 10:13, Ken Tanzer wrote: > > >>I took the "bind" entry out as suggested, and it doesn't seem to help. >>I don't think that setting should matter anyway, as we're not trying to >>use FAM on a non-local machine. >> >> > >It will matter on the server, I think. I can't see how it would matter >on the client, but you might like to try it there as well, just in case. > > I took the bind entry out on both sides, and still no luck. But additionally, I'm either missing something (probably obvious :)), or not conveying something clearly. Per the FAM man page, "If asked to monitor files on an NFS mounted filesystem, fam tries to use fam on the NFS server to monitor files. If fam cannot contact a remote fam, it polls the files instead." It seems like the polling is not working. Given that I did have the bind=127.0.0.1 on the NFS server ("Machine B"), FAM on machine A definitely would have been unable to contact it, and therefore should have resorted to polling. But it doesn't. > > >> The only thing running on a non-local >>machine is the NFS server. Here's a bad diagram: >> >>MACHINE A >>FAM Client Running >>FAM Server Running >>Watching /mnt/nfs/somedir-->NFS---->/somedir/somefile >> NFS Server >> MACHINE B >> >> From Machine A, "touch /mnt/nfs/somedir/somefile" is picked up by FAM. >>When you do "touch /somedir/somefile" from Machine B, nothing happens. >> >>I've been wondering if this is the same problem described in FAM bug >>#166 ("Pollster broken by DNotify patch", >>http://oss.sgi.com/bugzilla/show_bug.cgi?id=166). >> >> > >This should only apply if your kernel does not provide the DNotify API. >Red Hat has only used the DNotify patch on versions of their >distributions using Linux kernel 2.4 and higher, so provided you are >also using a 2.4 or higher kernel, I'm not sure that this bug affects >you. > > RedHat 8.0 does have a 2.4 kernel. It also comes with fam 2.6.8, but it definitely seems to have the DNotify patch. Here's a snippet from the SPEC file of the source RPM: URL: http://oss.sgi.com/projects/fam/ Source: fam-%{version}.tar.gz Source2: sgi_fam.xinetd -->Patch1: fam-2.6.8-dnotify.patch<-- Patch2: fam_build.patch Patch7: fam-2.6.7-cleanup.patch Patch8: fam-2.6.7-gcc31.patch >Maybe it would be useful for me to write another test script that tests >whether a local famd can connect to -- and get updates from -- a remote >famd. > > >Thanks for mentioning this problem to me. I'm glad you're investigating >the possible causes, but I don't think we've yet hit it on the head. > >Some other things I'd suggest trying are: >- running famd with the debug flag (-d) on the server and the client >- ensuring the sgi_fam service is registered on the server using portmap >- ensuring fam is not blocked by firewalling or tcp wrappers >- ensuring the contents of /etc/mtab and /etc/exports are sane >- monitoring network traffic using tcpdump > >I haven't used the NFS functionality in FAM for a while now (partly >because all my Linux servers are running Red Hat which disables FAM >networking out of the box). I'll have a look at it myself when time >permits, but this isn't likely to be soon. > >Thanks and good luck > > Thanks for these suggestions. I will try to go through them soon, probably tomorrow. Do you think any of them would be relevant to getting polling working, or are they all network-focused? (If I got either one working, I'd be happy. I just tried zeroing in on polling 'cause it seemed like it would be simpler to isolate the problem!). --------------070005060301040003090303 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit

Michael Wardle wrote:
On Tue, 2003-04-15 at 10:13, Ken Tanzer wrote:
  
I took the "bind" entry out as suggested, and it doesn't seem to help.  
I don't think that setting should matter anyway, as we're not trying to 
use FAM on a non-local machine.
    

It will matter on the server, I think.  I can't see how it would matter
on the client, but you might like to try it there as well, just in case.
  
I took the bind entry out on both sides, and still no luck.

But additionally, I'm either missing something (probably obvious :)), or not conveying something clearly.  Per the FAM man page,

"If asked to monitor files on an NFS mounted filesystem, fam tries to use fam on the NFS server to monitor  files.  If fam cannot contact a remote fam, it polls the files instead."

It seems like the polling is not working.  Given that I did have the bind=127.0.0.1 on the NFS server ("Machine B"), FAM on machine A definitely would have been unable to contact it, and therefore should have resorted to polling.  But it doesn't.



  
  The only thing running on a non-local 
machine is the NFS server.  Here's a bad diagram:

MACHINE A
FAM Client Running
FAM Server Running
Watching  /mnt/nfs/somedir-->NFS---->/somedir/somefile
                                     NFS Server
                                     MACHINE B

 From Machine A, "touch /mnt/nfs/somedir/somefile" is picked up by FAM.
When you do "touch /somedir/somefile" from Machine B, nothing happens.

I've been wondering if this is the same problem described in FAM bug 
#166 ("Pollster broken by DNotify patch", 
http://oss.sgi.com/bugzilla/show_bug.cgi?id=166).
    

This should only apply if your kernel does not provide the DNotify API. 
Red Hat has only used the DNotify patch on versions of their
distributions using Linux kernel 2.4 and higher, so provided you are
also using a 2.4 or higher kernel, I'm not sure that this bug affects
you.
  
RedHat 8.0 does have a 2.4 kernel.  It also comes with  fam 2.6.8, but it definitely seems to have the DNotify patch.  Here's a snippet from the SPEC file of the source RPM:

URL: http://oss.sgi.com/projects/fam/
Source: fam-%{version}.tar.gz
Source2: sgi_fam.xinetd
-->Patch1: fam-2.6.8-dnotify.patch<--
Patch2: fam_build.patch
Patch7: fam-2.6.7-cleanup.patch
Patch8: fam-2.6.7-gcc31.patch



Maybe it would be useful for me to write another test script that tests
whether a local famd can connect to -- and get updates from -- a remote
famd.
  
Thanks for mentioning this problem to me.  I'm glad you're investigating
the possible causes, but I don't think we've yet hit it on the head.

Some other things I'd suggest trying are:
- running famd with the debug flag (-d) on the server and the client
- ensuring the sgi_fam service is registered on the server using portmap
- ensuring fam is not blocked by firewalling or tcp wrappers
- ensuring the contents of /etc/mtab and /etc/exports are sane
- monitoring network traffic using tcpdump

I haven't used the NFS functionality in FAM for a while now (partly
because all my Linux servers are running Red Hat which disables FAM
networking out of the box).  I'll have a look at it myself when time
permits, but this isn't likely to be soon.

Thanks and good luck
  
Thanks for these suggestions.  I will try to go through them soon, probably tomorrow.  Do you think any of them would be relevant to getting polling working, or are they all network-focused?  (If I got either one working, I'd be happy.  I just tried zeroing in on polling 'cause it seemed like it would be simpler to isolate the problem!).

--------------070005060301040003090303-- From michael.wardle@adacel.com Mon Apr 14 18:37:41 2003 Received: with ECARTIS (v1.0.0; list fam); Mon, 14 Apr 2003 18:37:44 -0700 (PDT) Received: from adacel.com (gunsmoke.adacel.com.au [210.11.130.7]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h3F1bdFu002889 for ; Mon, 14 Apr 2003 18:37:40 -0700 Received: from nexus.adacel.com (Not Verified[10.32.240.1]) by adacel.com with MailMarshal (v5,0,3,91) id ; Tue, 15 Apr 2003 11:35:51 +1000 Received: (qmail 20585 invoked from network); 15 Apr 2003 01:32:21 -0000 Received: from unknown (HELO hera.wodonga.adacel.com.au) (192.168.75.251) by nexus.adacel.com with SMTP; 15 Apr 2003 01:32:20 -0000 Received: from selene.wodonga.adacel.com.au (selene.wodonga.adacel.com.au [192.168.75.55]) by hera.wodonga.adacel.com.au (8.11.6/8.11.6) with ESMTP id h3F1bWE08798 for ; Tue, 15 Apr 2003 11:37:32 +1000 Subject: Re: FAM not notifying of non-local changes on NFS files From: Michael Wardle To: fam@oss.sgi.com In-Reply-To: <3E9B5CEB.2040202@desc.org> References: <3E96F39E.1090105@desc.org> <1050276396.2229.6.camel@selene.wodonga.adacel.com.au> <3E9B4EB8.1050107@desc.org> <1050366882.15710.8.camel@selene.wodonga.adacel.com.au> <3E9B5CEB.2040202@desc.org> Content-Type: text/plain Organization: Adacel Technologies Message-Id: <1050370652.15710.27.camel@selene.wodonga.adacel.com.au> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 15 Apr 2003 11:37:32 +1000 Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-archive-position: 115 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: michael.wardle@adacel.com Precedence: bulk X-list: fam On Tue, 2003-04-15 at 11:14, Ken Tanzer wrote: > But additionally, I'm either missing something (probably obvious :)), > or not conveying something clearly. Per the FAM man page, > > "If asked to monitor files on an NFS mounted filesystem, fam tries to > use fam on the NFS server to monitor files. If fam cannot contact a > remote fam, it polls the files instead." > > It seems like the polling is not working. Given that I did have the > bind=127.0.0.1 on the NFS server ("Machine B"), FAM on machine A > definitely would have been unable to contact it, and therefore should > have resorted to polling. But it doesn't. No, I just read your message too quickly to reflect on the NFS + Polling + DNotify thing. In this case, however, it would surely still be better to get the local famd talking to the remote famd, rather than using polling over NFS if we can. > > > I've been wondering if this is the same problem described in FAM bug > > > #166 ("Pollster broken by DNotify patch", > > > http://oss.sgi.com/bugzilla/show_bug.cgi?id=166). > > > > > > > This should only apply if your kernel does not provide the DNotify API. > > Red Hat has only used the DNotify patch on versions of their > > distributions using Linux kernel 2.4 and higher, so provided you are > > also using a 2.4 or higher kernel, I'm not sure that this bug affects > > you. > > > RedHat 8.0 does have a 2.4 kernel. It also comes with fam 2.6.8, but > it definitely seems to have the DNotify patch. Yes, this is certainly the case. I am fairly familiar with Red Hat's setup. > > Some other things I'd suggest trying are: > > - running famd with the debug flag (-d) on the server and the client > > - ensuring the sgi_fam service is registered on the server using portmap > > - ensuring fam is not blocked by firewalling or tcp wrappers > > - ensuring the contents of /etc/mtab and /etc/exports are sane > > - monitoring network traffic using tcpdump > > > > I haven't used the NFS functionality in FAM for a while now (partly > > because all my Linux servers are running Red Hat which disables FAM > > networking out of the box). I'll have a look at it myself when time > > permits, but this isn't likely to be soon. > > > > Thanks and good luck > > > Thanks for these suggestions. I will try to go through them soon, > probably tomorrow. Do you think any of them would be relevant to > getting polling working, or are they all network-focused? Almost exclusively on getting the local famd talking to the remote famd, rather than using polling. -- Michael Wardle Adacel Technologies From michael.wardle@adacel.com Mon Apr 14 23:57:02 2003 Received: with ECARTIS (v1.0.0; list fam); Mon, 14 Apr 2003 23:57:10 -0700 (PDT) Received: from adacel.com (gunsmoke.adacel.com.au [210.11.130.7]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h3F6v0Fu008510 for ; Mon, 14 Apr 2003 23:57:01 -0700 Received: from nexus.adacel.com (Not Verified[10.32.240.1]) by adacel.com with MailMarshal (v5,0,3,91) id ; Tue, 15 Apr 2003 16:55:10 +1000 Received: (qmail 601 invoked from network); 15 Apr 2003 06:51:39 -0000 Received: from unknown (HELO hera.wodonga.adacel.com.au) (192.168.75.251) by nexus.adacel.com with SMTP; 15 Apr 2003 06:51:39 -0000 Received: from selene.wodonga.adacel.com.au (selene.wodonga.adacel.com.au [192.168.75.55]) by hera.wodonga.adacel.com.au (8.11.6/8.11.6) with ESMTP id h3F6upE08949 for ; Tue, 15 Apr 2003 16:56:51 +1000 Subject: FAM 2.6.10 available From: Michael Wardle To: fam@oss.sgi.com Content-Type: text/plain Organization: Adacel Technologies Message-Id: <1050389811.15710.44.camel@selene.wodonga.adacel.com.au> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 15 Apr 2003 16:56:51 +1000 Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-archive-position: 116 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: michael.wardle@adacel.com Precedence: bulk X-list: fam Hi FAM 2.6.10 is now available. This new release includes minor build fixes for SysV-based platforms and systems using GCC 3. It is likely to be the last release before the new 2.7 series. The source distribution can be downloaded from: A list of changes is available: As usual, please report bugs to SGI's OSS Bugzilla at: -- Michael Wardle Adacel Technologies From jorgland@sol.wh-hms.uni-ulm.de Tue Apr 15 04:34:27 2003 Received: with ECARTIS (v1.0.0; list fam); Tue, 15 Apr 2003 04:34:38 -0700 (PDT) Received: from sol.wh-hms.uni-ulm.de (qmailr@sol.wh-hms.uni-ulm.de [134.60.220.1]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h3FBYPFu020130 for ; Tue, 15 Apr 2003 04:34:26 -0700 Received: (qmail 4513 invoked from network); 15 Apr 2003 11:34:22 -0000 Received: from unknown (HELO joergland.wh-hms.uni-ulm.de) (134.60.220.110) by sol.wh-hms.uni-ulm.de with SMTP; 15 Apr 2003 11:34:22 -0000 Received: (qmail 2037 invoked by uid 1000); 15 Apr 2003 11:36:41 -0000 Date: Tue, 15 Apr 2003 13:36:41 +0200 From: Joerg Wendland To: Ken Tanzer Cc: fam@oss.sgi.com Subject: Re: FAM not notifying of non-local changes on NFS files Message-ID: <20030415113641.GA1987@joergland.wh-hms.uni-ulm.de> References: <3E96F39E.1090105@desc.org> <1050276396.2229.6.camel@selene.wodonga.adacel.com.au> <3E9B4EB8.1050107@desc.org> <1050366882.15710.8.camel@selene.wodonga.adacel.com.au> <3E9B5CEB.2040202@desc.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LTeJQqWS0MN7I/qa" Content-Disposition: inline In-Reply-To: <3E9B5CEB.2040202@desc.org> User-Agent: Mutt/1.5.4i X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-archive-position: 117 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: joergland@debian.org Precedence: bulk X-list: fam --LTeJQqWS0MN7I/qa Content-Type: multipart/mixed; boundary="rQ2U398070+RC21q" Content-Disposition: inline --rQ2U398070+RC21q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Ken Tanzer, on 2003-04-14, 18:14, you wrote: > It seems like the polling is not working. Given that I did have the=20 > bind=3D127.0.0.1 on the NFS server ("Machine B"), FAM on machine A=20 > definitely would have been unable to contact it, and therefore should=20 > have resorted to polling. But it doesn't. It does indeed not work when you use the DNotify patch. Please try to compile FAM with the attached (modified) patch. HTH, Joerg --=20 Joerg "joergland" Wendland GPG: 51CF8417 FP: 79C0 7671 AFC7 315E 657A F318 57A3 7FBD 51CF 8417 --rQ2U398070+RC21q Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=00dnotify Content-Transfer-Encoding: quoted-printable diff -urbN fam-2.6.9.orig/acconfig.h fam-2.6.9/acconfig.h --- fam-2.6.9.orig/acconfig.h 2002-07-16 08:03:58.000000000 +0200 +++ fam-2.6.9/acconfig.h 2003-01-08 14:17:50.000000000 +0100 @@ -17,6 +17,9 @@ /* Define if the system has imon and IMONIOC_ ioctl flags. */ #undef HAVE_IMON =20 +/* Define if the system has the dnotify fcntl and it's gonna be used. */ +#undef USE_DNOTIFY + /* Define if the system has the struct revokdi and the IMONIOC_REVOKDI ** ioctl flag. (IRIX 5.3 doesn't.) */ diff -urbN fam-2.6.9.orig/configure.in fam-2.6.9/configure.in --- fam-2.6.9.orig/configure.in 2002-07-16 08:23:52.000000000 +0200 +++ fam-2.6.9/configure.in 2003-01-08 14:17:50.000000000 +0100 @@ -100,6 +100,24 @@ dnl AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h syslog.h unistd.h) =20 dnl +dnl Test for the linux dnotify fcntl +dnl +AC_MSG_CHECKING([for dnotify fcntl support]) +fam_save_cppflags=3D"$CPPFLAGS" +CPPFLAGS=3D"$CPPFLAGS -D_GNU_SOURCE" +AC_TRY_COMPILE([ +#define _GNU_SOURCE =20 +#include +#include +], +[ int fd =3D 1; + fcntl (fd, F_NOTIFY, (DN_MODIFY|DN_CREATE|DN_DELETE|DN_RENAME|DN_ATTRIB)= |DN_MULTISHOT); +], have_dnotify=3Dyes, have_dnotify=3Dno) +use_dnotify=3Dfalse +CPPFLAGS=3D"$pango_save_cppflags" +AC_MSG_RESULT($have_dnotify) + +dnl dnl See if imon is available; if so, is it IRIX or Linux? dnl if test `uname` =3D 'IRIX' || test `uname` =3D 'IRIX64'; then @@ -122,11 +140,17 @@ if test "$have_imon" !=3D "yes"; then have_imon=3Dno AC_DEFINE(HAVE_IMON, 0) + if test "$have_dnotify" =3D "yes"; then + AC_DEFINE(USE_DNOTIFY) + use_dnotify=3Dtrue + fi IMON_FUNCS=3DIMonNone fi +AM_CONDITIONAL(USE_DNOTIFY, $use_dnotify) AC_SUBST(IMON_FUNCS) echo "Using imon support module $IMON_FUNCS" =20 + AC_CHECK_HEADER(sys/statvfs.h, [AC_DEFINE(HAVE_STATVFS, 1) have_statvfs=3D= "yes"], [AC_DEFINE(HAVE_STATVFS, 0) have_statvfs=3D"no"]) AC_CHECK_HEADER(sys/syssgi.h, AC_DEFINE(HAVE_SYSSGI, 1), AC_DEFINE(HAVE_= SYSSGI, 0)) AC_CHECK_HEADER(sys/fs/nfs_clnt.h, AC_DEFINE(HAVE_SYS_FS_NFS_CLNT_H, 1), A= C_DEFINE(HAVE_SYS_FS_NFS_CLNT_H, 0)) @@ -580,7 +604,7 @@ dnl=20 dnl fam is a good deal less interesting without imon. dnl=20 -if test "$have_imon" !=3D 'yes'; then +if test "$have_imon" !=3D 'yes' -a "$have_dnotify" !=3D 'yes'; then cat << EOF =20 ****************************************************************** diff -urbN fam-2.6.9.orig/fam/DNotify.c++ fam-2.6.9/fam/DNotify.c++ --- fam-2.6.9.orig/fam/DNotify.c++ 1970-01-01 01:00:00.000000000 +0100 +++ fam-2.6.9/fam/DNotify.c++ 2003-01-08 14:17:50.000000000 +0100 @@ -0,0 +1,586 @@ +// Copyright (C) 2001 Red Hat, Inc. All Rights Reserved. +// Copyright (C) 1999 Silicon Graphics, Inc. All Rights Reserved. +// =20 +// This program is free software; you can redistribute it and/or modify it +// under the terms of version 2 of the GNU General Public License as +// published by the Free Software Foundation. +// +// This program is distributed in the hope that it would be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Further, any +// license provided herein, whether implied or otherwise, is limited to +// this program in accordance with the express provisions of the GNU +// General Public License. Patent licenses, if any, provided herein do n= ot +// apply to combinations of this program with other product or programs, = or +// any other product whatsoever. This program is distributed without any +// warranty that the program is delivered free of the rightful claim of a= ny +// third person by way of infringement or the like. See the GNU General +// Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write the Free Software Foundation, Inc., 59 +// Temple Place - Suite 330, Boston MA 02111-1307, USA. + +#define _GNU_SOURCE +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "DNotify.h" + +#include "Interest.h" +#include "Log.h" +#include "Scheduler.h" +#include + + +int DNotify::pipe_write_fd =3D -2; +int DNotify::pipe_read_fd =3D -2; +volatile sig_atomic_t DNotify::queue_overflowed =3D 0; +volatile sig_atomic_t DNotify::queue_changed =3D 0; +int DNotify::change_queue[QUEUESIZE]; +volatile int DNotify::queue_head =3D 0; // Only modified by read handler +volatile int DNotify::queue_tail =3D 0; // Only modified by signal handler +DNotify::EventHandler DNotify::ehandler; + +DNotify::DirWatch *DNotify::dir_hash[DIR_HASHSIZE]; +DNotify::FileWatch *DNotify::file_hash[FILE_HASHSIZE]; + +struct DNotify::FileWatch +{ + DirWatch *dir_watch; + dev_t file_dev; + ino_t file_ino; + FileWatch *next; // The DirWatch.watches list + FileWatch *hash_link; +}; + +struct DNotify::DirWatch +{ + int fd; + dev_t dir_dev; + ino_t dir_ino; + =20 + DirWatch *hash_link; + FileWatch *watches; +}; + +struct DNotify::ChangeEventData +{ + dev_t file_dev; + ino_t file_ino; +}; =20 + +DNotify::DNotify(EventHandler h) +{ + assert(ehandler =3D=3D NULL); + ehandler =3D h; +} + +DNotify::~DNotify() +{ + if (pipe_read_fd >=3D 0) + { + // Tell the scheduler. + + (void) Scheduler::remove_read_handler(pipe_read_fd); + + // Close the pipe. + + if (close(pipe_read_fd) < 0) + Log::perror("can't pipe read end"); + else + Log::debug("closed pipe read end"); +=09 + if (close(pipe_write_fd) < 0) + Log::perror("can't pipe write end"); + else + Log::debug("closed pipe write end"); + pipe_read_fd =3D -1; + } + ehandler =3D NULL; +} + +void +DNotify::overflow_signal_handler(int sig, siginfo_t *si, void *data) +{ + char c =3D 'x'; + + { + char *str =3D "*************** overflow sigqueue *********************= **\n"; + write (STDERR_FILENO, str, strlen(str)); + } + + if (!queue_overflowed) + { + queue_overflowed =3D 1; + // Trigger the read handler + write(pipe_write_fd, &c, 1); + } +} + +void +DNotify::signal_handler(int sig, siginfo_t *si, void *data) +{ + int left; + char c =3D 'x'; + + if (queue_head <=3D queue_tail) + left =3D (QUEUESIZE + queue_head) - queue_tail; + else=20 + left =3D queue_head - queue_tail; + =20 + // Must leave at least one item unused to see difference + // Betweeen empty and full + if (left <=3D 1) + { + queue_overflowed =3D 1; + { + char *str =3D "*************** overflow famqueue ****************\n"; + write (STDERR_FILENO, str, strlen(str)); + } + } + else + { + change_queue[queue_tail] =3D si->si_fd; + queue_tail =3D (queue_tail + 1) % QUEUESIZE; + } + =20 + if (!queue_changed) + { + queue_changed =3D 1; + // Trigger the read handler + write(pipe_write_fd, &c, 1); + } +} + +bool +DNotify::is_active() +{ + if (pipe_read_fd =3D=3D -2) + { + int filedes[2]; + int res; +=09 + res =3D pipe (filedes); + if (res >=3D 0) + { Log::debug("opened pipe"); + pipe_read_fd =3D filedes[0]; + pipe_write_fd =3D filedes[1]; + + // Setup signal handler: + struct sigaction act; + =20 + act.sa_sigaction =3D signal_handler; + sigemptyset(&act.sa_mask); + act.sa_flags =3D SA_SIGINFO; + sigaction(SIGRTMIN, &act, NULL); + + // When the RT queue overflows we get a SIGIO + act.sa_sigaction =3D overflow_signal_handler; + sigemptyset(&act.sa_mask); + sigaction(SIGIO, &act, NULL); + + (void) Scheduler::install_read_handler(pipe_read_fd, read_handler, NU= LL); + } + } + return pipe_read_fd >=3D 0; +} + +DNotify::DirWatch * +DNotify::lookup_dirwatch (int fd) +{ + DirWatch **p; + DirWatch *w; + + p =3D dir_hashchain (fd); + + while (*p) + { + w =3D *p; + + if (w->fd =3D=3D fd) + return w; + + p =3D &w->hash_link; + } + =20 + return *p; +} + +// This colud be made faster by using another hash table. +// But it's not that bad, since it is only used by express/revoke +DNotify::DirWatch * +DNotify::lookup_dirwatch (dev_t dir_dev, ino_t dir_ino) +{ + DirWatch *p; + int i; + + for (i=3D0;idir_dev =3D=3D dir_dev && p->dir_ino =3D=3D dir_ino) + return p; + =20 + p =3D p->hash_link; + } + } + =20 + return NULL; +} + +DNotify::FileWatch * +DNotify::lookup_filewatch (dev_t dev, ino_t ino) +{ + FileWatch **p; + FileWatch *w; + + p =3D file_hashchain (dev, ino); + + while (*p) + { + w =3D *p; + + if (w->file_dev =3D=3D dev && w->file_ino =3D=3D ino) + return w; + + p =3D &w->hash_link; + } + =20 + return *p; +} + +// Make sure w is not already in the hash table before calling +// this function. +void +DNotify::hash_dirwatch(DirWatch *w) +{ + DirWatch **p; + p =3D dir_hashchain (w->fd); + w->hash_link =3D *p; + *p =3D w; +} + +// Make sure w is not already in the hash table before calling +// this function. +void +DNotify::hash_filewatch(FileWatch *w) +{ + FileWatch **p; + p =3D file_hashchain (w->file_dev, w->file_ino); + w->hash_link =3D *p; + *p =3D w; +} + +void +DNotify::unhash_dirwatch(DirWatch *w) +{ + DirWatch **p; + =20 + p =3D dir_hashchain (w->fd); + =20 + while (*p) + { + if (*p =3D=3D w) + { + *p =3D w->hash_link; + break; + } + p =3D &(*p)->hash_link; + } + w->hash_link =3D NULL; +} + +void +DNotify::unhash_filewatch(FileWatch *w) +{ + FileWatch **p; + =20 + p =3D file_hashchain (w->file_dev, w->file_ino); + =20 + while (*p) + { + if (*p =3D=3D w) + { + *p =3D w->hash_link; + break; + } + p =3D &(*p)->hash_link; + } + w->hash_link =3D NULL; +} + +DNotify::Status +DNotify::watch_dir(const char *notify_dir, dev_t file_dev, ino_t file_ino) +{ + struct stat stat; + dev_t dir_dev; + ino_t dir_ino; + DirWatch *dwatch; + FileWatch **p; + FileWatch *fw; + =20 + if (lstat (notify_dir, &stat) =3D=3D -1) + return BAD; + =20 + dwatch =3D lookup_dirwatch(stat.st_dev, stat.st_ino); + if (!dwatch) + { + Log::debug ("New DirWatch for %s (%x %x)\n", + notify_dir, (int)stat.st_dev, (int)stat.st_ino); + dwatch =3D new DirWatch; + dwatch->watches =3D NULL; + dwatch->hash_link =3D NULL; + dwatch->dir_dev =3D stat.st_dev; + dwatch->dir_ino =3D stat.st_ino; + =20 + dwatch->fd =3D open(notify_dir, O_RDONLY); + fcntl (dwatch->fd, F_SETSIG, SIGRTMIN); + if(fcntl (dwatch->fd, F_NOTIFY, + (DN_MODIFY|DN_CREATE|DN_DELETE|DN_RENAME|DN_ATTRIB) | DN_MULTISHOT)= =3D=3D-1) { + Log::debug ("fcntl F_NOTIFY failed!\n"); + return BAD; + } + hash_dirwatch (dwatch); + } + + for (p=3D&dwatch->watches; *p; p=3D&(*p)->next) + { + fw =3D *p; + if (fw->file_dev =3D=3D file_dev && fw->file_ino =3D=3D file_ino) + return OK; + } + =20 + // No old FileWatch, need to add one: + Log::debug("New FileWatch for %x %x\n", (int)file_dev, (int)file_ino); + *p =3D new FileWatch; + fw =3D *p; + fw->next =3D NULL; + fw->file_dev =3D file_dev; + fw->file_ino =3D file_ino; + fw->dir_watch =3D dwatch; + hash_filewatch(fw); + return OK; +} + +char * +dirname_dup (const char *name) +{ + char *copy =3D strdup(name); + char *res =3D dirname(copy); + res =3D strdup(res); + free (copy); + return res; +} + +DNotify::Status +DNotify::express(const char *name, struct stat *status) +{ + struct stat stat; + char *notify_dir; + int res; + Status s; + dev_t dev; + ino_t ino; + + Log::debug("express() name: %s\n", name); + + if (!is_active()) + return BAD; + + if (::lstat (name, &stat) =3D=3D -1) + return BAD; + + dev =3D stat.st_dev; + ino =3D stat.st_ino; + =20 + if ((stat.st_mode & S_IFMT) !=3D S_IFDIR) + notify_dir =3D dirname_dup (name); + else + notify_dir =3D (char *)name; + + s =3D watch_dir (notify_dir, dev, ino); + if (notify_dir !=3D name) + free (notify_dir); + if (s) + return s; + + // Check for a race condition; if someone removed or changed the + // file at the same time that we are expressing interest in it, + // revoke the interest so we don't get notifications about changes + // to a recycled inode that we don't otherwise care about. + // + struct stat st; + if (status =3D=3D NULL) { + status =3D &st; + } + if (::lstat(name, status) =3D=3D -1) { + Log::perror("stat on \"%s\" failed", name); + revoke(name, stat.st_dev, stat.st_ino); + return BAD; + } + if (status->st_dev !=3D stat.st_dev + || status->st_ino !=3D stat.st_ino) { + Log::error("File \"%s\" changed between express and stat", + name); + revoke(name, stat.st_dev, stat.st_ino); + return BAD; + }=09 + + Log::debug("told dnotify to monitor \"%s\" =3D dev %d/%d, ino %d", nam= e, + major(status->st_dev), minor(status->st_dev), + status->st_ino); + return OK; +} + +DNotify::Status +DNotify::revoke(const char *name, dev_t dev, ino_t ino) +{ + FileWatch *fwatch; + DirWatch *dwatch; + =20 + Log::debug("revoke() name: %s, dev: %x, ino: %x\n", name, dev, ino); + + if (!is_active()) + return BAD; + + // Lookup FileWatch by dev:ino, and its DirWatch. + fwatch =3D lookup_filewatch (dev, ino); + if (fwatch =3D=3D NULL) + return BAD; + =20 + dwatch =3D fwatch->dir_watch; + =20 + // delete FileWatch, if last FileWatch: close fd, delete DirWatch + Log::debug ("Destroying FileWatch for (%x %x)\n", + (int)fwatch->file_dev, (int)fwatch->file_ino); + FileWatch **p; + for (p=3D&dwatch->watches; *p; p=3D&(*p)->next) + { + if (*p =3D=3D fwatch) + { + *p =3D (*p)->next; + break; + } + } + unhash_filewatch(fwatch); + delete fwatch; + if (dwatch->watches =3D=3D NULL) + { + Log::debug ("Destroying DirWatch for (%x %x)\n", + (int)dwatch->dir_dev, (int)dwatch->dir_ino); + close(dwatch->fd); + unhash_dirwatch(dwatch); + delete dwatch; + } + =20 + return OK; +} + + +void +DNotify::all_watches_changed(void) +{ + int i; + FileWatch *fw; + + for (i=3D0; ifile_dev, fw->file_ino, CHANGE); + + fw =3D fw->hash_link; + } + } +} + + +void +DNotify::read_handler(int fd, void *) +{ + static char readbuf[5000]; + DirWatch *dw; + FileWatch *fw; + int snap_queue_tail; + int last_fd; + + int rc =3D read(fd, readbuf, sizeof readbuf); + queue_changed =3D 0; + if (rc < 0) + Log::perror("pipe read"); + else if (queue_overflowed) + { + // There is a *slight* race condition here. Between reading + // the queue_overflow flag and resetting it. But it doesn't + // matter, since I'm gonna handle the overflow after reseting + // anyway. + queue_overflowed =3D false; + + // We're soon gonna check all watches anyway, so + // get rid of the current queue + queue_head =3D queue_tail; + =20 + all_watches_changed (); + } + else + { + // Don't read events that happen later than + // the initial read. (Otherwise skipping fd's + // might miss some changes). + snap_queue_tail =3D queue_tail; + last_fd =3D -1; + while (queue_head !=3D snap_queue_tail) + { + fd =3D change_queue[queue_head]; + queue_head =3D (queue_head + 1) % QUEUESIZE; + + // Skip multiple changes to the same fd + if (fd !=3D last_fd) + { + dw =3D lookup_dirwatch (fd); + if (dw) + { + int n_watches, i; + ChangeEventData *data; + =20 + Log::debug("dnotify said dev %d/%d, ino %ld changed", + major(dw->dir_dev), minor(dw->dir_dev), dw->dir_ino); + =20 + n_watches =3D 0; + for (fw=3Ddw->watches; fw; fw=3Dfw->next) + n_watches++; + =20 + data =3D new ChangeEventData[n_watches]; + + i =3D 0; + for (fw=3Ddw->watches; fw; fw=3Dfw->next) + { + data[i].file_dev =3D fw->file_dev; + data[i].file_ino =3D fw->file_ino; + i++; + } + + for (i =3D 0; i < n_watches; i++) + { + (*ehandler)(data[i].file_dev, data[i].file_ino, CHANGE); + } + =20 + delete[] data; + } + } + last_fd =3D fd; + } + } +} + diff -urbN fam-2.6.9.orig/fam/DNotify.h fam-2.6.9/fam/DNotify.h --- fam-2.6.9.orig/fam/DNotify.h 1970-01-01 01:00:00.000000000 +0100 +++ fam-2.6.9/fam/DNotify.h 2003-01-08 14:17:50.000000000 +0100 @@ -0,0 +1,98 @@ +// Copyright (C) 2001 Red Hat, Inc. All Rights Reserved. +// Copyright (C) 1999 Silicon Graphics, Inc. All Rights Reserved. +// +// This program is free software; you can redistribute it and/or modify it +// under the terms of version 2 of the GNU General Public License as +// published by the Free Software Foundation. +// +// This program is distributed in the hope that it would be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Further, any +// license provided herein, whether implied or otherwise, is limited to +// this program in accordance with the express provisions of the GNU +// General Public License. Patent licenses, if any, provided herein do n= ot +// apply to combinations of this program with other product or programs, = or +// any other product whatsoever. This program is distributed without any +// warranty that the program is delivered free of the rightful claim of a= ny +// third person by way of infringement or the like. See the GNU General +// Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write the Free Software Foundation, Inc., 59 +// Temple Place - Suite 330, Boston MA 02111-1307, USA. + +#ifndef DNotify_included +#define DNotify_included + +#include "config.h" +#include "Monitor.h" +#include + +// DNotify is an object encapsulating the dnotify linux fcntl. +// It "emulates" the IMon interface. +// There can only be one instantiation of the DNotify object. +// +// The user of this object uses express() and revoke() to +// express/revoke interest in a file. There is also +// a callback, the EventHandler. When an dnotify event comes in, +// the EventHandler is called. +// +// The user of the DNotify object is the Interest class. + +class DNotify : public Monitor { +public: + DNotify(EventHandler h); + ~DNotify(); + + static bool is_active(); + + virtual Status express(const char *name, struct stat *stat_return); + virtual Status revoke(const char *name, dev_t dev, ino_t ino); + +private: + struct FileWatch; + struct DirWatch; + struct ChangeEventData; + =20 + // Class Variables + enum { QUEUESIZE =3D 1024 }; + static int pipe_write_fd; + static int pipe_read_fd; + static int change_queue[QUEUESIZE]; + static volatile sig_atomic_t DNotify::queue_overflowed; + static volatile sig_atomic_t DNotify::queue_changed; + static volatile int queue_head; // Only modified by read handler + static volatile int queue_tail; // Only modified by signal handler + static EventHandler ehandler; + static void overflow_signal_handler(int sig, siginfo_t *si, void *data= ); + static void signal_handler(int sig, siginfo_t *si, void *data); + static void read_handler(int fd, void *closure); +=20 + enum { DIR_HASHSIZE =3D 257 }; + static DirWatch *dir_hash[DIR_HASHSIZE]; + enum { FILE_HASHSIZE =3D 257 }; + static FileWatch *file_hash[FILE_HASHSIZE]; + + static DirWatch **dir_hashchain(int fd) + { return &dir_hash[(unsigned) (fd) % DIR_HASHSIZE]; } + static FileWatch **file_hashchain(dev_t d, ino_t i) + { return &file_hash[(unsigned) (d+i) % FILE_HASHSIZE]; } + + static DirWatch *lookup_dirwatch (int fd); + static DirWatch *lookup_dirwatch (dev_t dir_dev, ino_t dir_ino); + static FileWatch *lookup_filewatch (dev_t file_dev, ino_t file_ino); + static void hash_dirwatch(DirWatch *w); + static void hash_filewatch(FileWatch *w); + static void unhash_dirwatch(DirWatch *w); + static void unhash_filewatch(FileWatch *w); + static Status watch_dir(const char *notify_dir, dev_t file_dev, ino_t = file_ino); + + static void all_watches_changed(void); + =20 + DNotify(const DNotify&); // Do not copy + DNotify & operator =3D (const DNotify&); // or assign. +}; + +#endif /* !IMon_included */ + + diff -urbN fam-2.6.9.orig/fam/IMon.h fam-2.6.9/fam/IMon.h --- fam-2.6.9.orig/fam/IMon.h 2002-07-16 07:23:24.000000000 +0200 +++ fam-2.6.9/fam/IMon.h 2003-01-08 14:17:50.000000000 +0100 @@ -24,10 +24,7 @@ #define IMon_included =20 #include "config.h" -#include -#include - -#include "Boolean.h" +#include "Monitor.h" =20 struct stat; =20 @@ -41,25 +38,18 @@ // // The user of the IMon object is the Interest class. =20 -class IMon { +class IMon : public Monitor { =20 public: - - enum Status { OK =3D 0, BAD =3D -1 }; - enum Event { EXEC, EXIT, CHANGE }; - - typedef void (*EventHandler)(dev_t, ino_t, int event); - IMon(EventHandler h); ~IMon(); =20 static bool is_active(); =20 - Status express(const char *name, struct stat *stat_return); - Status revoke(const char *name, dev_t dev, ino_t ino); + virtual Status express(const char *name, struct stat *stat_return); + virtual Status revoke(const char *name, dev_t dev, ino_t ino); =20 private: - // Class Variables =20 static int imonfd; diff -urbN fam-2.6.9.orig/fam/Interest.c++ fam-2.6.9/fam/Interest.c++ --- fam-2.6.9.orig/fam/Interest.c++ 2002-07-16 08:14:41.000000000 +0200 +++ fam-2.6.9/fam/Interest.c++ 2003-01-08 14:17:50.000000000 +0100 @@ -43,12 +43,21 @@ #include "Event.h" #include "FileSystem.h" #include "IMon.h" +#include "DNotify.h" #include "Log.h" #include "Pollster.h" #include "timeval.h" =20 Interest *Interest::hashtable[]; -IMon Interest::imon(imon_handler); + +#ifdef USE_DNOTIFY=20 +static DNotify dnotify(Interest::monitor_handler); +Monitor * Interest::monitor =3D &dnotify; +#else +static IMon imon(Interest::monitor_handler); +Monitor * Interest::monitor =3D &imon; +#endif + bool Interest::xtab_verification =3D true; =20 Interest::Interest(const char *name, FileSystem *fs, in_addr host, ExportV= erification ev) @@ -61,10 +70,10 @@ mypath_exported_to_host(ev =3D=3D NO_VERIFY_EXPORTED) { memset(&old_stat, 0, sizeof(old_stat));=20 - IMon::Status s =3D IMon::BAD; =20 - s =3D imon.express(name, &old_stat); - if (s !=3D IMon::OK) + Monitor::Status s =3D Monitor::BAD; + s =3D monitor->express(name, &old_stat); + if (s !=3D Monitor::OK) { int rc =3D lstat(name, &old_stat); if (rc < 0) { Log::info("can't lstat %s", name); @@ -77,7 +86,7 @@ =20 if (ev =3D=3D VERIFY_EXPORTED) verify_exported_to_host(); =20 - if (s =3D=3D IMon::OK) { + if (s =3D=3D Monitor::OK) { =20 if ((exported_to_host()) && (dev || ino)) { @@ -101,7 +110,7 @@ } #endif =20 - if (exported_to_host()) fs->ll_monitor(this, s =3D=3D IMon::OK); + if (exported_to_host()) fs->ll_monitor(this, s =3D=3D Monitor::OK); } =20 Interest::~Interest() @@ -129,7 +138,7 @@ pp =3D &p->hashlink; // move to next element } if (!found_same) - (void) imon.revoke(name(), dev, ino); + (void) monitor->revoke(name(), dev, ino); } } =20 @@ -147,9 +156,9 @@ { =20 // Express interest. - IMon::Status s =3D IMon::BAD; - s =3D imon.express(name(), NULL); - if (s !=3D IMon::OK) { + Monitor::Status s =3D Monitor::BAD; + s =3D monitor->express(name(), NULL); + if (s !=3D Monitor::OK) { return true; } =20 @@ -249,23 +258,23 @@ } =20 void -Interest::imon_handler(dev_t device, ino_t inumber, int event) +Interest::monitor_handler(dev_t device, ino_t inumber, int event) { assert(device || inumber); =20 for (Interest *p =3D *hashchain(device, inumber), *next =3D p; p; p = =3D next) { next =3D p->hashlink; if (p->ino =3D=3D inumber && p->dev =3D=3D device) - { if (event =3D=3D IMon::EXEC) + { if (event =3D=3D Monitor::EXEC) { p->cur_exec_state =3D EXECUTING; (void) p->report_exec_state(); } - else if (event =3D=3D IMon::EXIT) + else if (event =3D=3D Monitor::EXIT) { p->cur_exec_state =3D NOT_EXECUTING; (void) p->report_exec_state(); } else - { assert(event =3D=3D IMon::CHANGE); + { assert(event =3D=3D Monitor::CHANGE); p->scan(); } } diff -urbN fam-2.6.9.orig/fam/Interest.h fam-2.6.9/fam/Interest.h --- fam-2.6.9.orig/fam/Interest.h 2002-07-16 07:23:24.000000000 +0200 +++ fam-2.6.9/fam/Interest.h 2003-01-08 14:17:50.000000000 +0100 @@ -32,7 +32,7 @@ =20 class Event; class FileSystem; -class IMon; +class Monitor; struct stat; =20 // Interest -- abstract base class for filesystem entities of interest. @@ -74,7 +74,7 @@ =20 // Public Class Method =20 - static void imon_handler(dev_t, ino_t, int event); + static void monitor_handler(dev_t, ino_t, int event); =20 static void enable_xtab_verification(bool enable); =20 @@ -121,7 +121,7 @@ =20 // Class Variables =20 - static IMon imon; + static Monitor *monitor; static Interest *hashtable[HASHSIZE]; static bool xtab_verification; =20 diff -urbN fam-2.6.9.orig/fam/Makefile.am fam-2.6.9/fam/Makefile.am --- fam-2.6.9.orig/fam/Makefile.am 2002-07-16 07:23:24.000000000 +0200 +++ fam-2.6.9/fam/Makefile.am 2003-01-08 14:33:01.000000000 +0100 @@ -3,6 +3,12 @@ bin_PROGRAMS =3D fam sysconf_DATA =3D fam.conf =20 +if USE_DNOTIFY +DNOTIFY_FILES =3D DNotify.c++ +else +DNOTIFY_FILES =3D +endif + fam_SOURCES =3D \ Activity.c++ \ Activity.h \ @@ -20,6 +26,7 @@ Directory.h \ DirectoryScanner.c++ \ DirectoryScanner.h \ + DNotify.h \ Event.c++ \ Event.h \ File.c++ \ @@ -48,6 +55,7 @@ NFSFileSystem.h \ NetConnection.c++ \ NetConnection.h \ + Monitor.h \ Pollster.c++ \ Pollster.h \ Request.h \ @@ -72,11 +80,12 @@ main.c++ \ timeval.c++ \ timeval.h \ - @IMON_FUNCS@.c++ + @IMON_FUNCS@.c++ \ + $(DNOTIFY_FILES) =20 -EXTRA_fam_SOURCES =3D IMonIrix.c++ IMonLinux.c++ IMonNone.c++ +EXTRA_fam_SOURCES =3D IMonIrix.c++ IMonLinux.c++ IMonNone.c++ DNotify.c++ =20 -fam_LDADD =3D -lrpcsvc $(top_srcdir)/support/libsupport.a +fam_LDADD =3D -lrpcsvc $(top_srcdir)/support/libsupport.a -lrt -lpthread =20 CLEANFILES +=3D @MKDEPFILE@ ii_files/*.ii sinclude @MKDEPFILE@ diff -urbN fam-2.6.9.orig/fam/Monitor.h fam-2.6.9/fam/Monitor.h --- fam-2.6.9.orig/fam/Monitor.h 1970-01-01 01:00:00.000000000 +0100 +++ fam-2.6.9/fam/Monitor.h 2003-01-08 14:17:50.000000000 +0100 @@ -0,0 +1,57 @@ +// Copyright (C) 2001 Red Hat, Inc. All Rights Reserved. +// Copyright (C) 1999 Silicon Graphics, Inc. All Rights Reserved. +// =20 +// This program is free software; you can redistribute it and/or modify it +// under the terms of version 2 of the GNU General Public License as +// published by the Free Software Foundation. +// +// This program is distributed in the hope that it would be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Further, any +// license provided herein, whether implied or otherwise, is limited to +// this program in accordance with the express provisions of the GNU +// General Public License. Patent licenses, if any, provided herein do n= ot +// apply to combinations of this program with other product or programs, = or +// any other product whatsoever. This program is distributed without any +// warranty that the program is delivered free of the rightful claim of a= ny +// third person by way of infringement or the like. See the GNU General +// Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write the Free Software Foundation, Inc., 59 +// Temple Place - Suite 330, Boston MA 02111-1307, USA. + +#ifndef Monitor_included +#define Monitor_included + +#include "config.h" +#include +#include + +struct stat; + +// Monitor is an abstract baseclass for differend file monitoring +// systems. The original system used was IMon, and the Montor API +// is heavily influenced by that. +// There can only be one instantiation of the Monitor object. +// +// The user of this object uses express() and revoke() to +// express/revoke interest in a file to imon. There is also +// a callback, the EventHandler. When an event comes in, +// the EventHandler is called. +// +// The main implementers of the Monitor class is IMon and DNotify + +class Monitor { +public: + + enum Status { OK =3D 0, BAD =3D -1 }; + enum Event { EXEC, EXIT, CHANGE }; + + typedef void (*EventHandler)(dev_t, ino_t, int event); + + virtual Status express(const char *name, struct stat *stat_return) =3D= 0; + virtual Status revoke(const char *name, dev_t dev, ino_t ino) =3D 0; +}; + +#endif /* !Monitor_included */ diff -urbN fam-2.6.9.orig/include/BTree.h fam-2.6.9/include/BTree.h --- fam-2.6.9.orig/include/BTree.h 2002-07-16 07:23:25.000000000 +0200 +++ fam-2.6.9/include/BTree.h 2003-01-08 14:17:50.000000000 +0100 @@ -271,7 +271,7 @@ n +=3D that->n + 1; link[n] =3D that->link[that->n]; that->n =3D 0; - that->link[0] =3D NULL; + that->link[0] =3D 0; } =20 //////////////////////////////////////////////////////////////////////////= ///// @@ -280,7 +280,7 @@ =20 template BTree::BTree() - : root(NULL), npairs(0) + : root(0), npairs(0) { assert(!(fanout % 2)); } @@ -407,7 +407,7 @@ BTree::Closure BTree::insert(Node *p, const Key& key, const Value& value) { - if (!p) return Closure(key, value, NULL); + if (!p) return Closure(key, value, 0); // If you're running Purify on a client linking with libfam, and it s= ays // that line is causing a 3-byte UMR for BTree::insert() in // FAMNextEvent() ("Reading 8 bytes from 0x... on the stack (3 bytes = at @@ -475,7 +475,7 @@ case UNDER: if (root->n =3D=3D 0) { Node *nr =3D root->link[0]; - root->link[0] =3D NULL; // don't delete subtree + root->link[0] =3D 0; // don't delete subtree delete root; root =3D nr; } @@ -507,8 +507,8 @@ Node *cp =3D p->link[i]; assert(cp); =20 - Node *rp =3D i < p->n ? p->link[i + 1] : NULL; - Node *lp =3D i > 0 ? p->link[i - 1] : NULL; + Node *rp =3D i < p->n ? p->link[i + 1] : 0; + Node *lp =3D i > 0 ? p->link[i - 1] : 0; assert(!rp || rp->n >=3D fanout / 2); assert(!lp || lp->n >=3D fanout / 2); =20 --rQ2U398070+RC21q-- --LTeJQqWS0MN7I/qa Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+m+7JV6N/vVHPhBcRAlVwAJ9gRyn79Peiim5uCZ8Lnjo+y8hW1QCfR3Dc x0zHq+vtkewOKj0aW8Pqc4g= =voBE -----END PGP SIGNATURE----- --LTeJQqWS0MN7I/qa-- From michael.wardle@adacel.com Mon Apr 21 18:13:38 2003 Received: with ECARTIS (v1.0.0; list fam); Mon, 21 Apr 2003 18:14:15 -0700 (PDT) Received: from adacel.com (gunsmoke.adacel.com.au [210.11.130.7]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h3M1DaFu015324 for ; Mon, 21 Apr 2003 18:13:37 -0700 Received: from nexus.adacel.com (Not Verified[10.32.240.1]) by adacel.com with MailMarshal (v5,0,3,91) id ; Tue, 22 Apr 2003 11:10:36 +1000 Received: (qmail 8050 invoked from network); 22 Apr 2003 01:13:09 -0000 Received: from unknown (HELO hera.wodonga.adacel.com.au) (192.168.75.251) by nexus.adacel.com with SMTP; 22 Apr 2003 01:13:08 -0000 Received: from selene.wodonga.adacel.com.au (selene.wodonga.adacel.com.au [192.168.75.55]) by hera.wodonga.adacel.com.au (8.11.6/8.11.6) with ESMTP id h3M1CsE21128 for ; Tue, 22 Apr 2003 11:12:54 +1000 Subject: testing FAM mailing list From: Michael Wardle To: fam@oss.sgi.com Content-Type: text/plain Organization: Adacel Technologies Message-Id: <1050973978.2402.18.camel@selene.wodonga.adacel.com.au> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 22 Apr 2003 11:12:58 +1000 Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-archive-position: 118 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: michael.wardle@adacel.com Precedence: bulk X-list: fam Some people have reported problems with the FAM mailing list. This is a test to determine whether I can post to it and whether it is distributed. -- Michael Wardle Adacel Technologies From Rolf.Sponsel@kstr.lth.se Mon Apr 28 18:19:07 2003 Received: with ECARTIS (v1.0.0; list fam); Mon, 28 Apr 2003 18:19:11 -0700 (PDT) Received: from mail.g.bonet.se (mail.g.bonet.se [212.181.52.4]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h3T1J5Fu013142 for ; Mon, 28 Apr 2003 18:19:06 -0700 Received: from kstr.lth.se (as1-5-3.bi.s.bonet.se [194.237.241.132]) by mail.g.bonet.se (8.12.8/8.12.8) with ESMTP id h3T1J3EL034698; Tue, 29 Apr 2003 03:19:03 +0200 (CEST) (envelope-from Rolf.Sponsel@kstr.lth.se) Message-ID: <3EADD30B.AC6A6042@kstr.lth.se> Date: Tue, 29 Apr 2003 03:19:07 +0200 From: Rolf Sponsel X-Mailer: Mozilla 4.79 [en] (WinNT; U) X-Accept-Language: en,sv,de,es MIME-Version: 1.0 To: fam@oss.sgi.com Subject: FAM-2.6.10, configure, error, MNTTYPE_NFS, Solaris 7 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-archive-position: 119 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: Rolf.Sponsel@kstr.lth.se Precedence: bulk X-list: fam * SPARC/Solaris 7 * gcc-3.2.2 * FAM-2.6.10 * Hello List Members, I'm new to this list but have checked the archives briefly to see whether there was already an answer for my problem when try- ing to configure FAM on SPARC/Solaris 7. This is my problem; After downloading, uncompressing, and un-taring, I cd:d into the FAM directory and typed './configure'. Unfortunately this fails, returning the following message: ... ... checking for stat.st_fstype string... yes checking for stat.st_ctim.tv_nsec (nanoseconds)... yes checking for mountlist struct... no checking for mountlist pointer... yes checking mntent.h for MNTTYPE_NFS... no configure: error: Didn't find MNTTYPE_NFS in mntent.h hostname(14)# I searched my system for the 'mntent.h' include file and found it in '/usr/includes/sys/mntent.h' and that file contains one line, among others, like this: ... #define MNTTYPE_NFS "nfs" /* NFS file system */ ... It is not obvious to me why 'configure' bails out here, at least not by complaining about not finding MNTTYPE_NFS. Any help with this would be very much appreciated. Kind Regards -- ---- ------ -------- Rolf Sponsel ___________________________________________e_n_d___o_f___m_e_s_s_a_g_e_ From michael.wardle@adacel.com Mon Apr 28 18:38:50 2003 Received: with ECARTIS (v1.0.0; list fam); Mon, 28 Apr 2003 18:38:54 -0700 (PDT) Received: from adacel.com (gunsmoke.adacel.com.au [210.11.130.7]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h3T1cmFu013295 for ; Mon, 28 Apr 2003 18:38:49 -0700 Received: from nexus.adacel.com (Not Verified[10.32.240.1]) by adacel.com with MailMarshal (v5,0,3,91) id ; Tue, 29 Apr 2003 11:36:18 +1000 Received: (qmail 27670 invoked from network); 29 Apr 2003 01:38:41 -0000 Received: from unknown (HELO hera.wodonga.adacel.com.au) (192.168.75.251) by nexus.adacel.com with SMTP; 29 Apr 2003 01:38:41 -0000 Received: from selene.wodonga.adacel.com.au (selene.wodonga.adacel.com.au [192.168.75.55]) by hera.wodonga.adacel.com.au (8.11.6/8.11.6) with ESMTP id h3T1d9E00904; Tue, 29 Apr 2003 11:39:09 +1000 Subject: Re: FAM-2.6.10, configure, error, MNTTYPE_NFS, Solaris 7 From: Michael Wardle To: Rolf Sponsel Cc: fam@oss.sgi.com In-Reply-To: <3EADD30B.AC6A6042@kstr.lth.se> References: <3EADD30B.AC6A6042@kstr.lth.se> Content-Type: text/plain Organization: Adacel Technologies Message-Id: <1051580343.2407.9.camel@selene.wodonga.adacel.com.au> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 29 Apr 2003 11:39:03 +1000 Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-archive-position: 120 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: michael.wardle@adacel.com Precedence: bulk X-list: fam On Tue, 2003-04-29 at 11:19, Rolf Sponsel wrote: > * SPARC/Solaris 7 * gcc-3.2.2 * FAM-2.6.10 * [...] > checking mntent.h for MNTTYPE_NFS... no > configure: error: Didn't find MNTTYPE_NFS in mntent.h > I searched my system for the 'mntent.h' include file > and found it in '/usr/includes/sys/mntent.h' The configure script was written mainly for IRIX with bits tacked on to make it build elsewhere when problems were noticed. I'm just starting to rewrite them so they test for features rather than platforms and so they use some of the useful autoconf macros that were recently introduced to replace some of the nastier parts. It seems mntent.h appears in /usr/include on IRIX and Linux, which of course is different from where you found it on your system. A quick workaround would be to create a symbolic link into /usr/include: # cd /usr/include; ln -s sys/mntent.h . You could also change any instances of "#include " in the FAM sources to "#include ". This directive seems to appear in: - configure.in - fam/FileSystem.c++ - fam/FileSystemTable.c++ - fam/NFSFileSystem.c++ After making these changes, you might also need to run "autoconf" before rerunning configure. I'll file a bug so I remember to make the new configure script look for mntent.h in the sys subdirectory as well. Thanks for letting me know -- Michael Wardle Adacel Technologies From Rolf.Sponsel@kstr.lth.se Tue Apr 29 06:21:34 2003 Received: with ECARTIS (v1.0.0; list fam); Tue, 29 Apr 2003 06:21:37 -0700 (PDT) Received: from mail.g.bonet.se (mail.g.bonet.se [212.181.52.4]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h3TDLWFu006472 for ; Tue, 29 Apr 2003 06:21:33 -0700 Received: from kstr.lth.se (as1-5-3.bi.s.bonet.se [194.237.241.132]) by mail.g.bonet.se (8.12.8/8.12.8) with ESMTP id h3TDLOxb082605; Tue, 29 Apr 2003 15:21:25 +0200 (CEST) (envelope-from Rolf.Sponsel@kstr.lth.se) Message-ID: <3EAE7C5B.4F28789E@kstr.lth.se> Date: Tue, 29 Apr 2003 15:21:31 +0200 From: Rolf Sponsel X-Mailer: Mozilla 4.79 [en] (WinNT; U) X-Accept-Language: en,sv,de,es MIME-Version: 1.0 To: Michael Wardle CC: fam@oss.sgi.com Subject: Re: FAM-2.6.10, configure, error, MNTTYPE_NFS, Solaris 7 References: <3EADD30B.AC6A6042@kstr.lth.se> <1051580343.2407.9.camel@selene.wodonga.adacel.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-archive-position: 122 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: Rolf.Sponsel@kstr.lth.se Precedence: bulk X-list: fam * SPARC/Solaris 7 * gcc-3.2.2 * FAM-2.6.10 * Hello Michael, Thank You for your prompt response. I chose the quick and easy way out, that you proposed, with the link. That way I won't need to redo any code modification for the comming releases (would it be that you by then hadn't had the chance to update the auto- configure scripts). Best regards / Rolf Sponsel Ps. I saw your Bugzilla Bug 244 report on this, and just want to confirm your assumtion on where 'mntent.h' resides on my Solaris 7 installation. You are correct; it is in '/usr/include/sys'. :-( Sorry for the confusion.) Ps2 I saw another question somewhere on the mailing list, if I recall correctly, about whether Solaris has support for '/dev/poll'. I can confirm that that device can be found, on at least Solaris 7, where it is a link pointing to: '/devices/pseudo/poll@0:poll' character special (113/0) Michael Wardle wrote: > > On Tue, 2003-04-29 at 11:19, Rolf Sponsel wrote: > > * SPARC/Solaris 7 * gcc-3.2.2 * FAM-2.6.10 * > > [...] > > > checking mntent.h for MNTTYPE_NFS... no > > configure: error: Didn't find MNTTYPE_NFS in mntent.h > > > I searched my system for the 'mntent.h' include file > > and found it in '/usr/includes/sys/mntent.h' > > The configure script was written mainly for IRIX with bits tacked on to > make it build elsewhere when problems were noticed. I'm just starting > to rewrite them so they test for features rather than platforms and so > they use some of the useful autoconf macros that were recently > introduced to replace some of the nastier parts. > > It seems mntent.h appears in /usr/include on IRIX and Linux, which of > course is different from where you found it on your system. > > A quick workaround would be to create a symbolic link into /usr/include: > # cd /usr/include; ln -s sys/mntent.h . > > You could also change any instances of "#include " in the FAM > sources to "#include ". This directive seems to appear > in: > - configure.in > - fam/FileSystem.c++ > - fam/FileSystemTable.c++ > - fam/NFSFileSystem.c++ > > After making these changes, you might also need to run "autoconf" before > rerunning configure. > > I'll file a bug so I remember to make the new configure script look for > mntent.h in the sys subdirectory as well. > > Thanks for letting me know > > -- > Michael Wardle > Adacel Technologies -- ---- ------ -------- Rolf Sponsel ___________________________________________e_n_d___o_f___m_e_s_s_a_g_e_ From Rolf.Sponsel@kstr.lth.se Tue Apr 29 06:21:11 2003 Received: with ECARTIS (v1.0.0; list fam); Tue, 29 Apr 2003 06:21:17 -0700 (PDT) Received: from mail.g.bonet.se (mail.g.bonet.se [212.181.52.4]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h3TDL8Fu006464 for ; Tue, 29 Apr 2003 06:21:10 -0700 Received: from kstr.lth.se (as1-5-3.bi.s.bonet.se [194.237.241.132]) by mail.g.bonet.se (8.12.8/8.12.8) with ESMTP id h3TDKtxb082551; Tue, 29 Apr 2003 15:21:00 +0200 (CEST) (envelope-from Rolf.Sponsel@kstr.lth.se) Message-ID: <3EAE7C3D.39E26E9B@kstr.lth.se> Date: Tue, 29 Apr 2003 15:21:01 +0200 From: Rolf Sponsel X-Mailer: Mozilla 4.79 [en] (WinNT; U) X-Accept-Language: en,sv,de,es MIME-Version: 1.0 To: Michael Wardle CC: fam@oss.sgi.com Subject: Re: FAM-2.6.10, configure, error, MNTTYPE_NFS, Solaris 7 References: <3EADD30B.AC6A6042@kstr.lth.se> <1051580343.2407.9.camel@selene.wodonga.adacel.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-archive-position: 121 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: Rolf.Sponsel@kstr.lth.se Precedence: bulk X-list: fam * SPARC/Solaris 7 * gcc-3.2.2 * FAM-2.6.10 * Hello Michael, Thank You for your prompt response. I chose the quick and easy way out, that you proposed, with the link. That way I won't need to redo any code modification for the comming releases (would it be that you by then hadn't had the chance to update the auto- configure scripts). Best regards / Rolf Sponsel Ps. I saw your Bugzilla Bug 244 report on this, and just want to confirm your assumtion on where 'mntent.h' resides on my Solaris 7 installation. You are correct; it is in '/usr/include/sys'. :-( Sorry for the confusion.) Ps2 I saw another question somewhere on the mailing list, if I recall correctly, about whether Solaris has support for '/dev/poll'. I can confirm that that device can be found, on at least Solaris 7, where it is a link pointing to: '/devices/pseudo/poll@0:poll' character special (113/0) Michael Wardle wrote: > > On Tue, 2003-04-29 at 11:19, Rolf Sponsel wrote: > > * SPARC/Solaris 7 * gcc-3.2.2 * FAM-2.6.10 * > > [...] > > > checking mntent.h for MNTTYPE_NFS... no > > configure: error: Didn't find MNTTYPE_NFS in mntent.h > > > I searched my system for the 'mntent.h' include file > > and found it in '/usr/includes/sys/mntent.h' > > The configure script was written mainly for IRIX with bits tacked on to > make it build elsewhere when problems were noticed. I'm just starting > to rewrite them so they test for features rather than platforms and so > they use some of the useful autoconf macros that were recently > introduced to replace some of the nastier parts. > > It seems mntent.h appears in /usr/include on IRIX and Linux, which of > course is different from where you found it on your system. > > A quick workaround would be to create a symbolic link into /usr/include: > # cd /usr/include; ln -s sys/mntent.h . > > You could also change any instances of "#include " in the FAM > sources to "#include ". This directive seems to appear > in: > - configure.in > - fam/FileSystem.c++ > - fam/FileSystemTable.c++ > - fam/NFSFileSystem.c++ > > After making these changes, you might also need to run "autoconf" before > rerunning configure. > > I'll file a bug so I remember to make the new configure script look for > mntent.h in the sys subdirectory as well. > > Thanks for letting me know > > -- > Michael Wardle > Adacel Technologies -- ---- ------ -------- Rolf Sponsel ___________________________________________e_n_d___o_f___m_e_s_s_a_g_e_ From Rolf.Sponsel@kstr.lth.se Tue Apr 29 08:59:29 2003 Received: with ECARTIS (v1.0.0; list fam); Tue, 29 Apr 2003 08:59:38 -0700 (PDT) Received: from mail.g.bonet.se (mail.g.bonet.se [212.181.52.4]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h3TFxQFu030686 for ; Tue, 29 Apr 2003 08:59:28 -0700 Received: from kstr.lth.se (as1-5-3.bi.s.bonet.se [194.237.241.132]) by mail.g.bonet.se (8.12.8/8.12.8) with ESMTP id h3TFxMxb092386; Tue, 29 Apr 2003 17:59:22 +0200 (CEST) (envelope-from Rolf.Sponsel@kstr.lth.se) Message-ID: <3EAEA15F.5286B4DE@kstr.lth.se> Date: Tue, 29 Apr 2003 17:59:27 +0200 From: Rolf Sponsel X-Mailer: Mozilla 4.79 [en] (WinNT; U) X-Accept-Language: en,sv,de,es MIME-Version: 1.0 To: fam@oss.sgi.com Subject: FAM-2.6.10, compile, error, libfam, Solaris 7 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-archive-position: 123 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: Rolf.Sponsel@kstr.lth.se Precedence: bulk X-list: fam * SPARC/Solaris 7 * gcc-3.2.2 * FAM-2.6.10 * Hello List Members, I've "patched" my file system with a link in '/usr/include', 'mntent.h' -> 'sys/mntent.h', necessary to make 'configure' succeed. Now I'm having problems compiling FAM on SPARC/Solaris 7. ok! - libsupport.a seems to compile fine !!! err - libfam seems to fail to compile ??? Below I've pasted the output from 'make'. If necessary, I can provide the output from 'configure' too, or an include file, upon request if that would be to any help. Any help with this would be very much appreciated, so I at least can build FAM and add FAM support to, whatever it was that made me slip into FAM ... aah right, gnome-vfs-2.2.3. Kind Regards -- ---- ------ -------- Rolf Sponsel ___________________________________________b_e_g___o_f___o_u_t_p_u_t___ host(18)# make make all-recursive make[1]: Entering directory `/tmp/fam-2.6.10' Making all in util make[2]: Entering directory `/tmp/fam-2.6.10/util' Making all in editconf make[3]: Entering directory `/tmp/fam-2.6.10/util/editconf' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/tmp/fam-2.6.10/util/editconf' make[3]: Entering directory `/tmp/fam-2.6.10/util' make[3]: Nothing to be done for `all-am'. make[3]: Leaving directory `/tmp/fam-2.6.10/util' make[2]: Leaving directory `/tmp/fam-2.6.10/util' Making all in include make[2]: Entering directory `/tmp/fam-2.6.10/include' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/tmp/fam-2.6.10/include' Making all in support make[2]: Entering directory `/tmp/fam-2.6.10/support' Makefile:338: no file name for `-include' g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -DCONFIG_ETC_CONFIG_PATH=\"/usr/local/etc/fam.conf\" -g -O2 -c -o dummy.o `test -f 'dummy.c++' || echo './'`dummy.c++ rm -f libsupport.a ar cru libsupport.a dummy.o ranlib libsupport.a make[2]: Leaving directory `/tmp/fam-2.6.10/support' Making all in libfam make[2]: Entering directory `/tmp/fam-2.6.10/libfam' /bin/ksh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -DCONFIG_ETC_CONFIG_PATH=\"/usr/local/etc/fam.conf\" -g -O2 -c -o Client.lo `test -f 'Client.c++' || echo './'`Client.c++ mkdir .libs g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include "-DCONFIG_ETC_CONFIG_PATH=\"/usr/local/etc/fam.conf\"" -g -O2 -c Client.c++ -fPIC -DPIC -o .libs/Client.lo In file included from /usr/local/include/c++/3.2.2/backward/iostream.h:31, from Client.c++:37: /usr/local/include/c++/3.2.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the header for C++ includes, or instead of the deprecated header . To disable this warning use -Wno-deprecated. In file included from Client.h:27, from Client.c++:40: ../include/BTree.h:241: warning: `typename BTree::Closure' is implicitly a typename ../include/BTree.h:241: warning: implicit typename is deprecated, please see the documentation for details ../include/BTree.h:353: warning: `typename BTree::Closure' is implicitly a typename ../include/BTree.h:353: warning: implicit typename is deprecated, please see the documentation for details ../include/BTree.h:409: warning: `typename BTree::Closure' is implicitly a typename ../include/BTree.h:409: warning: implicit typename is deprecated, please see the documentation for details ../include/BTree.h:504: warning: `typename BTree::Status' is implicitly a typename ../include/BTree.h:504: warning: implicit typename is deprecated, please see the documentation for details ../include/BTree.h:562: warning: `typename BTree::Closure' is implicitly a typename ../include/BTree.h:562: warning: implicit typename is deprecated, please see the documentation for details ../include/BTree.h:592: warning: `typename BTree::Status' is implicitly a typename ../include/BTree.h:592: warning: implicit typename is deprecated, please see the documentation for details Client.c++:42: type specifier omitted for parameter `u_int32_t' Client.c++:42: parse error before `*' token Client.c++: In constructor `Client::Client(long int, unsigned int, int)': Client.c++:118: `u_int32_t' undeclared (first use this function) Client.c++:118: (Each undeclared identifier is reported only once for each function it appears in.) Client.c++:122: parse error before `=' token Client.c++:123: `nmsglen' undeclared (first use this function) Client.c++:132: parse error before numeric constant Client.c++:133: non-lvalue in unary `&' Client.c++:134: request for member `sun_family' in `1', which is of non-aggregate type `int' Client.c++:138: request for member `sun_path' in `1', which is of non-aggregate type `int' Client.c++:150: parse error before `;' token Client.c++:151: `mlen' undeclared (first use this function) Client.c++:153: request for member `sun_path' in `1', which is of non-aggregate type `int' Client.c++:172: request for member `sun_path' in `1', which is of non-aggregate type `int' Client.c++:173: request for member `sun_path' in `1', which is of non-aggregate type `int' Client.c++:185: non-lvalue in unary `&' Client.c++: In member function `int Client::writeToServer(char*, int)': Client.c++:209: `msgHeader' undeclared (first use this function) Client.c++: In member function `int Client::nextEvent(FAMEvent*)': Client.c++:236: `u_int32_t' undeclared (first use this function) Client.c++:236: parse error before `;' token Client.c++:237: `msglen' undeclared (first use this function) Client.c++: In member function `void Client::checkBufferForEvent()': Client.c++:409: parse error before `=' token Client.c++: At global scope: Client.c++:438: type specifier omitted for parameter `u_int32_t' Client.c++:438: parse error before `*' token Client.c++: In function `void getword(...)': Client.c++:440: `l' undeclared (first use this function) Client.c++:440: `p' undeclared (first use this function) make[2]: *** [Client.lo] Error 1 make[2]: Leaving directory `/tmp/fam-2.6.10/libfam' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/fam-2.6.10' make: *** [all] Error 2 host(19)# ___________________________________________e_n_d___o_f___m_e_s_s_a_g_e_ From Rolf.Sponsel@kstr.lth.se Tue Apr 29 09:00:37 2003 Received: with ECARTIS (v1.0.0; list fam); Tue, 29 Apr 2003 09:00:41 -0700 (PDT) Received: from mail.g.bonet.se (mail.g.bonet.se [212.181.52.4]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h3TG0aFu030733 for ; Tue, 29 Apr 2003 09:00:37 -0700 Received: from kstr.lth.se (as1-5-3.bi.s.bonet.se [194.237.241.132]) by mail.g.bonet.se (8.12.8/8.12.8) with ESMTP id h3TG0Wxb093350 for ; Tue, 29 Apr 2003 18:00:32 +0200 (CEST) (envelope-from Rolf.Sponsel@kstr.lth.se) Message-ID: <3EAEA1A6.82BDF266@kstr.lth.se> Date: Tue, 29 Apr 2003 18:00:38 +0200 From: Rolf Sponsel X-Mailer: Mozilla 4.79 [en] (WinNT; U) X-Accept-Language: en,sv,de,es MIME-Version: 1.0 To: fam@oss.sgi.com Subject: FAM-2.6.10, Imon, NFS, Solaris 7 References: <3EADD30B.AC6A6042@kstr.lth.se> <1051580343.2407.9.camel@selene.wodonga.adacel.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-archive-position: 124 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: Rolf.Sponsel@kstr.lth.se Precedence: bulk X-list: fam * SPARC/Solaris 7 * gcc-3.2.2 * FAM-2.6.10 * Hello Michael / List, When 'configure' finishes; it displays: *************************************************************** * Note! Kernel support for imon was not detected. fam should * * still work, but it will have to poll monitored filesystems * * instead of receiving file operation events from the kernel. * * * * If you think your kernel has imon, see what this script is * * looking for (on Linux, probably /usr/include/linux/imon.h), * * fix the problem (perhaps by adding a link), and run this * * again. (You probably need to remove config.cahche first.) * * * * See http://oss.sgi.com/projects/fam/ for more information. * * * *************************************************************** Re: [SISE FAM] FAM on Solaris2.8 http://oss.sgi.com/projects/fam/mail_archive/200303/msg00003.html I also read the message above on the FAM Mailing List, and from that I draw the conclusion that "polling" is what FAM can provide me with on my system (at least for now). Is that correct? But, what about if my system NFS-mounted a file system from another host, running FAM+Imon, would FAM "notify" my local FAM-based application on alterations made to those remote files? Or does the 'configure' message: "Using imon support moduel IMonNone" imply "polling" mode only? Greatful for some clarification on this. Best regards! -- ---- ------ -------- Rolf Sponsel ___________________________________________e_n_d___o_f___m_e_s_s_a_g_e_ From michael.wardle@adacel.com Tue Apr 29 16:57:24 2003 Received: with ECARTIS (v1.0.0; list fam); Tue, 29 Apr 2003 16:57:29 -0700 (PDT) Received: from adacel.com (gunsmoke.adacel.com.au [210.11.130.7]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h3TNvMFu015954 for ; Tue, 29 Apr 2003 16:57:23 -0700 Received: from nexus.adacel.com (Not Verified[10.32.240.1]) by adacel.com with MailMarshal (v5,0,3,91) id ; Wed, 30 Apr 2003 09:54:46 +1000 Received: (qmail 5236 invoked from network); 29 Apr 2003 23:57:16 -0000 Received: from unknown (HELO hera.wodonga.adacel.com.au) (192.168.75.251) by nexus.adacel.com with SMTP; 29 Apr 2003 23:57:15 -0000 Received: from selene.wodonga.adacel.com.au (selene.wodonga.adacel.com.au [192.168.75.55]) by hera.wodonga.adacel.com.au (8.11.6/8.11.6) with ESMTP id h3TNvmE01646; Wed, 30 Apr 2003 09:57:48 +1000 Subject: Re: FAM-2.6.10, Imon, NFS, Solaris 7 From: Michael Wardle To: Rolf Sponsel Cc: fam@oss.sgi.com In-Reply-To: <3EAEA1A6.82BDF266@kstr.lth.se> References: <3EADD30B.AC6A6042@kstr.lth.se> <1051580343.2407.9.camel@selene.wodonga.adacel.com.au> <3EAEA1A6.82BDF266@kstr.lth.se> Content-Type: text/plain Organization: Adacel Technologies Message-Id: <1051660660.2379.12.camel@selene.wodonga.adacel.com.au> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 30 Apr 2003 09:57:40 +1000 Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-archive-position: 125 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: michael.wardle@adacel.com Precedence: bulk X-list: fam Hi Rolf LOCAL FILES If your system does not have a supported kernel monitor (currently only IMon from IRIX and DNotify from Linux are supported), FAM will use a polling mode, which causes FAM to check whether a file's attributes have changed using lstat() every few seconds. You are correct in saying that your output means you will get polling mode. Maybe one day somebody will see whether we could use Solaris's /dev/poll feature in FAM. REMOTE FILES When a file on an NFS filesystem is monitored, the local FAM daemon (famd) attempts to contact the FAM daemon on the NFS server to get updates. If the local famd can't communicate with the remote famd, it polls the file every few (six by default) seconds. The monitor FAM was configured and built for does not affect the way it handles monitoring of remote (NFS) files. I hope this clears things up for you. :-) -- Michael Wardle Adacel Technologies