pkgincludedir = $(includedir)/fprobe-ulog
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = /bin/install -c
+INSTALL = /usr/bin/install -c
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /home/sapan/fprobe-ulog-1.1/missing --run aclocal-1.9
+ACLOCAL = ${SHELL} /home/sapan/Projects/planetlab/fprobe/fprobe-ulog/missing --run aclocal-1.9
AMDEP_FALSE = #
AMDEP_TRUE =
-AMTAR = ${SHELL} /home/sapan/fprobe-ulog-1.1/missing --run tar
-AUTOCONF = ${SHELL} /home/sapan/fprobe-ulog-1.1/missing --run autoconf
-AUTOHEADER = ${SHELL} /home/sapan/fprobe-ulog-1.1/missing --run autoheader
-AUTOMAKE = ${SHELL} /home/sapan/fprobe-ulog-1.1/missing --run automake-1.9
+AMTAR = ${SHELL} /home/sapan/Projects/planetlab/fprobe/fprobe-ulog/missing --run tar
+AUTOCONF = ${SHELL} /home/sapan/Projects/planetlab/fprobe/fprobe-ulog/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/sapan/Projects/planetlab/fprobe/fprobe-ulog/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/sapan/Projects/planetlab/fprobe/fprobe-ulog/missing --run automake-1.9
AWK = gawk
CC = gcc
CCDEPMODE = depmode=none
CPP = gcc -E
CPPFLAGS =
CYGPATH_W = echo
-DATE = 2007-10-26
+DATE = 2007-11-08
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
ECHO_C =
LIBOBJS =
LIBS = -lpthread
LTLIBOBJS =
-MAKEINFO = ${SHELL} /home/sapan/fprobe-ulog-1.1/missing --run makeinfo
+MAKEINFO = ${SHELL} /home/sapan/Projects/planetlab/fprobe/fprobe-ulog/missing --run makeinfo
OBJEXT = o
PACKAGE = fprobe-ulog
PACKAGE_BUGREPORT =
host_vendor = pc
includedir = ${prefix}/include
infodir = ${prefix}/info
-install_sh = /home/sapan/fprobe-ulog-1.1/install-sh
+install_sh = /home/sapan/Projects/planetlab/fprobe/fprobe-ulog/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localstatedir = ${prefix}/var
Uflag,
uflag,
vflag,
+ Wflag,
Xflag,
};
"-y <remote:port>\tAddress of the NetFlow collector\n"
"-f <writable file>\tFile to write data into\n"
"-T <n>\tRotate log file every n epochs\n"
- "-E <[1..60]>\tSize of an epoch in minutes\n",
+ "-W <n>\tSet current epoch to n. Useful when restarting fprobe\n"
+ "-E <[1..60]>\tSize of an epoch in minutes\n"
+ ,
VERSION, BULK_QUANTITY_MAX, bulk_quantity, sched_min, sched_max);
exit(0);
}
dst->flags = src->flags;
}
+void update_cur_epoch_file(int n) {
+ int fd, len;
+ char snum[7];
+ len=snprintf(snum,6,"%d",n);
+ fd = open("/tmp/fprobe_last_epoch",O_WRONLY|O_CREAT);
+ if (fd == -1) {
+ my_log(LOG_ERR, "open() failed: /tmp/fprobe_last_epoch");
+ return;
+ }
+ write(fd, snum, len);
+ close(fd);
+}
+
unsigned get_log_fd(char *fname, unsigned cur_fd) {
struct Time now;
unsigned cur_uptime;
close(cur_fd);
snprintf(nextname,MAX_PATH_LEN,"%s.%d",fname,cur_epoch);
if ((write_fd = open(nextname, O_WRONLY|O_CREAT)) < 0) {
- fprintf(stderr, "open(): %s (%s)\n", nextname, strerror(errno));
+ my_log(LOG_ERR, "open(): %s (%s)\n", nextname, strerror(errno));
exit(1);
}
+ update_cur_epoch_file(cur_epoch);
ret_fd = write_fd;
}
else
peers[i].write_fd = get_log_fd(peers[i].fname, peers[i].write_fd);
ret = write(peers[0].write_fd, emit_packet, size);
if (ret < size) {
+
#if ((DEBUG) & DEBUG_E) || defined MESSAGES
my_log(LOG_ERR, "write(to #%d, seq %d, flows %d, size %d) == %d: %s",
i + 1, peers[i].seq, emit_count, size, ret, strerror(errno));
}
if (parms[Uflag].count) ulog_gmask = atoi(parms[Uflag].arg);
+ if (parms[Wflag].count) cur_epoch = atoi(parms[Wflag].arg);
if (parms[Tflag].count) log_epochs = atoi(parms[Tflag].arg);
if (parms[Eflag].count) epoch_length = atoi(parms[Eflag].arg);
if (parms[sflag].count) scan_interval = atoi(parms[sflag].arg);
pkgincludedir = $(includedir)/fprobe-ulog
top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = /bin/install -c
+INSTALL = /usr/bin/install -c
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /home/sapan/fprobe-ulog-1.1/missing --run aclocal-1.9
+ACLOCAL = ${SHELL} /home/sapan/Projects/planetlab/fprobe/fprobe-ulog/missing --run aclocal-1.9
AMDEP_FALSE = #
AMDEP_TRUE =
-AMTAR = ${SHELL} /home/sapan/fprobe-ulog-1.1/missing --run tar
-AUTOCONF = ${SHELL} /home/sapan/fprobe-ulog-1.1/missing --run autoconf
-AUTOHEADER = ${SHELL} /home/sapan/fprobe-ulog-1.1/missing --run autoheader
-AUTOMAKE = ${SHELL} /home/sapan/fprobe-ulog-1.1/missing --run automake-1.9
+AMTAR = ${SHELL} /home/sapan/Projects/planetlab/fprobe/fprobe-ulog/missing --run tar
+AUTOCONF = ${SHELL} /home/sapan/Projects/planetlab/fprobe/fprobe-ulog/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/sapan/Projects/planetlab/fprobe/fprobe-ulog/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/sapan/Projects/planetlab/fprobe/fprobe-ulog/missing --run automake-1.9
AWK = gawk
CC = gcc
CCDEPMODE = depmode=none
CPP = gcc -E
CPPFLAGS =
CYGPATH_W = echo
-DATE = 2007-10-26
+DATE = 2007-11-08
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
ECHO_C =
LIBOBJS =
LIBS = -lpthread
LTLIBOBJS =
-MAKEINFO = ${SHELL} /home/sapan/fprobe-ulog-1.1/missing --run makeinfo
+MAKEINFO = ${SHELL} /home/sapan/Projects/planetlab/fprobe/fprobe-ulog/missing --run makeinfo
OBJEXT = o
PACKAGE = fprobe-ulog
PACKAGE_BUGREPORT =
host_vendor = pc
includedir = ${prefix}/include
infodir = ${prefix}/info
-install_sh = /home/sapan/fprobe-ulog-1.1/install-sh
+install_sh = /home/sapan/Projects/planetlab/fprobe/fprobe-ulog/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localstatedir = ${prefix}/var