File: monitor

package info (click to toggle)
libsys-gamin-perl 0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, jessie, jessie-kfreebsd, stretch
  • size: 128 kB
  • ctags: 7
  • sloc: perl: 100; makefile: 4
file content (62 lines) | stat: -rwxr-xr-x 1,513 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/env perl
use Sys::Gamin;
use autouse Pod::Usage => qw(pod2usage);
pod2usage(VERBOSE => 1) unless @ARGV;

my $fm=new Sys::Gamin;
foreach (@ARGV) {
  $fm->monitor($_);
}
my $ev;

format STDOUT_TOP=
TYPE        MONITOR                          FILE
-----------------------------------------------------------------------------
.
format=
@<<<<<<<<<<<@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$ev->type,  $fm->which($ev),           $ev->filename
.

while (1) {
  do {
    $ev=$fm->next_event;
    write;
  } while $fm->pending;
  print <<EOL;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EOL
}

__END__

=head1 NAME

B<monitor> - monitor filesystem activity with FAM

=head1 SYNOPSIS

F<monitor> I<directory> | I<file> ...

=head1 DESCRIPTION

Provides a running tally of FAM events affecting the specified files or
directories. Blocks separated by dotted lines indicate contiguous chunks of events in
the event queue. Should be self-explanatory.

Hit interrupt to stop the monitoring.

=head1 SEE ALSO

See L<SGI::FAM(3)> for the workings.

=head1 AUTHORS

J. Glick B<jglick@sig.bsh.com>.

=head1 REVISION

X<$Format: "F<$Source$> last modified $Date$ release $ProjectRelease$. $Copyright$"$>
F<monitor> last modified Thu, 25 Sep 1997 22:56:42 -0400 release 1.002. Copyright (c) 1997 Strategic Interactive Group. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

=cut