Imported Debian patch 0.64-1
Willi Mann
11 years ago
12 | 12 | and writing to a string that had been c_str() in another - pretty |
13 | 13 | big coding mistakes if you ask me. Naughty boy etc. |
14 | 14 | |
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: | |
19 | 18 | |
20 | 19 | > There are two variables in squidview.conf which direct |
21 | 20 | > sorting operations. "bRepMySort" can be set to "yes" to use |
0 | 0 | >> 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 | |
1 | 5 | |
2 | 6 | v0.63: 17 December 2003: |
3 | 7 | - 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 | |
1 | 1 | www.rillion.net/squidview |
2 | 2 | |
3 | 3 | --Overview |
28 | 28 | /usr/local/squid/var/logs/access.log |
29 | 29 | If it isn't just symlink it appropriately from the following |
30 | 30 | 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. | |
32 | 32 | |
33 | 33 | graeme@localhost:~/.squidview$ ls -l |
34 | HOWTO -> /usr/local/share/doc/squidview/HOWTO | |
34 | HOWTO -> /usr/local/share/squidview/HOWTO | |
35 | 35 | log1 -> /usr/local/squid/var/logs/access.log |
36 | 36 | log2 -> log1 |
37 | 37 | log3 -> log1 |
39 | 39 | words |
40 | 40 | |
41 | 41 | 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. | |
44 | 45 | |
45 | 46 | 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. | |
47 | 49 | |
48 | 50 | "users" and "words" are reporting files - these can be symlinks |
49 | 51 | 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 | |
1 | 1 | www.rillion.net/squidview |
2 | 2 | |
3 | 3 | --Overview |
4 | 4 | |
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 | |
6 | 6 | file in a nice fashion, providing the log file is in squid's |
7 | 7 | native reporting fashion. It has features such as search, report |
8 | 8 | generation, monitor mode and supports three log files. |
12 | 12 | this program is not a proactive resource controller. What it can |
13 | 13 | do is tell you who and which sites are consuming the most bandwidth. |
14 | 14 | |
15 | First time users should read INSTALL and HOWTO. | |
16 | ||
15 | 17 | You will need the ncurses library. |
693 | 693 | |
694 | 694 | PACKAGE=squidview |
695 | 695 | |
696 | VERSION=0.63 | |
696 | VERSION=0.64 | |
697 | 697 | |
698 | 698 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then |
699 | 699 | { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } |
0 | 0 | AC_INIT(squidview.cpp) |
1 | 1 | AM_CONFIG_HEADER(config.h) |
2 | AM_INIT_AUTOMAKE(squidview,0.63) | |
2 | AM_INIT_AUTOMAKE(squidview,0.64) | |
3 | 3 | AC_PROG_CXX |
4 | 4 | AC_PROG_INSTALL |
5 | 5 |
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 | ||
0 | 8 | squidview (0.63-1) unstable; urgency=low |
1 | 9 | |
2 | 10 | * Initial Release. |
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 |
0 | 0 | Source: squidview |
1 | Section: unknown | |
1 | Section: admin | |
2 | 2 | Priority: optional |
3 | 3 | 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 | |
6 | 6 | |
7 | 7 | Package: squidview |
8 | 8 | Architecture: any |
9 | 9 | 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. |
0 | 0 | This package was debianized by Willi Mann <willi@wm1.at> on |
1 | 1 | Mon, 16 Feb 2004 17:36:34 +0100. |
2 | 2 | |
3 | It was downloaded from <fill in ftp site> | |
3 | It was downloaded from http://www.rillion.net/squidview/ | |
4 | 4 | |
5 | Upstream Author(s): <put author(s) name and email here> | |
5 | Upstream Author: Graeme Sheppard <graeme _at_ rillion.net> | |
6 | 6 | |
7 | 7 | Copyright: |
8 | 8 |
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 | #!/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 | ;; -*-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 | 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 | #! /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 | .\" 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 | <!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 | ?package(squidview):needs=X11|text|vc|wm section=Apps/see-menu-manual\ | |
1 | title="squidview" command="/usr/bin/squidview" |
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 | #! /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 | #! /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 | #! /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 |
80 | 80 | # dh_installmime |
81 | 81 | # dh_installinit |
82 | 82 | dh_installcron |
83 | dh_installman | |
83 | dh_installman debian/squidview.1 | |
84 | 84 | dh_installinfo |
85 | 85 | # dh_undocumented |
86 | 86 | dh_installchangelogs ChangeLog |
87 | 87 | dh_link |
88 | 88 | dh_strip |
89 | dh_compress | |
89 | dh_compress -XHOWTO | |
90 | 90 | dh_fixperms |
91 | 91 | # dh_makeshlibs |
92 | 92 | 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 | # 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 |
16 | 16 | |
17 | 17 | A program to nicely browse your squid log |
18 | 18 | |
19 | (c) 2001, 2002, 2003 Graeme Sheppard | |
19 | (c) 2001 - 2004 Graeme Sheppard | |
20 | 20 | |
21 | 21 | This program is not how it would be if I had to rewrite it from scratch. |
22 | 22 | It started off very simple (quick and nasty) and needed to be fast because |
48 | 48 | #include <string> |
49 | 49 | #include <vector> |
50 | 50 | #include <algorithm> |
51 | #include <iostream> | |
51 | 52 | |
52 | 53 | #include <curses.h> |
53 | 54 | #include <signal.h> |
160 | 161 | return sLog.st_size; |
161 | 162 | } |
162 | 163 | |
164 | void RunProgram(const string& sCommand, int iErase){ | |
165 | RunProgram(sCommand, iErase, 0); | |
166 | } | |
163 | 167 | |
164 | 168 | // 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 | { | |
172 | 185 | curs_set (1); |
173 | 186 | echo(); |
174 | 187 | nocbreak(); |
188 | ||
175 | 189 | if (wTemp) |
176 | 190 | delwin (wTemp); |
177 | system ("reset -Q"); | |
191 | if(iErase) | |
192 | endwin(); | |
178 | 193 | 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(); | |
181 | 202 | wTemp = newwin (1, 1, LINES - 1, COLS - 1); |
182 | 203 | keypad (stdscr, TRUE); |
183 | 204 | nonl(); |
212 | 233 | if (snprintf (szTemp, sizeof (szTemp), "%d", iNumber) < 0) |
213 | 234 | return "0"; |
214 | 235 | sReturn = szTemp; |
236 | ||
215 | 237 | return sReturn; |
216 | 238 | } |
217 | 239 | |
227 | 249 | return "0"; |
228 | 250 | |
229 | 251 | sReturn = szTemp; |
252 | ||
230 | 253 | iIndex = sReturn.length(); |
231 | 254 | if (iIndex == 0) |
232 | 255 | return sReturn; |
1491 | 1514 | } |
1492 | 1515 | |
1493 | 1516 | |
1494 | string PosToTime (tFilePos iCurrent) | |
1517 | // get the request's time out of it | |
1518 | string RequestToTime (const char* szRequest) | |
1495 | 1519 | { |
1496 | 1520 | string sTime; |
1497 | 1521 | time_t iTime; |
1499 | 1523 | if (iLogFileSize == 0) |
1500 | 1524 | return ""; |
1501 | 1525 | |
1502 | GetLine (iCurrent); | |
1503 | if (NullText (pcReqBuff)) | |
1526 | if (NullText (szRequest)) | |
1504 | 1527 | return ""; |
1505 | 1528 | |
1506 | iTime = GetTimeNumber (pcReqBuff); | |
1529 | iTime = GetTimeNumber (szRequest); | |
1507 | 1530 | CalcTime (iTime, sTime); |
1508 | 1531 | RemoveSeconds (sTime); |
1509 | 1532 | 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); | |
1510 | 1544 | } |
1511 | 1545 | |
1512 | 1546 | |
1523 | 1557 | if (iRepStart == 0) |
1524 | 1558 | sTemp1 = "begining of log"; |
1525 | 1559 | else |
1526 | sTemp1 = PosToTime (iRepStart); | |
1560 | sTemp1 = FilePosToTime (iRepStart); | |
1527 | 1561 | |
1528 | 1562 | if (iRepEnd == 0) |
1529 | 1563 | sTemp2 = "end of log"; |
1530 | 1564 | else |
1531 | sTemp2 = PosToTime (iRepEnd); | |
1565 | sTemp2 = FilePosToTime (iRepEnd); | |
1532 | 1566 | |
1533 | 1567 | switch (iRepWordHits) |
1534 | 1568 | { |
1972 | 2006 | EraseStatusLine(); |
1973 | 2007 | refresh(); |
1974 | 2008 | printf ("%s\r", sText.c_str()); |
1975 | ShowHighLightMessage (sStatusLine); | |
2009 | ShowHighLightMessage (sStatusLine); /// don't like this bit | |
1976 | 2010 | } |
1977 | 2011 | |
1978 | 2012 | if (fwrite (sText.c_str(), 1, sText.length(), fOutput) != sText.length()) |
2129 | 2163 | if (sRepTitle != "") |
2130 | 2164 | WriteReportLine (sRepTitle + "\n\n"); |
2131 | 2165 | |
2132 | sTemp = PosToTime (iCurrent); | |
2166 | sTemp = FilePosToTime (iCurrent); | |
2133 | 2167 | if (iRepEnd == 0) |
2134 | sTemp2 = PosToTime (iLastPage); | |
2168 | sTemp2 = FilePosToTime (iLastPage); | |
2135 | 2169 | else |
2136 | sTemp2 = PosToTime (iRepEnd); | |
2170 | sTemp2 = FilePosToTime (iRepEnd); | |
2137 | 2171 | |
2138 | 2172 | if (sTemp2 == sTemp) |
2139 | 2173 | WriteReportLine ("For " + sTemp + "\n\n"); |
2479 | 2513 | return; |
2480 | 2514 | } |
2481 | 2515 | 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)"; | |
2483 | 2519 | if (PromptForKey (sDispLine) == 'y') |
2484 | 2520 | { |
2485 | 2521 | sTemp = sViewer + " " +sPathToFiles + "/" + sRepFileName; |
3108 | 3144 | sTemp = "cd " + sPathToFiles + " ; " + |
3109 | 3145 | "echo -e \"Current reports:-\n\" ; " + |
3110 | 3146 | "ls -l *" + sReportExt; |
3111 | RunProgram (sTemp, 0); | |
3112 | iPause = 1; | |
3147 | RunProgram (sTemp, 1, 1); | |
3148 | iPause = 0; | |
3113 | 3149 | break; |
3114 | 3150 | |
3115 | 3151 | case 'd': |
4510 | 4546 | CalcPercentage (iLinePos, iLastLinePos, sTemp); |
4511 | 4547 | NoLeadingSpaces (sTemp); |
4512 | 4548 | con << "All Users' Tally Mode\n\nCurrent position is " |
4513 | << PosToTime (iRepStart) | |
4549 | << FilePosToTime (iRepStart) | |
4514 | 4550 | << " (" << sTemp << ")\n\nPress enter to begin from here.\n\n" |
4515 | 4551 | << "Note this might take a while."; |
4516 | 4552 | iKey = getch(); |
5247 | 5283 | void Help() |
5248 | 5284 | { |
5249 | 5285 | MyCls(); |
5250 | con << PACKAGE << " " << VERSION << ": (c) " << "2001-2003" | |
5286 | con << PACKAGE << " " << VERSION << ": (c) " << "2001-2004" | |
5251 | 5287 | << " Graeme Sheppard - GPL software\n" |
5252 | 5288 | << "www.rillion.net/squidview\n\n" << |
5253 | 5289 | "Keystrokes:-\n\n" |
16 | 16 | |
17 | 17 | A program to nicely browse your squid log |
18 | 18 | |
19 | (c) 2001, 2002, 2003 Graeme Sheppard | |
19 | (c) 2001 - 2004 Graeme Sheppard | |
20 | 20 | |
21 | 21 | */ |
22 | 22 | |
155 | 155 | bool bLookupIP = true; |
156 | 156 | bool bAliases = false; |
157 | 157 | int iRepFast = 10000; |
158 | bool bRepMySort = false; | |
158 | bool bRepMySort = true; | |
159 | 159 | |
160 | 160 | struct sRecordPointer |
161 | 161 | { |
316 | 316 | bool bAcceptDenies; |
317 | 317 | }; |
318 | 318 | |
319 | //Declaration of RunProgram to allow overloading. | |
320 | void RunProgram(const string&, int ); | |
321 | void RunProgram(const string&, int, int); | |
322 |