[hobbit] files test fails to work

David Gore David.Gore at verizonbusiness.com
Thu May 18 21:11:24 CEST 2006



David Gore wrote:
> client-local.cfg:
>
>        file:/export/home/nmsbb/client/tmp/TEST
>
> hobbit-clients.cfg:
>
>        FILE %.*SNMP_COMMUNITY.public.nxg21:TEST.* yellow mtime>100
>
> type:100000 (file, symlink -> 
> /export/home/netx/Archive/nxg21/nxg21:TEST/mci-nornxdb06.SNMP_COMMUNITY.public.nxg21:TEST.2006May16.Z) 
>
> mode:600 (-rw-------)
> linkcount:1
> owner:108 (netx)
> group:10 (staff)
> size:1
> clock:1147953285 (2006/05/18-11:54:45)
> atime:1147937673 (2006/05/18-07:34:33)
> ctime:1147903202 (2006/05/17-22:00:02)
> mtime:1147745875 (2006/05/16-02:17:55)
>
>

Well, after thinking about this and watching the code, I thought, oh 
clearly my entry is wrong:

hobbit-clients.cfg: FILE %.*SNMP_COMMUNITY.public.nxg21:TEST.* yellow 
mtime>100

At first  I thought,  oh I forgot to encase the regex in double quotes, 
but then I could see this NOT being matched as I traced the code and 
thought clearly it should be:

hobbit-clients.cfg: FILE /export/home/nmsbb/client/tmp/TEST

But of course that is the link and not the actual file.  The file is:

/export/home/netx/Archive/nxg21/nxg21:TEST/mci-nornxdb06.SNMP_COMMUNITY.public.nxg21:TEST.2006May16.Z

This output is around line 1931 (off because of debugging lines).  I no 
longer have the energy to trace this further, but since it appears none 
of our mtime checks work, I can only guess because these tests fail 
because rwalk->rule.fcheck.minmtimedif = 0.  I am not sure any of the 
max or min mtime tests work, but I give up, for all I know it could be 
my fault.  I have certainly stared out it long enough to get  confused.

2006-05-18 18:52:46 Checking mtime MIN for file: 
/export/home/nmsbb/client/tmp/TEST
2006-05-18 18:52:46 FAILED mtime MIN for file: 
/export/home/nmsbb/client/tmp/TEST
2006-05-18 18:52:46     mtimedif [232491] < 
rwalk->rule.fcheck.minmtimedif [0]
2006-05-18 18:52:46 FAILED mtime MAX for file: 
/export/home/nmsbb/client/tmp/TEST

Do the mtime tests work for the target files of links?  Not that we can 
get it to work for a simple file.

Server is Fedora Core 5 running the latest snapshot.

>
> nmsbb@:/export/home/nmsbb> ls -al /export/home/nmsbb/client/tmp/TEST
> lrwxrwxrwx   1 nmsbb    nms          101 May 18 11:59 
> /export/home/nmsbb/client/tmp/TEST -> 
> /export/home/netx/Archive/nxg21/nxg21:TEST/mci-nornxdb06.SNMP_COMMUNITY.public.nxg21:TEST.2006May16.Z 
>
>
> nmsbb@:/export/home/nmsbb> ls -al 
> /export/home/netx/Archive/nxg21/nxg21:TEST/mci-nornxdb06.SNMP_COMMUNITY.public.nxg21:TEST.2006May16.Z 
>
> -rw-------   1 netx     staff       1866 May 16 02:17 
> /export/home/netx/Archive/nxg21/nxg21:TEST/mci-nornxdb06.SNMP_COMMUNITY.public.nxg21:TEST.2006May16.Z 
>
>
> nmsbb@:/export/home/nmsbb/client/tmp> cat logfetch.ndcnxg21.cfg
> file:/export/home/nmsbb/client/tmp/TEST
> log:/export/home/netx/Log/LOG.database:10240
>
> nmsbb@:/export/home/nmsbb/client/tmp> cat logfetch.ndcnxg21.status
> /export/home/netx/Log/LOG.database:185760:185760:185760:185760:185760:185760:185760 
>
>
>
> This fails to fire an alarm whether the mtime>100 or mtime<100.  I am 
> trying to get it to fire if a file has not updated within the last 100 
> seconds.  I have been faithfully compiling client and server installs 
> daily from the snapshots, but no luck yet.
>
> This also fails to work:
>
> client-local.cfg:
>
>        file:/home/nmsmgr/GNUstep/.GNUstepDefaults
>
> hobbit-clients.cfg:
>
>        FILE /home/nmsmgr/GNUstep/.GNUstepDefaults yellow size<1
>
> type:100000 (file)
> mode:600 (-rw-------)
> linkcount:1
> owner:3200 (nmsmgr)
> group:1026 (nmsadmin)
> size:0
> clock:1147958071 (2006/05/18-13:14:31)
> atime:1147958065 (2006/05/18-13:14:25)
> ctime:1147958065 (2006/05/18-13:14:25)
> mtime:1146073519 (2006/04/26-17:45:19)
>
>
> nmsbb at pdcalm105:/home/nmsbb> ls -al /home/nmsmgr/GNUstep/.GNUstepDefaults
> -rw-------   1 nmsmgr   nmsadmin     125 Apr 26 17:45 
> /home/nmsmgr/GNUstep/.GNUstepDefaults
>
> 'size' is not 0 as reported but 125 bytes, if it was 0 then it should 
> fire an alarm, which it doesn't:
>
>
> Since I am not sure how to debug this I am going to resort to the 
> desperate action of putting debug statements in the source code, and 
> hoping I am looking at the correct source file which I think is 
> client_config.c.
>
> ~David
>
>
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
>
>




More information about the Xymon mailing list