From owner-doc-jp@jp.freebsd.org  Thu Aug 29 20:17:11 1996
Received: by mail.jp.freebsd.org (8.7.3+2.6Wbeta5/8.7.3) id UAA03630
	Thu, 29 Aug 1996 20:17:11 +0900 (JST)
Received: by mail.jp.freebsd.org (8.7.3+2.6Wbeta5/8.7.3) with SMTP id UAA03625
	for <doc-jp@jp.freebsd.org>; Thu, 29 Aug 1996 20:16:48 +0900 (JST)
Received: from iwasaki.sirim.my ([161.142.131.209]) by relay3.jaring.my (8.6.13/8.6.12) with SMTP id TAA29635; Thu, 29 Aug 1996 19:15:51 +0800
Message-ID: <32257C96.73C1@pc.jaring.my>
Date: Thu, 29 Aug 1996 19:18:46 +0800
From: Mitsuru IWASAKI <iwasaki@pc.jaring.my>
Organization: AISDEL; SIRIM
X-Mailer: Mozilla 3.0b7 (Win95; I)
MIME-Version: 1.0
To: doc-jp@jp.freebsd.org, kimura@netlab.is.tsukuba.ac.jp
References: <199608290720.QAA23590@fairy.netlab.is.tsukuba.ac.jp> <32255AA6.1FBC@pc.jaring.my>
Content-Type: text/plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Reply-To: doc-jp@jp.freebsd.org
X-Distribute: distribute [version 2.1 (Alpha) patchlevel=19]
X-Sequence: doc-jp 668
Subject: [doc-jp 668] Re: printing.sgml [Aug-23-1996]
Errors-To: owner-doc-jp@jp.freebsd.org
Sender: owner-doc-jp@jp.freebsd.org

$B$$$o$5$-(J@$B$-$C$H:#Lk$O::FI%^%s(J $B$G$9!#(J

Mitsuru IWASAKI wrote:
> 
> $B$$$o$5$-(J@$B<YKb(J^H^H$B=uB@Ea(J $B$G$9!#(J
> $B$\$/$b!"(J7.6.5.1. Quick and Dirty Printer Accounting
> $B$N$H$3$m$r!"Ck5Y$_$H$+$N5Y$_;~4V$rMxMQ$7$F$6!<$C$H$d$C$D$1$A$c$$$^$7$?$s(J

$BDj;~8e$K$b!"$A$g$C$H;~4V$,$G$-$?$N$G(J
7.6.5. Accounting for Printer Usage $B$r$6$6!<$C$H$d$j$^$7$?!#(J
$B;29M$K$7$F$/$@$5$$!#(J
# $B$=$N$^$^;H$o$J$$$G$M!"CQ$:$+$7$$$+$i!#(J

$B$3$3$+$i$3$3$+$i$3$3$+$i$3$3$+$i$3$3$+$i$3$3$+$i$3$3$+$i$3$3$+$i(J

7.6.5. Accounting for Printer Usage

$B0u:~$K2]6b$9$Y$-$G$9!#$J$<$d$i$J$$$s$G$9$+(J? $BMQ;f$H(J
$B%$%s%/$K$O$*6b$,$+$+$j$^$9!#$=$7$FJ]<iHqMQ$b$"$j$^$9(J
--- $B%W%j%s%?$O(J moving parts $B$rEk:\$7$F$*$j!"8N>c$7$d$9$$(J
$B$N$G$9!#%W%j%s%?!"(J usage patterns $B$=$7$FJ]<iNA6b$rD4$Y(J
$B%Z!<%8C10L(J ($B$^$?$O(J foot $BC10L!"%a!<%H%kC10L!"$^$?$I$s$J(J
$BC10L$G$b(J) $B$N%3%9%H$r3d$j=P$7$^$7$?!#$5$F!"0u:~$N(J accounting
$B$r<B:]$K$I$N$h$&$K;O$a$^$9$+(J?

So, you need to charge for printouts. And why not? Paper
and ink cost money. And then there are maintenance
costs---printers are loaded with moving parts and tend to
break down. You have examined your printers, usage
patterns, and maintenance fees and have come up with a
per-page (or per-foot, per-meter, or per-whatever) cost.
Now, how do you actually start accounting for printouts?

$B$(!<$H!"0-$$CN$i$;$O(J LPD $B%9%W!<%j%s%0!&%7%9%F%`$O$3$N(J 
department $B$G$O$"$^$jLr$KN)$?$J$$$3$H$G$9!#(JAccounting $B$O(J
$B;HMQ$9$k%W%j%s%?$N<oN`!"0u:~$9$k%U%)!<%^%C%H$=$7$F%W%j%s%?(J
$B;HMQ$N2]6b$NMW5a$K6/$/0MB8$7$^$9!#(J

Well, the bad news is the LPD spooling system does not
provide much help in this department. Accounting is
highly dependent on the kind of printer in use, the
formats being printed, and your requirements in charging
for printer usage.

accounting $B$r<B;\$9$k$?$a!"%W%j%s%?$N%F%-%9%H!&%U%#%k%?(J 
(plain text $B%8%g%V$K2]6b$9$k$?$a(J) $B$r=$@5$7!"%Z!<%8$r%+%&%s%H(J
$B$^$?$O0u:~$5$l$?%Z!<%8$KBP$9$k%W%j%s%?$rLd$$9g$o$;$k(J
$BI,MW$,$"$j$^$9!#(Jaccounting $B$,$G$-$J$/$J$k$?$a!"4JC1$J(J
$B=PNO%U%#%k%?$r;HMQ$7$F:Q$^$7$F$7$^$&$3$H$O$G$-$^$;$s!#(J
Filters $B$N@a$r;2>H$7$F$/$@$5$$!#(J

To implement accounting, you have to modify a printer's
text filter (to charge for plain text jobs) and the
conversion filters (to charge for other file formats), to
count pages or query the printer for pages printed. You
cannot get away with using the simple output filter,
since it cannot do accounting. See section Filters .

$B0lHLE*$K!"(Jaccounting $B$r9T$&$K$O(J2$B$D$NJ}K!$,$"$j$^$9(J:
Generally, there are two ways to do accounting: 

     $BDj4|E*$J(J accounting $B$O4JC1$J$N$G62$i$/:G$b0lHLE*$J(J
     $BJ}K!$G$9!#C/$+$,0u:~$9$k$?$S$K!"%U%#%k%?$O(Jaccounting
     $B%U%!%$%k$K%f!<%6!"%[%9%H$=$7$F%Z!<%8?t$N%m%0$r<h$j$^$9!#(J
     $B7nKh!"H>G/Kh!"G/Kh$^$?$O9%$-$J(J time period $B$G!"?'!9$J(J
     $B%W%j%s%?$N(J accounting $B%U%!%$%k$r<}=8$7!"%f!<%6Kh$K(J
     $B0u:~%Z!<%8?t$r9g7W$7!";HMQ$N2]6b$r$7$^$9!#$=$7$FA4$F$N(J
     logging file $B$r@Z$j<N$F!"<!$N4|4V$K8~$1$F$^$C$5$i$J(J slate $B$G(J
     $B;O$a$^$9!#(J

     Periodic accounting is the more common way, possibly
     because it is easier. Whenever someone prints a job,
     the filter logs the user, host, and number of pages
     to an accounting file. Every month, semester, year,
     or whatever time period you prefer, you collect the
     accounting files for the various printers, tally up
     the pages printed by users, and charge for usage.
     Then you truncate all the logging files, starting
     with a clean slate for the next period. 

     Timely accounting $B$OFq$7$$$N$G62$i$/0lHLE*$G$O(J
     $B$"$j$^$;$s!#$3$NJ}K!$O%W%j%s%?$r;HMQ$9$k$H$9$0$K(J
     $B0u:~$9$k%f!<%6$K2]6b$9$k%U%#%k%?$r;H$$$^$9!#(J
     $B%G%#%9%/!&%/%)!<%?$N$h$&$K!"B(:B$K(J accounting $B$7$^$9!#(J
     $B%f!<%6$N(J account $B$,(J red $B$K$J$C$?>l9g!"$=$N%f!<%6$N(J
     $B0u:~$rKI;_$G$-!"%f!<%6$K!V(Jprint quotas$B!W$r%A%'%C%/$7$F(J
     $BD4@a$9$k<jCJ$rDs6!$9$k$+$b$7$l$^$;$s!#$7$+$7!"$3$N(J
     $BJ}K!$O%f!<%6$H(J quota $B$rDI@W$9$k$?$a$K4v$D$+$N(J 
     database code $B$rI,MW$H$7$^$9!#(J

     Timely accounting is less common, probably because
     it is more difficult. This method has the filters
     charge users for printouts as soon as they use the
     printers. Like disk quotas, the accounting is
     immediate. You can prevent users from printing when
     their account goes in the red, and might provide a
     way for users to check and adjust their ``print
     quotas.'' But this method requires some database
     code to track users and their quotas.

LPD $B%9%W!<%j%s%0(I%$B%7%9%F%`$ON>J}$NJ}K!$r4JC1$K%5%]!<%H$7$^$9(J:
$B%U%#%k%?$rDs6!$9$kI,MW$,$"$j(J($B$(!<$H!"$[$H$s$I$$$D$b(J)$B!"$^$?(J
accounting code $B$rDs6!$9$kI,MW$,$"$j$^$9!#$7$+$7!"NI$$LL$b(J
$B$"$j$^$9(J: accounting $BJ}K!$KBg$-$J=@Fp@-$,$"$j$^$9!#Nc$($P!"(J
$BDj4|E*$^$?$O(J timely accounting $B$N$I$A$i$r;HMQ$9$k$+$rA*Br$7$^$9!#(J
$B%m%0$r$H$k>pJs$rA*Br$7$^$9(J: $B%f!<%6L>!"%[%9%HL>!"%8%g%V!&%?%$%W!"(J
$B0u:~%Z!<%8?t!";HMQ$9$kMQ;f$N(J square footage$B!"0u:~$9$k$N$K(J
$B%8%g%V$K$I$l$/$i$$$+$+$k$+Ey!#$=$7$F$3$N>pJs$r3JG<$9$k$h$&$K(J
$B%U%#%k%?$r=$@5$7$F!"$=$N$h$&$K9T$$$^$9!#(J

The LPD spooling system supports both methods easily:
since you have to provide the filters (well, most of the
time), you also have to provide the accounting code. But
there is a bright side: you have enormous flexibility in
your accounting methods. For example, you choose whether
to use periodic or timely accounting. You choose what
information to log: user names, host names, job types,
pages printed, square footage of paper used, how long the
job took to print, and so forth. And you do so by
modifying the filters to save this information.

$B$3$3$^$G$3$3$^$G$3$3$^$G$3$3$^$G$3$3$^$G$3$3$^$G$3$3$^$G$3$3$^$G(J

$B$G$o!#(J
-- 
                               o
                         [=]   O
                        (.~.)_P
+==================oooO==( )//Oooo=================+
|Mitsuru Iwasaki                                   |
|15A-1-3, Scots Tower, MONT' KIARA CONDOMINIUM,    |
|Jalan 1/70C, Off Bikit Kiara, 50480 Kuala Lumpur  |
|TEL: 03-253-8579                    _/_/_/    _/  |
|FAX: 03-253-8579                   _/_/_/    _/   |
|e-mail: iwasaki@sirim.my(OFFICE)  _/  _/ _/ _/    |
|        iwasaki@pc.jaring.my(HOME)                |
|        JAA03673@niftyserve.or.jp(JAPAN)          |
+==================================================+
