Codebase list squidview / 0043ca2
Imported Debian patch 0.64-1 Willi Mann 11 years ago
31 changed file(s) with 158 addition(s) and 627 deletion(s). Raw diff Collapse all Expand all
1212 and writing to a string that had been c_str() in another - pretty
1313 big coding mistakes if you ask me. Naughty boy etc.
1414
15 So the sorting should be fine now (provided I haven't coded other
16 errors) so please use the STL sort (for faster results too) and let
17 me know if it breaks for you: set "bRepMySort" to "no" and as I
18 previously explained:
15 For stability reasons my routines are still used, however this
16 is not the fastest solution. You can get about a 20% speed boost
17 if you set "bRepMySort" to "no", as I previously explained:
1918
2019 > There are two variables in squidview.conf which direct
2120 > sorting operations. "bRepMySort" can be set to "yes" to use
00 >> Squidview history:
1
2 v0.64: 17 February 2004:
3 - reverted back to stable, slower sort as a bug still lurks
4 - minor documentation fixes
15
26 v0.63: 17 December 2003:
37 - fixes to allow compiling in some environments
0 squidview 0.6 (c) 2001 - 2003 Graeme Sheppard - GPL software
0 squidview 0.6 (c) 2001 - 2004 Graeme Sheppard - GPL software
11 www.rillion.net/squidview
22
33 --Overview
2828 /usr/local/squid/var/logs/access.log
2929 If it isn't just symlink it appropriately from the following
3030 default. This directory and links are made in the user's home
31 space when first run by the user.
31 space when squidview is first run by the user.
3232
3333 graeme@localhost:~/.squidview$ ls -l
34 HOWTO -> /usr/local/share/doc/squidview/HOWTO
34 HOWTO -> /usr/local/share/squidview/HOWTO
3535 log1 -> /usr/local/squid/var/logs/access.log
3636 log2 -> log1
3737 log3 -> log1
3939 words
4040
4141 In this case squidview expects the primary log to be "log1",
42 and the symlink redirects it to where the file actually is.
43 The same thing applies to the readme.
42 and the symlink redirects it to where the file actually is. Three
43 log locations are supported which gives you a bit of room for
44 accomodating rotating logs.
4445
4546 This tar.gz archive comes with an example access.log named
46 example.log. Symlink it to view it with squidview.
47 example.log. Symlink it to view it with squidview, or copy it to
48 your ~/.squidview directory. The same applies to the HOWTO.
4749
4850 "users" and "words" are reporting files - these can be symlinks
4951 to /etc if you would rather have these files there. "aliases" is
0 squidview 0.60 (c) 2001 - 2003 Graeme Sheppard - GPL software
0 squidview 0.60 (c) 2001 - 2004 Graeme Sheppard - GPL software
11 www.rillion.net/squidview
22
33 --Overview
44
5 Squidview is a program meant to display the squid proxy server log
5 Squidview is a program that displays the squid proxy server log
66 file in a nice fashion, providing the log file is in squid's
77 native reporting fashion. It has features such as search, report
88 generation, monitor mode and supports three log files.
1212 this program is not a proactive resource controller. What it can
1313 do is tell you who and which sites are consuming the most bandwidth.
1414
15 First time users should read INSTALL and HOWTO.
16
1517 You will need the ncurses library.
693693
694694 PACKAGE=squidview
695695
696 VERSION=0.63
696 VERSION=0.64
697697
698698 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
699699 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
00 AC_INIT(squidview.cpp)
11 AM_CONFIG_HEADER(config.h)
2 AM_INIT_AUTOMAKE(squidview,0.63)
2 AM_INIT_AUTOMAKE(squidview,0.64)
33 AC_PROG_CXX
44 AC_PROG_INSTALL
55
+0
-6
debian/README.Debian less more
0 squidview for Debian
1 --------------------
2
3 <possible notes regarding this package - if none, delete this file>
4
5 -- Willi Mann <willi@wm1.at>, Mon, 16 Feb 2004 17:36:34 +0100
0 squidview (0.64-1) unstable; urgency=low
1
2 * New upstream release.
3 * This release is intended to go into unstable. (Closes #233280)
4 * Fix some terminal corruption.
5
6 -- Willi Mann <willi@wm1.at> Wed, 18 Feb 2004 11:36:12 +0100
7
08 squidview (0.63-1) unstable; urgency=low
19
210 * Initial Release.
+0
-7
debian/conffiles.ex less more
0 #
1 # If you want to use this conffile, remove all comments and put files that
2 # you want dpkg to process here using their absolute pathnames.
3 # See the policy manual
4 #
5 # for example:
6 # /etc/squidview/squidview.conf
00 Source: squidview
1 Section: unknown
1 Section: admin
22 Priority: optional
33 Maintainer: Willi Mann <willi@wm1.at>
4 Build-Depends: debhelper (>> 3.0.0)
5 Standards-Version: 3.5.2
4 Build-Depends: debhelper (>> 3.0.0), libncurses5-dev, libstdc++5-3.3-dev
5 Standards-Version: 3.6.1.0
66
77 Package: squidview
88 Architecture: any
99 Depends: ${shlibs:Depends}
10 Description: <insert up to 60 chars description>
11 <insert long description, indented with spaces>
10 Description: monitors and analyzes your squid's - access.log
11 squidview is a ncurses-based application which allows you to view
12 and monitor your squid's access.log in a very comfortable way.
13 Additionally you can create reports and statistics.
00 This package was debianized by Willi Mann <willi@wm1.at> on
11 Mon, 16 Feb 2004 17:36:34 +0100.
22
3 It was downloaded from <fill in ftp site>
3 It was downloaded from http://www.rillion.net/squidview/
44
5 Upstream Author(s): <put author(s) name and email here>
5 Upstream Author: Graeme Sheppard <graeme _at_ rillion.net>
66
77 Copyright:
88
+0
-4
debian/cron.d.ex less more
0 #
1 # Regular cron jobs for the squidview package
2 #
3 0 4 * * * root squidview_maintenance
00 usr/bin
1 usr/sbin
+0
-45
debian/emacsen-install.ex less more
0 #! /bin/sh -e
1 # /usr/lib/emacsen-common/packages/install/squidview
2
3 # Written by Jim Van Zandt <jrv@vanzandt.mv.com>, borrowing heavily
4 # from the install scripts for gettext by Santiago Vila
5 # <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
6
7 FLAVOR=$1
8 PACKAGE=squidview
9
10 if [ ${FLAVOR} = emacs ]; then exit 0; fi
11
12 echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
13
14 #FLAVORTEST=`echo $FLAVOR | cut -c-6`
15 #if [ ${FLAVORTEST} = xemacs ] ; then
16 # SITEFLAG="-no-site-file"
17 #else
18 # SITEFLAG="--no-site-file"
19 #fi
20 FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
21
22 ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
23 ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
24
25 # Install-info-altdir does not actually exist.
26 # Maybe somebody will write it.
27 if test -x /usr/sbin/install-info-altdir; then
28 echo install/${PACKAGE}: install Info links for ${FLAVOR}
29 install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz
30 fi
31
32 install -m 755 -d ${ELCDIR}
33 cd ${ELDIR}
34 FILES=`echo *.el`
35 cp ${FILES} ${ELCDIR}
36 cd ${ELCDIR}
37
38 cat << EOF > path.el
39 (setq load-path (cons "." load-path) byte-compile-warnings nil)
40 EOF
41 ${FLAVOR} ${FLAGS} ${FILES}
42 rm -f *.el path.el
43
44 exit 0
+0
-15
debian/emacsen-remove.ex less more
0 #!/bin/sh -e
1 # /usr/lib/emacsen-common/packages/remove/squidview
2
3 FLAVOR=$1
4 PACKAGE=squidview
5
6 if [ ${FLAVOR} != emacs ]; then
7 if test -x /usr/sbin/install-info-altdir; then
8 echo remove/${PACKAGE}: removing Info links for ${FLAVOR}
9 install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/info/squidview.info.gz
10 fi
11
12 echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
13 rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
14 fi
+0
-18
debian/emacsen-startup.ex less more
0 ;; -*-emacs-lisp-*-
1 ;;
2 ;; Emacs startup file for the Debian GNU/Linux squidview package
3 ;;
4 ;; Originally contributed by Nils Naumann <naumann@unileoben.ac.at>
5 ;; Modified by Dirk Eddelbuettel <edd@debian.org>
6 ;; Adapted for dh-make by Jim Van Zandt <jrv@vanzandt.mv.com>
7
8 ;; The squidview package follows the Debian/GNU Linux 'emacsen' policy and
9 ;; byte-compiles its elisp files for each 'emacs flavor' (emacs19,
10 ;; xemacs19, emacs20, xemacs20...). The compiled code is then
11 ;; installed in a subdirectory of the respective site-lisp directory.
12 ;; We have to add this to the load-path:
13 (setq load-path (cons (concat "/usr/share/"
14 (symbol-name flavor)
15 "/site-lisp/squidview") load-path))
16
17
+0
-22
debian/ex.package.doc-base less more
0 Document: squidview
1 Title: Debian squidview Manual
2 Author: <insert document author here>
3 Abstract: This manual describes what squidview is
4 and how it can be used to
5 manage online manuals on Debian systems.
6 Section: unknown
7
8 Format: debiandoc-sgml
9 Files: /usr/share/doc/squidview/squidview.sgml.gz
10
11 Format: postscript
12 Files: /usr/share/doc/squidview/squidview.ps.gz
13
14 Format: text
15 Files: /usr/share/doc/squidview/squidview.text.gz
16
17 Format: HTML
18 Index: /usr/share/doc/squidview/html/index.html
19 Files: /usr/share/doc/squidview/html/*.html
20
21
+0
-70
debian/init.d.ex less more
0 #! /bin/sh
1 #
2 # skeleton example file to build /etc/init.d/ scripts.
3 # This file should be used to construct scripts for /etc/init.d.
4 #
5 # Written by Miquel van Smoorenburg <miquels@cistron.nl>.
6 # Modified for Debian GNU/Linux
7 # by Ian Murdock <imurdock@gnu.ai.mit.edu>.
8 #
9 # Version: @(#)skeleton 1.8 03-Mar-1998 miquels@cistron.nl
10 #
11 # This file was automatically customized by dh-make on Mon, 16 Feb 2004 17:36:34 +0100
12
13 PATH=/sbin:/bin:/usr/sbin:/usr/bin
14 DAEMON=/usr/sbin/squidview
15 NAME=squidview
16 DESC=squidview
17
18 test -f $DAEMON || exit 0
19
20 set -e
21
22 case "$1" in
23 start)
24 echo -n "Starting $DESC: "
25 start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
26 --exec $DAEMON
27 echo "$NAME."
28 ;;
29 stop)
30 echo -n "Stopping $DESC: "
31 start-stop-daemon --oknodo --stop --quiet --pidfile /var/run/$NAME.pid \
32 --exec $DAEMON
33 echo "$NAME."
34 ;;
35 #reload)
36 #
37 # If the daemon can reload its config files on the fly
38 # for example by sending it SIGHUP, do it here.
39 #
40 # If the daemon responds to changes in its config file
41 # directly anyway, make this a do-nothing entry.
42 #
43 # echo "Reloading $DESC configuration files."
44 # start-stop-daemon --stop --signal 1 --quiet --pidfile \
45 # /var/run/$NAME.pid --exec $DAEMON
46 #;;
47 restart|force-reload)
48 #
49 # If the "reload" option is implemented, move the "force-reload"
50 # option to the "reload" entry above. If not, "force-reload" is
51 # just the same as "restart".
52 #
53 echo -n "Restarting $DESC: "
54 start-stop-daemon --stop --quiet --pidfile \
55 /var/run/$NAME.pid --exec $DAEMON
56 sleep 1
57 start-stop-daemon --start --quiet --pidfile \
58 /var/run/$NAME.pid --exec $DAEMON
59 echo "$NAME."
60 ;;
61 *)
62 N=/etc/init.d/$NAME
63 # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
64 echo "Usage: $N {start|stop|restart|force-reload}" >&2
65 exit 1
66 ;;
67 esac
68
69 exit 0
+0
-60
debian/manpage.1.ex less more
0 .\" Hey, EMACS: -*- nroff -*-
1 .\" First parameter, NAME, should be all caps
2 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
3 .\" other parameters are allowed: see man(7), man(1)
4 .TH SQUIDVIEW SECTION "Feber 16, 2004"
5 .\" Please adjust this date whenever revising the manpage.
6 .\"
7 .\" Some roff macros, for reference:
8 .\" .nh disable hyphenation
9 .\" .hy enable hyphenation
10 .\" .ad l left justify
11 .\" .ad b justify to both left and right margins
12 .\" .nf disable filling
13 .\" .fi enable filling
14 .\" .br insert line break
15 .\" .sp <n> insert n+1 empty lines
16 .\" for manpage-specific macros, see man(7)
17 .SH NAME
18 squidview \- program to do something
19 .SH SYNOPSIS
20 .B squidview
21 .RI [ options ] " files" ...
22 .br
23 .B bar
24 .RI [ options ] " files" ...
25 .SH DESCRIPTION
26 This manual page documents briefly the
27 .B squidview
28 and
29 .B bar
30 commands.
31 This manual page was written for the Debian distribution
32 because the original program does not have a manual page.
33 Instead, it has documentation in the GNU Info format; see below.
34 .PP
35 .\" TeX users may be more comfortable with the \fB<whatever>\fP and
36 .\" \fI<whatever>\fP escape sequences to invode bold face and italics,
37 .\" respectively.
38 \fBsquidview\fP is a program that...
39 .SH OPTIONS
40 These programs follow the usual GNU command line syntax, with long
41 options starting with two dashes (`-').
42 A summary of options is included below.
43 For a complete description, see the Info files.
44 .TP
45 .B \-h, \-\-help
46 Show summary of options.
47 .TP
48 .B \-v, \-\-version
49 Show version of program.
50 .SH SEE ALSO
51 .BR bar (1),
52 .BR baz (1).
53 .br
54 The programs are documented fully by
55 .IR "The Rise and Fall of a Fooish Bar" ,
56 available via the Info system.
57 .SH AUTHOR
58 This manual page was written by Willi Mann <willi@wm1.at>,
59 for the Debian GNU/Linux system (but may be used by others).
+0
-152
debian/manpage.sgml.ex less more
0 <!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
1
2 <!-- Process this file with docbook-to-man to generate an nroff manual
3 page: `docbook-to-man manpage.sgml > manpage.1'. You may view
4 the manual page with: `docbook-to-man manpage.sgml | nroff -man |
5 less'. A typical entry in a Makefile or Makefile.am is:
6
7 manpage.1: manpage.sgml
8 docbook-to-man $< > $@
9
10
11 The docbook-to-man binary is found in the docbook-to-man package.
12 Please remember that if you create the nroff version in one of the
13 debian/rules file targets (such as build), you will need to include
14 docbook-to-man in your Build-Depends control field.
15
16 -->
17
18 <!-- Fill in your name for FIRSTNAME and SURNAME. -->
19 <!ENTITY dhfirstname "<firstname>FIRSTNAME</firstname>">
20 <!ENTITY dhsurname "<surname>SURNAME</surname>">
21 <!-- Please adjust the date whenever revising the manpage. -->
22 <!ENTITY dhdate "<date>Feber 16, 2004</date>">
23 <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
24 allowed: see man(7), man(1). -->
25 <!ENTITY dhsection "<manvolnum>SECTION</manvolnum>">
26 <!ENTITY dhemail "<email>willi@wm1.at</email>">
27 <!ENTITY dhusername "Willi Mann">
28 <!ENTITY dhucpackage "<refentrytitle>SQUIDVIEW</refentrytitle>">
29 <!ENTITY dhpackage "squidview">
30
31 <!ENTITY debian "<productname>Debian</productname>">
32 <!ENTITY gnu "<acronym>GNU</acronym>">
33 ]>
34
35 <refentry>
36 <refentryinfo>
37 <address>
38 &dhemail;
39 </address>
40 <author>
41 &dhfirstname;
42 &dhsurname;
43 </author>
44 <copyright>
45 <year>2001</year>
46 <holder>&dhusername;</holder>
47 </copyright>
48 &dhdate;
49 </refentryinfo>
50 <refmeta>
51 &dhucpackage;
52
53 &dhsection;
54 </refmeta>
55 <refnamediv>
56 <refname>&dhpackage;</refname>
57
58 <refpurpose>program to do something</refpurpose>
59 </refnamediv>
60 <refsynopsisdiv>
61 <cmdsynopsis>
62 <command>&dhpackage;</command>
63
64 <arg><option>-e <replaceable>this</replaceable></option></arg>
65
66 <arg><option>--example <replaceable>that</replaceable></option></arg>
67 </cmdsynopsis>
68 </refsynopsisdiv>
69 <refsect1>
70 <title>DESCRIPTION</title>
71
72 <para>This manual page documents briefly the
73 <command>&dhpackage;</command> and <command>bar</command>
74 commands.</para>
75
76 <para>This manual page was written for the &debian; distribution
77 because the original program does not have a manual page.
78 Instead, it has documentation in the &gnu;
79 <application>Info</application> format; see below.</para>
80
81 <para><command>&dhpackage;</command> is a program that...</para>
82
83 </refsect1>
84 <refsect1>
85 <title>OPTIONS</title>
86
87 <para>These programs follow the usual GNU command line syntax,
88 with long options starting with two dashes (`-'). A summary of
89 options is included below. For a complete description, see the
90 <application>Info</application> files.</para>
91
92 <variablelist>
93 <varlistentry>
94 <term><option>-h</option>
95 <option>--help</option>
96 </term>
97 <listitem>
98 <para>Show summary of options.</para>
99 </listitem>
100 </varlistentry>
101 <varlistentry>
102 <term><option>-v</option>
103 <option>--version</option>
104 </term>
105 <listitem>
106 <para>Show version of program.</para>
107 </listitem>
108 </varlistentry>
109 </variablelist>
110 </refsect1>
111 <refsect1>
112 <title>SEE ALSO</title>
113
114 <para>bar (1), baz (1).</para>
115
116 <para>The programs are documented fully by <citetitle>The Rise and
117 Fall of a Fooish Bar</citetitle> available via the
118 <application>Info</application> system.</para>
119 </refsect1>
120 <refsect1>
121 <title>AUTHOR</title>
122
123 <para>This manual page was written by &dhusername; &dhemail; for
124 the &debian; system (but may be used by others). Permission is
125 granted to copy, distribute and/or modify this document under
126 the terms of the <acronym>GNU</acronym> Free Documentation
127 License, Version 1.1 or any later version published by the Free
128 Software Foundation; with no Invariant Sections, no Front-Cover
129 Texts and no Back-Cover Texts.</para>
130
131 </refsect1>
132 </refentry>
133
134 <!-- Keep this comment at the end of the file
135 Local variables:
136 mode: sgml
137 sgml-omittag:t
138 sgml-shorttag:t
139 sgml-minimize-attributes:nil
140 sgml-always-quote-attributes:t
141 sgml-indent-step:2
142 sgml-indent-data:t
143 sgml-parent-document:nil
144 sgml-default-dtd-file:nil
145 sgml-exposed-tags:nil
146 sgml-local-catalogs:nil
147 sgml-local-ecat-files:nil
148 End:
149 -->
150
151
+0
-2
debian/menu.ex less more
0 ?package(squidview):needs=X11|text|vc|wm section=Apps/see-menu-manual\
1 title="squidview" command="/usr/bin/squidview"
+0
-48
debian/postinst.ex less more
0 #! /bin/sh
1 # postinst script for squidview
2 #
3 # see: dh_installdeb(1)
4
5 set -e
6
7 # summary of how this script can be called:
8 # * <postinst> `configure' <most-recently-configured-version>
9 # * <old-postinst> `abort-upgrade' <new version>
10 # * <conflictor's-postinst> `abort-remove' `in-favour' <package>
11 # <new-version>
12 # * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
13 # <failed-install-package> <version> `removing'
14 # <conflicting-package> <version>
15 # for details, see http://www.debian.org/doc/debian-policy/ or
16 # the debian-policy package
17 #
18 # quoting from the policy:
19 # Any necessary prompting should almost always be confined to the
20 # post-installation script, and should be protected with a conditional
21 # so that unnecessary prompting doesn't happen if a package's
22 # installation fails and the `postinst' is called with `abort-upgrade',
23 # `abort-remove' or `abort-deconfigure'.
24
25 case "$1" in
26 configure)
27
28 ;;
29
30 abort-upgrade|abort-remove|abort-deconfigure)
31
32 ;;
33
34 *)
35 echo "postinst called with unknown argument \`$1'" >&2
36 exit 1
37 ;;
38 esac
39
40 # dh_installdeb will replace this with shell code automatically
41 # generated by other debhelper scripts.
42
43 #DEBHELPER#
44
45 exit 0
46
47
+0
-38
debian/postrm.ex less more
0 #! /bin/sh
1 # postrm script for squidview
2 #
3 # see: dh_installdeb(1)
4
5 set -e
6
7 # summary of how this script can be called:
8 # * <postrm> `remove'
9 # * <postrm> `purge'
10 # * <old-postrm> `upgrade' <new-version>
11 # * <new-postrm> `failed-upgrade' <old-version>
12 # * <new-postrm> `abort-install'
13 # * <new-postrm> `abort-install' <old-version>
14 # * <new-postrm> `abort-upgrade' <old-version>
15 # * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
16 # for details, see http://www.debian.org/doc/debian-policy/ or
17 # the debian-policy package
18
19
20 case "$1" in
21 purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
22
23
24 ;;
25
26 *)
27 echo "postrm called with unknown argument \`$1'" >&2
28 exit 1
29
30 esac
31
32 # dh_installdeb will replace this with shell code automatically
33 # generated by other debhelper scripts.
34
35 #DEBHELPER#
36
37 exit 0
+0
-44
debian/preinst.ex less more
0 #! /bin/sh
1 # preinst script for squidview
2 #
3 # see: dh_installdeb(1)
4
5 set -e
6
7 # summary of how this script can be called:
8 # * <new-preinst> `install'
9 # * <new-preinst> `install' <old-version>
10 # * <new-preinst> `upgrade' <old-version>
11 # * <old-preinst> `abort-upgrade' <new-version>
12 #
13 # for details, see http://www.debian.org/doc/debian-policy/ or
14 # the debian-policy package
15
16
17 case "$1" in
18 install|upgrade)
19 # if [ "$1" = "upgrade" ]
20 # then
21 # start-stop-daemon --stop --quiet --oknodo \
22 # --pidfile /var/run/squidview.pid \
23 # --exec /usr/sbin/squidview 2>/dev/null || true
24 # fi
25 ;;
26
27 abort-upgrade)
28 ;;
29
30 *)
31 echo "preinst called with unknown argument \`$1'" >&2
32 exit 1
33 ;;
34 esac
35
36 # dh_installdeb will replace this with shell code automatically
37 # generated by other debhelper scripts.
38
39 #DEBHELPER#
40
41 exit 0
42
43
+0
-39
debian/prerm.ex less more
0 #! /bin/sh
1 # prerm script for squidview
2 #
3 # see: dh_installdeb(1)
4
5 set -e
6
7 # summary of how this script can be called:
8 # * <prerm> `remove'
9 # * <old-prerm> `upgrade' <new-version>
10 # * <new-prerm> `failed-upgrade' <old-version>
11 # * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
12 # * <deconfigured's-prerm> `deconfigure' `in-favour'
13 # <package-being-installed> <version> `removing'
14 # <conflicting-package> <version>
15 # for details, see http://www.debian.org/doc/debian-policy/ or
16 # the debian-policy package
17
18
19 case "$1" in
20 remove|upgrade|deconfigure)
21 # install-info --quiet --remove /usr/info/squidview.info.gz
22 ;;
23 failed-upgrade)
24 ;;
25 *)
26 echo "prerm called with unknown argument \`$1'" >&2
27 exit 1
28 ;;
29 esac
30
31 # dh_installdeb will replace this with shell code automatically
32 # generated by other debhelper scripts.
33
34 #DEBHELPER#
35
36 exit 0
37
38
8080 # dh_installmime
8181 # dh_installinit
8282 dh_installcron
83 dh_installman
83 dh_installman debian/squidview.1
8484 dh_installinfo
8585 # dh_undocumented
8686 dh_installchangelogs ChangeLog
8787 dh_link
8888 dh_strip
89 dh_compress
89 dh_compress -XHOWTO
9090 dh_fixperms
9191 # dh_makeshlibs
9292 dh_installdeb
0 .\" Hey, EMACS: -*- nroff -*-
1 .\" First parameter, NAME, should be all caps
2 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
3 .\" other parameters are allowed: see man(7), man(1)
4 .TH SQUIDVIEW 1 "Feber 18, 2004"
5 .\" Please adjust this date whenever revising the manpage.
6 .\"
7 .\" Some roff macros, for reference:
8 .\" .nh disable hyphenation
9 .\" .hy enable hyphenation
10 .\" .ad l left justify
11 .\" .ad b justify to both left and right margins
12 .\" .nf disable filling
13 .\" .fi enable filling
14 .\" .br insert line break
15 .\" .sp <n> insert n+1 empty lines
16 .\" for manpage-specific macros, see man(7)
17 .SH NAME
18 squidview \- program to monitor your squid's access.log
19 .SH SYNOPSIS
20 .B squidview
21 .\".RI [ options ] " files" ...
22 .SH DESCRIPTION
23 This manual page documents briefly the
24 .B squidview
25 application.
26 This manual page was written for the Debian distribution
27 because the original program does not have a manual page.
28 Instead, it has a brief online help (Press "h").
29 .PP
30 .B squidview
31 is a ncurses-based application which allows you to view
32 and monitor your squid's access.log in a very comfortable way.
33 Additionally you can create reports and statistics.
34 .SH NOTES
35 .PP
36 .B Squidview
37 is configured by the contents of the directory ~/.squidview/.
38 On first execution it creates the neccessary files. The Debian-version has been
39 modified to match the default log-path of Debian's
40 .B squid
41 package
42 /var/log/squid/access.log). If you have the permission to read this file
43 (ie be in group proxy), squidview should work out of the box. If not, file a bug
44 against this package (squidview, obviously :-)).
45 .SH OPTIONS
46 This program ignores any command-line parameters.
47 .SH AUTHOR
48 This manual page was written by Willi Mann <willi@wm1.at>,
49 for the Debian GNU/Linux system (but may be used by others).
+0
-5
debian/watch.ex less more
0 # Example watch control file for uscan
1 # Rename this file to "watch" and then you can run the "uscan" command
2 # to check for upstream updates and more.
3 # Site Directory Pattern Version Script
4 sunsite.unc.edu /pub/Linux/Incoming squidview-(.*)\.tar\.gz debian uupdate
1616
1717 A program to nicely browse your squid log
1818
19 (c) 2001, 2002, 2003 Graeme Sheppard
19 (c) 2001 - 2004 Graeme Sheppard
2020
2121 This program is not how it would be if I had to rewrite it from scratch.
2222 It started off very simple (quick and nasty) and needed to be fast because
4848 #include <string>
4949 #include <vector>
5050 #include <algorithm>
51 #include <iostream>
5152
5253 #include <curses.h>
5354 #include <signal.h>
160161 return sLog.st_size;
161162 }
162163
164 void RunProgram(const string& sCommand, int iErase){
165 RunProgram(sCommand, iErase, 0);
166 }
163167
164168 // execute a shell command
165 void RunProgram (const string& sCommand, int iErase)
166 {
167 if (iErase)
168 {
169 erase();
170 refresh();
171 }
169 void RunProgram (const string& sCommand, int iErase, int iWait)
170 //Debian - Notes: 1) "reset -Q" resets the size of my terminal (konsole).
171 //2) I don't believe "clear" is a proper way for this sort of
172 //terminal-cleaning.
173 //solution: use endwin() + refresh() + optionally (iWait) standard c++
174 //for waiting.
175 //This messes up the output in some rare cases with iErase == 0.
176 //Still readable, just not as intended. Additional note: In the
177 //original code first call of n,l didn't show anything
178 //reason not clear.
179 //Implementation of iWait was neccessary to keep the non-curses
180 //code in one function. Seems that any call to the curses library
181 //returns to curses mode, what would make it hard to keep the
182 //"Press any" key in the original place.
183
184 {
172185 curs_set (1);
173186 echo();
174187 nocbreak();
188
175189 if (wTemp)
176190 delwin (wTemp);
177 system ("reset -Q");
191 if(iErase)
192 endwin();
178193 system (sCommand.c_str());
179 if (iErase)
180 system ("clear");
194 cbreak();
195 if (iWait)
196 {
197 cout << "\nPress any key.";
198 cin.get();
199 }
200 if(iErase)
201 refresh();
181202 wTemp = newwin (1, 1, LINES - 1, COLS - 1);
182203 keypad (stdscr, TRUE);
183204 nonl();
212233 if (snprintf (szTemp, sizeof (szTemp), "%d", iNumber) < 0)
213234 return "0";
214235 sReturn = szTemp;
236
215237 return sReturn;
216238 }
217239
227249 return "0";
228250
229251 sReturn = szTemp;
252
230253 iIndex = sReturn.length();
231254 if (iIndex == 0)
232255 return sReturn;
14911514 }
14921515
14931516
1494 string PosToTime (tFilePos iCurrent)
1517 // get the request's time out of it
1518 string RequestToTime (const char* szRequest)
14951519 {
14961520 string sTime;
14971521 time_t iTime;
14991523 if (iLogFileSize == 0)
15001524 return "";
15011525
1502 GetLine (iCurrent);
1503 if (NullText (pcReqBuff))
1526 if (NullText (szRequest))
15041527 return "";
15051528
1506 iTime = GetTimeNumber (pcReqBuff);
1529 iTime = GetTimeNumber (szRequest);
15071530 CalcTime (iTime, sTime);
15081531 RemoveSeconds (sTime);
15091532 return sTime;
1533 }
1534
1535
1536 // get the time from an arbitary point in log file
1537 string FilePosToTime (tFilePos iCurrent)
1538 {
1539 if (iLogFileSize == 0)
1540 return "";
1541
1542 GetLine (iCurrent);
1543 return RequestToTime (pcReqBuff);
15101544 }
15111545
15121546
15231557 if (iRepStart == 0)
15241558 sTemp1 = "begining of log";
15251559 else
1526 sTemp1 = PosToTime (iRepStart);
1560 sTemp1 = FilePosToTime (iRepStart);
15271561
15281562 if (iRepEnd == 0)
15291563 sTemp2 = "end of log";
15301564 else
1531 sTemp2 = PosToTime (iRepEnd);
1565 sTemp2 = FilePosToTime (iRepEnd);
15321566
15331567 switch (iRepWordHits)
15341568 {
19722006 EraseStatusLine();
19732007 refresh();
19742008 printf ("%s\r", sText.c_str());
1975 ShowHighLightMessage (sStatusLine);
2009 ShowHighLightMessage (sStatusLine); /// don't like this bit
19762010 }
19772011
19782012 if (fwrite (sText.c_str(), 1, sText.length(), fOutput) != sText.length())
21292163 if (sRepTitle != "")
21302164 WriteReportLine (sRepTitle + "\n\n");
21312165
2132 sTemp = PosToTime (iCurrent);
2166 sTemp = FilePosToTime (iCurrent);
21332167 if (iRepEnd == 0)
2134 sTemp2 = PosToTime (iLastPage);
2168 sTemp2 = FilePosToTime (iLastPage);
21352169 else
2136 sTemp2 = PosToTime (iRepEnd);
2170 sTemp2 = FilePosToTime (iRepEnd);
21372171
21382172 if (sTemp2 == sTemp)
21392173 WriteReportLine ("For " + sTemp + "\n\n");
24792513 return;
24802514 }
24812515 sCurrentReport = sRepFileName;
2482 sDispLine = sRepFileName + " made: " + sTemp + "; View? ";
2516 //Debian - modification: add (y/n). I pressed v more than once
2517 //instead of y.
2518 sDispLine = sRepFileName + " made: " + sTemp + "; View? (y/n)";
24832519 if (PromptForKey (sDispLine) == 'y')
24842520 {
24852521 sTemp = sViewer + " " +sPathToFiles + "/" + sRepFileName;
31083144 sTemp = "cd " + sPathToFiles + " ; " +
31093145 "echo -e \"Current reports:-\n\" ; " +
31103146 "ls -l *" + sReportExt;
3111 RunProgram (sTemp, 0);
3112 iPause = 1;
3147 RunProgram (sTemp, 1, 1);
3148 iPause = 0;
31133149 break;
31143150
31153151 case 'd':
45104546 CalcPercentage (iLinePos, iLastLinePos, sTemp);
45114547 NoLeadingSpaces (sTemp);
45124548 con << "All Users' Tally Mode\n\nCurrent position is "
4513 << PosToTime (iRepStart)
4549 << FilePosToTime (iRepStart)
45144550 << " (" << sTemp << ")\n\nPress enter to begin from here.\n\n"
45154551 << "Note this might take a while.";
45164552 iKey = getch();
52475283 void Help()
52485284 {
52495285 MyCls();
5250 con << PACKAGE << " " << VERSION << ": (c) " << "2001-2003"
5286 con << PACKAGE << " " << VERSION << ": (c) " << "2001-2004"
52515287 << " Graeme Sheppard - GPL software\n"
52525288 << "www.rillion.net/squidview\n\n" <<
52535289 "Keystrokes:-\n\n"
1616
1717 A program to nicely browse your squid log
1818
19 (c) 2001, 2002, 2003 Graeme Sheppard
19 (c) 2001 - 2004 Graeme Sheppard
2020
2121 */
2222
155155 bool bLookupIP = true;
156156 bool bAliases = false;
157157 int iRepFast = 10000;
158 bool bRepMySort = false;
158 bool bRepMySort = true;
159159
160160 struct sRecordPointer
161161 {
316316 bool bAcceptDenies;
317317 };
318318
319 //Declaration of RunProgram to allow overloading.
320 void RunProgram(const string&, int );
321 void RunProgram(const string&, int, int);
322