[gamin] Does gamin really work?



Hi.
I'm quite new in using fam/gamin, so I hope I'm not doing something very
wrong. I just can't get gamin to notice any changes I do to the
monitored files. I have a program that sets up monitoring (using
FAMMonitorDirectory()) of some directories and then calls FAMPending to
check if anything has changed using the following loop (where fc is my
FAMConnection):

      FAMEvent fe;
      while(FAMPending(&fc)) {
        if (FAMNextEvent(&fc, &fe) < 0)
          {
            perror("FAMNextEvent");
            exit(1);
          }
        printf("%-24s %i\n", fe.filename, fe.code);
      }

As you can see in my attached logfiles (created using the directives on
Gamin homepage) I get the initial FAMExists and FAMEndExist events, but
after that it doesn't matter what I do (i e making new files, removing
files etc) in the monitored directories, I get no more events. Is this
me doing something very wrong or is it Gamin not working?

I use Gamin 0.0.24 (Fedora Rawhide rpm). The monitored directories is on
vfat partitions, but that shouldn't pose any problem, should it?

/Daniel Eriksson
[/usr/src/animenu-0.3.0.scroll$] export GAM_DEBUG=
[/usr/src/animenu-0.3.0.scroll$] export GAM_CLIENT_ID=test
[/usr/src/animenu-0.3.0.scroll$] ./animenu
FAMOpen()
Connected to socket /tmp/fam-daniel-test : 3
Wrote credential bytes to socket 3
FAMMonitorDirectory(/mnt/media/dc/downloaded)
Wrote 34 bytes to socket 3
gamin_send_request 1 for socket 3
FAMMonitorDirectory(/mnt/media/video/movies)
Wrote 33 bytes to socket 3
gamin_send_request 2 for socket 3
FAMPending(fd = 3)
Checking data available on 3
Client need auth 3
read credentials byte
Credentials: s_uid 500, c_uid 500, c_gid 500, c_pid 3662
Checking data available on 3
read 843 bytes from server
accepted event: seq 1, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : /mnt/media/dc/downloaded
/mnt/media/dc/downloaded 8
FAMPending(fd = 3)
accepted event: seq 1, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : Stargate SG1 - 8x09 - Sacrifices.avi
Stargate SG1 - 8x09 - Sacrifices.avi 8
FAMPending(fd = 3)
accepted event: seq 1, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : Stargate SG1 - 8x10 - Endgame.avi
Stargate SG1 - 8x10 - Endgame.avi 8
FAMPending(fd = 3)
accepted event: seq 1, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : Stargate SG1 - 8x08 - Covenant.avi
Stargate SG1 - 8x08 - Covenant.avi 8
FAMPending(fd = 3)
accepted event: seq 1, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : Star Trek Voyager - 5x16 - Dark Frontier Part 2.avi
Star Trek Voyager - 5x16 - Dark Frontier Part 2.avi 8
FAMPending(fd = 3)
accepted event: seq 1, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : Dymle
Dymle                    8
FAMPending(fd = 3)
accepted event: seq 1, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : Star Trek Voyager - 5x15 - Dark Frontier Part 1.avi
Star Trek Voyager - 5x15 - Dark Frontier Part 1.avi 8
FAMPending(fd = 3)
accepted event: seq 1, type 9
FAMNextEvent(fd = 3)
FAMNextEvent : EndExist : /mnt/media/dc/downloaded
/mnt/media/dc/downloaded 9
FAMPending(fd = 3)
accepted event: seq 2, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : /mnt/media/video/movies
/mnt/media/video/movies  8
FAMPending(fd = 3)
accepted event: seq 2, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : Mors Elling.avi
Mors Elling.avi          8
FAMPending(fd = 3)
accepted event: seq 2, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : Michael Moore - Fahrenheit 9-11.avi
Michael Moore - Fahrenheit 9-11.avi 8
FAMPending(fd = 3)
accepted event: seq 2, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : Tre Solar.avi
Tre Solar.avi            8
FAMPending(fd = 3)
accepted event: seq 2, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : Paradiset.avi
Paradiset.avi            8
FAMPending(fd = 3)
accepted event: seq 2, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : Bat Thumb.mpg
Bat Thumb.mpg            8
FAMPending(fd = 3)
accepted event: seq 2, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : Lord Of The Rings parody.avi
Lord Of The Rings parody.avi 8
FAMPending(fd = 3)
accepted event: seq 2, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : The Blair Thumb.mpg
The Blair Thumb.mpg      8
FAMPending(fd = 3)
accepted event: seq 2, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : Thumbtanic.avi
Thumbtanic.avi           8
FAMPending(fd = 3)
accepted event: seq 2, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : Thumbwars.mpg
Thumbwars.mpg            8
FAMPending(fd = 3)
accepted event: seq 2, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : Trolltyg i tomteskogen.mpg
Trolltyg i tomteskogen.mpg 8
FAMPending(fd = 3)
accepted event: seq 2, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : Ondskan cd 2.avi
Ondskan cd 2.avi         8
FAMPending(fd = 3)
accepted event: seq 2, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : Stargate CD1.avi
Stargate CD1.avi         8
FAMPending(fd = 3)
accepted event: seq 2, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : Stargate CD2.avi
Stargate CD2.avi         8
FAMPending(fd = 3)
accepted event: seq 2, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : Event Horizon.avi
Event Horizon.avi        8
FAMPending(fd = 3)
accepted event: seq 2, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : Ondskan cd 1.avi
Ondskan cd 1.avi         8
FAMPending(fd = 3)
accepted event: seq 2, type 8
FAMNextEvent(fd = 3)
FAMNextEvent : Exists : Kopps.avi
Kopps.avi                8
FAMPending(fd = 3)
accepted event: seq 2, type 9
FAMNextEvent(fd = 3)
FAMNextEvent : EndExist : /mnt/media/video/movies
/mnt/media/video/movies  9
FAMPending(fd = 3)
Checking data available on 3
FAMPending(fd = 3)
Checking data available on 3

[/usr/src/animenu-0.3.0.scroll$] export GAM_DEBUG=
[/usr/src/animenu-0.3.0.scroll$] gam_server --notimeout test
bash: gam_server: command not found
[/usr/src/animenu-0.3.0.scroll$] /usr/libexec/gam_server --notimeout test
Could not open /dev/inotify
Initialized Poll
dnotify initialized
Using DNotify as backend
Ready listening to socket /tmp/fam-daniel-test : 5
gam_incoming_conn_read called
accepted incoming connection: 6
Created connection 6
gam_client_conn_read called
read credentials byte
Credentials: s_uid 500, c_uid 500, c_gid 500, c_pid 3663
Created listener for 3663
Wrote 1 bytes to socket 6
gam_client_conn_read called
read 34 bytes from client
Request: from 3663, seq 1, type 2 options 0
Created subscription for /mnt/media/dc/downloaded
Setting subscription listener for /mnt/media/dc/downloaded
gam_dnotify_add_subscription
Poll: added subscription
gam_dnotify_consume_subscriptions()
gam_dnotify_add_subscription: done
gam_dnotify_consume_subscriptions_real()
1 new subscriptions.
node_add_subscription(/mnt/media/dc/downloaded)
  gam_exclude_check: true
Looking for existing files in: /mnt/media/dc/downloaded...
Event to 3663 : 1, 8, /mnt/media/dc/downloaded Exists
Wrote 34 bytes to socket 6
Unregistered node /mnt/media/dc/downloaded/Stargate SG1 - 8x09 - Sacrifices.avi
Event to 3663 : 1, 8, Stargate SG1 - 8x09 - Sacrifices.avi Exists
Wrote 46 bytes to socket 6
Unregistered node /mnt/media/dc/downloaded/Stargate SG1 - 8x10 - Endgame.avi
Event to 3663 : 1, 8, Stargate SG1 - 8x10 - Endgame.avi Exists
Wrote 43 bytes to socket 6
Unregistered node /mnt/media/dc/downloaded/Stargate SG1 - 8x08 - Covenant.avi
Event to 3663 : 1, 8, Stargate SG1 - 8x08 - Covenant.avi Exists
Wrote 44 bytes to socket 6
Unregistered node /mnt/media/dc/downloaded/Star Trek Voyager - 5x16 - Dark Frontier Part 2.avi
Event to 3663 : 1, 8, Star Trek Voyager - 5x16 - Dark Frontier Part 2.avi ExistsWrote 61 bytes to socket 6
Unregistered node /mnt/media/dc/downloaded/Dymle
Event to 3663 : 1, 8, Dymle Exists
Wrote 15 bytes to socket 6
Unregistered node /mnt/media/dc/downloaded/Star Trek Voyager - 5x15 - Dark Frontier Part 1.avi
Event to 3663 : 1, 8, Star Trek Voyager - 5x15 - Dark Frontier Part 1.avi ExistsWrote 61 bytes to socket 6
Event to 3663 : 1, 9, /mnt/media/dc/downloaded None
Wrote 34 bytes to socket 6
Done scanning /mnt/media/dc/downloaded
gam_client_conn_read called
read 33 bytes from client
Request: from 3663, seq 2, type 2 options 0
Created subscription for /mnt/media/video/movies
Setting subscription listener for /mnt/media/video/movies
gam_dnotify_add_subscription
Poll: added subscription
gam_dnotify_consume_subscriptions()
gam_dnotify_add_subscription: done
gam_dnotify_consume_subscriptions_real()
1 new subscriptions.
node_add_subscription(/mnt/media/video/movies)
  gam_exclude_check: true
Looking for existing files in: /mnt/media/video/movies...
Event to 3663 : 2, 8, /mnt/media/video/movies Exists
Wrote 33 bytes to socket 6
Unregistered node /mnt/media/video/movies/Mors Elling.avi
Event to 3663 : 2, 8, Mors Elling.avi Exists
Wrote 25 bytes to socket 6
Unregistered node /mnt/media/video/movies/Michael Moore - Fahrenheit 9-11.avi
Event to 3663 : 2, 8, Michael Moore - Fahrenheit 9-11.avi Exists
Wrote 45 bytes to socket 6
Unregistered node /mnt/media/video/movies/Tre Solar.avi
Event to 3663 : 2, 8, Tre Solar.avi Exists
Wrote 23 bytes to socket 6
Unregistered node /mnt/media/video/movies/Paradiset.avi
Event to 3663 : 2, 8, Paradiset.avi Exists
Wrote 23 bytes to socket 6
Unregistered node /mnt/media/video/movies/Bat Thumb.mpg
Event to 3663 : 2, 8, Bat Thumb.mpg Exists
Wrote 23 bytes to socket 6
Unregistered node /mnt/media/video/movies/Lord Of The Rings parody.avi
Event to 3663 : 2, 8, Lord Of The Rings parody.avi Exists
Wrote 38 bytes to socket 6
Unregistered node /mnt/media/video/movies/The Blair Thumb.mpg
Event to 3663 : 2, 8, The Blair Thumb.mpg Exists
Wrote 29 bytes to socket 6
Unregistered node /mnt/media/video/movies/Thumbtanic.avi
Event to 3663 : 2, 8, Thumbtanic.avi Exists
Wrote 24 bytes to socket 6
Unregistered node /mnt/media/video/movies/Thumbwars.mpg
Event to 3663 : 2, 8, Thumbwars.mpg Exists
Wrote 23 bytes to socket 6
Unregistered node /mnt/media/video/movies/Trolltyg i tomteskogen.mpg
Event to 3663 : 2, 8, Trolltyg i tomteskogen.mpg Exists
Wrote 36 bytes to socket 6
Unregistered node /mnt/media/video/movies/Ondskan cd 2.avi
Event to 3663 : 2, 8, Ondskan cd 2.avi Exists
Wrote 26 bytes to socket 6
Unregistered node /mnt/media/video/movies/Stargate CD1.avi
Event to 3663 : 2, 8, Stargate CD1.avi Exists
Wrote 26 bytes to socket 6
Unregistered node /mnt/media/video/movies/Stargate CD2.avi
Event to 3663 : 2, 8, Stargate CD2.avi Exists
Wrote 26 bytes to socket 6
Unregistered node /mnt/media/video/movies/Event Horizon.avi
Event to 3663 : 2, 8, Event Horizon.avi Exists
Wrote 27 bytes to socket 6
Unregistered node /mnt/media/video/movies/Ondskan cd 1.avi
Event to 3663 : 2, 8, Ondskan cd 1.avi Exists
Wrote 26 bytes to socket 6
Unregistered node /mnt/media/video/movies/Kopps.avi
Event to 3663 : 2, 8, Kopps.avi Exists
Wrote 19 bytes to socket 6
Event to 3663 : 2, 9, /mnt/media/video/movies None
Wrote 33 bytes to socket 6
Done scanning /mnt/media/video/movies
gam_client_conn_read called
end from client connection
Shutting down client socket 6
Freeing listener for 3663
gam_dnotify_remove_subscription
Cancelling subscription for /mnt/media/video/movies
Tree has 28 nodes
Removing directory sub: /mnt/media/video/movies
remove_directory_subscription /mnt/media/video/movies
node_remove_subscription(/mnt/media/video/movies)
  gam_exclude_check: true
prune_tree: node /mnt/media/video
Freeing subscription for /mnt/media/video/movies
Tree has 10 nodes
Poll: removed subscription
gam_dnotify_consume_subscriptions()
gam_dnotify_remove_subscription: done
gam_dnotify_remove_subscription
Cancelling subscription for /mnt/media/dc/downloaded
Tree has 10 nodes
Removing directory sub: /mnt/media/dc/downloaded
remove_directory_subscription /mnt/media/dc/downloaded
node_remove_subscription(/mnt/media/dc/downloaded)
  gam_exclude_check: true
prune_tree: node /mnt/media/dc
prune_tree: node /mnt/media
prune_tree: node /mnt
Freeing subscription for /mnt/media/dc/downloaded
Tree has 0 nodes
Poll: removed subscription
gam_dnotify_remove_subscription: done
Closing connection 6
gam_dnotify_consume_subscriptions_real()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]