<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://dev1galaxy.org/extern.php?action=feed&amp;tid=3328&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / CUPS accounting [Solved]]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=3328</link>
		<description><![CDATA[The most recent posts in CUPS accounting [Solved].]]></description>
		<lastBuildDate>Fri, 20 Mar 2020 20:17:58 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: CUPS accounting [Solved]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=20629#p20629</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>chris2be8 wrote:</cite><blockquote><div><p>... running awk against them and get 3 both times<br />... can&#039;t see what&#039;s going wrong for you.</p></div></blockquote></div><p>Hmm ...<br />I copied and pasted the output from the terminal so I cannot see what happened either.</p><p>But you are quite correct:<br />Running that <span class="bbc">awk</span> stanza on <em>this</em> specific /var/log/cups/page_log configuration will tally the printed pages correctly.<br />I summed them up by hand and it checked out.&#160; =-)</p><p>Turns out that the OEM cartdrige that came with the printer ended up being good for just 362 pages:</p><div class="codebox"><pre><code>groucho@devuan:~/Desktop/awkcups$ awk &#039;/groucho/{pages += $7} END {print pages}&#039; /var/log/cups/page_log
362
groucho@devuan:~/Desktop/awkcups$ </code></pre></div><p>I now have to see how to go about trimming the page_log output, no need for <em>all</em> that data.</p><p>Thank you (all) very much for your help with this.</p><p>Cheers,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Fri, 20 Mar 2020 20:17:58 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=20629#p20629</guid>
		</item>
		<item>
			<title><![CDATA[Re: CUPS accounting [Solved]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=20618#p20618</link>
			<description><![CDATA[<p>I&#039;ve just tried copying the two sample logs you gave above and running awk against them and get 3 both times:</p><div class="codebox"><pre><code>chris@rigel:~/ecm-3031$ cat cupslog1 
Samsung_M2020_Series groucho 3 [27/Nov/2018:16:41:51 -0300] 1 1 - localhost
Samsung_M2020_Series groucho 3 [27/Nov/2018:16:42:00 -0300] 2 1 - localhost
Samsung_M2020_Series groucho 4 [05/Dec/2018:08:29:39 -0300] 1 1 - localhost
chris@rigel:~/ecm-3031$ awk &#039;/groucho/{pages += $7} END {print pages}&#039; cupslog1 
3
chris@rigel:~/ecm-3031$ cat cupslog2 
Samsung_M2020_Series groucho 13 [27/Nov/2018:16:41:51 -0300] 1 1 - localhost
Samsung_M2020_Series groucho 13 [27/Nov/2018:16:42:00 -0300] 2 1 - localhost
Samsung_M2020_Series groucho 14 [05/Dec/2018:08:29:39 -0300] 1 1 - localhost
chris@rigel:~/ecm-3031$ awk &#039;/groucho/{pages += $7} END {print pages}&#039; cupslog2 
3</code></pre></div><p>So I can&#039;t see what&#039;s going wrong for you.</p><p>Chris</p>]]></description>
			<author><![CDATA[dummy@example.com (chris2be8)]]></author>
			<pubDate>Fri, 20 Mar 2020 18:22:21 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=20618#p20618</guid>
		</item>
		<item>
			<title><![CDATA[Re: CUPS accounting [Solved]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=20590#p20590</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>chris2be8 wrote:</cite><blockquote><div><p>awk counts words separated by spaces. So as long as the number of pages printed is just a string of digits ...</p></div></blockquote></div><p>Yes, but ...</p><div class="codebox"><pre><code>Samsung_M2020_Series groucho 3 [27/Nov/2018:16:41:51 -0300] 1 1 - localhost
Samsung_M2020_Series groucho 3 [27/Nov/2018:16:42:00 -0300] 2 1 - localhost
Samsung_M2020_Series groucho 4 [05/Dec/2018:08:29:39 -0300] 1 1 - localhost
                             | &lt;- print job  page number -&gt; | | &lt;- pages printed</code></pre></div><p>In the example above, we see two print jobs: print job 3 which outputs 1 copy of page 1 and 1 copy of page 2 and print job 4, which outputs 1 copy of page 1.<br />The awk stanza in my previous post will correctly tally the amount of pages printed, ie: 3 pages.</p><div class="codebox"><pre><code>groucho@devuan:~/Desktop/awkcups$ awk &#039;/groucho/{pages += $7} END {print pages}&#039; /home/groucho/Desktop/awkcups/plog1
3
groucho@devuan:~/Desktop/awkcups$ </code></pre></div><p>Now, in a different scenario, where we have two digit print jobs with the rest being the same ...</p><div class="codebox"><pre><code>Samsung_M2020_Series groucho 13 [27/Nov/2018:16:41:51 -0300] 1 1 - localhost
Samsung_M2020_Series groucho 13 [27/Nov/2018:16:42:00 -0300] 2 1 - localhost
Samsung_M2020_Series groucho 14 [05/Dec/2018:08:29:39 -0300] 1 1 - localhost</code></pre></div><p>... the awk stanza previously applied gives an incorrect output, ie: 5 pages&#160; </p><div class="codebox"><pre><code>groucho@devuan:~/Desktop/awkcups$ awk &#039;/groucho/{pages += $7} END {print pages}&#039; /home/groucho/Desktop/awkcups/pg1log
5
groucho@devuan:~/Desktop/awkcups$ </code></pre></div><p>The same problem would arise if a print job is for 20 copies of a single page.</p><p>At the risk of stating the obvious, the same awk stanza parses the <span class="bbc">/var/log/cups/page_log</span> file which (depending on how the printer is used) can have between one and four digits both in the print job number and the number of pages printed. I limit this to four digits because the size of cartdrige 2020W cartdrige won&#039;t ever print 9999 pages.&#160; &#160;</p><p>I can&#039;t see how to solve this with <span class="bbc">awk</span> and have searched all over the web for a script to do basic CUPS accounting to no avail.</p><p>Thanks for your input.</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Thu, 19 Mar 2020 22:19:03 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=20590#p20590</guid>
		</item>
		<item>
			<title><![CDATA[Re: CUPS accounting [Solved]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=20582#p20582</link>
			<description><![CDATA[<p>awk counts words separated by spaces. So as long as the number of pages printed is just a string of digits awk will total it correctly. I&#039;ve run similar code to total multi digit numbers without problems.</p><p>You could make a copy of some of the log, edit the numbers, run awk against it and see what you get. That should find any problems in time to fix them</p><p>Chris</p>]]></description>
			<author><![CDATA[dummy@example.com (chris2be8)]]></author>
			<pubDate>Thu, 19 Mar 2020 17:30:57 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=20582#p20582</guid>
		</item>
		<item>
			<title><![CDATA[Re: CUPS accounting [Solved]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=20572#p20572</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>Altoid wrote:</cite><blockquote><div><p>... whatever the working <span class="bbc">awk</span> stanza is, it will be good for this particular setup as a change in the printer name or user could throw off the results.<br />Is this so?</p></div></blockquote></div><p>It seems that it is more compliacted than that.</p><p>For my purposes (printed page accounting) the <em>relevant</em> data in each line of the <span class="bbc">/var/log/cups/page_log</span> file boils down to the number that tells me the amount of pages printed in each print job.</p><p>As there&#039;s only one printer <span class="bbc">Samsung_M2020_Series</span> and only one user <span class="bbc">groucho</span> the column where the print job number, page number and pager printed data are will always be in the same position.</p><p>Data that comes after that informing page size and content is irrelevant for what I need to do.</p><div class="codebox"><pre><code>Samsung_M2020_Series groucho 1 [02/Nov/2018:10:50:45 -0300] 1 1 - localhost
Samsung_M2020_Series groucho 2 [08/Nov/2018:18:10:50 -0300] 1 1 - localhost
Samsung_M2020_Series groucho 3 [27/Nov/2018:16:41:51 -0300] 1 1 - localhost
Samsung_M2020_Series groucho 3 [27/Nov/2018:16:42:00 -0300] 2 1 - localhost
Samsung_M2020_Series groucho 4 [05/Dec/2018:08:29:39 -0300] 1 1 - localhost
                             | &lt;- print job  page number -&gt; | | &lt;- pages printed</code></pre></div><p>So if I run <span class="bbc">awk &#039;/groucho/{pages += $7} END {print pages}&#039;</span> against that data, it correctly tells me how many pages I have printed. <br />ie: 5 pages.</p><p>Now, when printing starts, <span class="bbc">print job</span> will be a one digit number for the first nine lines in the log and from then on, will be two digit numbers for the next 99 and so on.</p><p><span class="bbc">Page number</span> and <span class="bbc">pages printed</span> will also be one digit numbers as long as the print job being logged has only nine different pages to print and the amount of pages printed is under 10.</p><p>But when these change, the <span class="bbc">awk</span> stanza is useless.</p><p>Even if I trim the data being logged (I&#039;m on that) to limit it to just the bare essentials (date, page number and pages printed), the problem susbsists as these last two will change.</p><p>How to get around that?</p><p>Thanks in advance,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Thu, 19 Mar 2020 12:43:50 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=20572#p20572</guid>
		</item>
		<item>
			<title><![CDATA[Re: CUPS accounting [Solved]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=20223#p20223</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>Altoid wrote:</cite><blockquote><div><p>Hello:<br />There seem to be some discrepancies ...<br />I&#039;ll check and report back.</p></div></blockquote></div><p>I&#039;ve done some manual accounting and found this:</p><p>While the output of the <span class="bbc">awk</span> command to find the total pages printed gives a result of 601 ...</p><div class="codebox"><pre><code>groucho@devuan:~$ awk &#039;/A4/{pages += $6} END {print pages}&#039; /var/log/cups/page_log
601
groucho@devuan:~$</code></pre></div><p>... my manual accounting shows that a total of 1033 pages were actually printed.</p><p>The 1033 (via-a-vis 601) figure is more in line with the expected number of pages that could actually be printed with the original cartdrige that came with this HP printer.<br />(cheap bastards ... )</p><p>This is the output of the relevant parts of <span class="bbc">/var/log/cups/page_log</span>:</p><div class="codebox"><pre><code>groucho@devuan:~$ cat /var/log/cups/page_log
--- snip ---
Samsung_M2020_Series groucho 84 [02/Nov/2018:10:50:45 -0300] 1 1 - localhost
Samsung_M2020_Series groucho 85 [08/Nov/2018:18:10:50 -0300] 1 1 - localhost
Samsung_M2020_Series groucho 86 [27/Nov/2018:16:41:51 -0300] 1 1 - localhost
Samsung_M2020_Series groucho 87 [30/Nov/2018:10:44:10 -0300] 1 1 - localhost
Samsung_M2020_Series groucho 88 [05/Dec/2018:08:29:39 -0300] 1 1 - localhost
Samsung_M2020_Series groucho 88 [05/Dec/2018:08:29:42 -0300] 2 1 - localhost
Samsung_M2020_Series groucho 89 [08/Dec/2018:19:12:32 -0300] 1 1 - localhost 
--- snip ---</code></pre></div><p>For some reason the print job numbering starts at 84, which at 1 page per job, would take the number of printed pages to 1117.<br />I may have deleted/edited the log file after finding strange characters in some lines due to some ISO issue (?), cannot recall.</p><p>I&#039;ve struck out the data after <span class="bbc">localhost</span> as for my use I have no need for the printed page metadata nor the page size as I think this printer only takes A4, the only size I am using.<br />I have no need for the printer data or the user data either as there&#039;s only one printer and only one user allowed to print or use the rig (me) but I have left that part of the output string to show how it is formed.</p><p>Samsung_M2020_Series<br />groucho<br /><strong>84</strong>&#160; &lt;--- job number<br /><strong>[02/Nov/2018:10:50:45 -0300]</strong>&#160; &lt;--- job date<br /><strong>1</strong>&#160; &lt;--- pages printed<br /><strong>1</strong>&#160; &lt;--- pages in job<br />localhost</p><p>The thing is that only the data in bold is of any use to me.</p><p>What would have to be added/changed to the <span class="bbc">awk</span> stanza to get this to work?<br />I have the idea that whatever the working <span class="bbc">awk</span> stanza is, it will be good for this particular setup as a change in the printer name or user could throw off the results.</p><p>Is this so? </p><p>Thanks in advance,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Wed, 26 Feb 2020 12:25:30 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=20223#p20223</guid>
		</item>
		<item>
			<title><![CDATA[Re: CUPS accounting [Solved]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=20216#p20216</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><p>Try these instead ...</p></div></blockquote></div><p>These two worked a charm.</p><p>This string <span class="bbc">awk &#039;/A4/{print $4$5 &quot; &quot; $6}&#039; /var/log/cups/page_log &gt; trimmed_log.txt</span> got me a list of what would seem to be all the print jobs up to today (172 between 30/11/18 and 13/02/2020). I&#039;d just have to trim the ones up to the cartdrige change/refill.</p><div class="codebox"><pre><code>groucho@devuan:~$ cat trimmed_log.txt
[30/Nov/2018:10:44:10-0300] 1
[08/Dec/2018:19:12:32-0300] 1
--- snip ---
13/Feb/2020:16:57:53-0300] 14
groucho@devuan:~$</code></pre></div><p>And this other one <span class="bbc">awk &#039;/A4/{pages += $6} END {print pages}&#039; /var/log/cups/page_log</span> gave me what would seem to be the sum of the pages printed (601).&#160; </p><div class="codebox"><pre><code>groucho@devuan:~$ awk &#039;/A4/{pages += $6} END {print pages}&#039; /var/log/cups/page_log
601
groucho@devuan:~$</code></pre></div><p>No spreadsheet, which is a relief even though I would only do this once every so often. </p><p>Thank you <em>both</em> for taking the time to help me out with this, I will try harder to spruce up my CLI basics as I am (again, after so long) finding it to be not only interesting but very usefull.<br />So <em>many</em> years of GUI usage ...&#160; =-/</p><p>Once again, thanks a lot.</p><p>Best,</p><p>A.</p><p>Edit:<br />There seem to be some discrepancies between the actual log and the output from the awk commands.<br />I&#039;ll check and report back.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Tue, 25 Feb 2020 12:32:40 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=20216#p20216</guid>
		</item>
		<item>
			<title><![CDATA[Re: CUPS accounting [Solved]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=20211#p20211</link>
			<description><![CDATA[<div class="quotebox"><cite>ToxicExMachina wrote:</cite><blockquote><div><p>Therefore the following command will give a text table with date/time and amount of printed pages found by the word &quot;A4&quot;:</p><div class="codebox"><pre><code>cat /var/log/cups/page_log | grep A4 | awk &#039;{print $4$5 &quot; &quot; $6}&#039; &gt; trimmed_log.txt </code></pre></div><p>You can process it in spreadsheet.</p><p>If you want to get total amount of pages printed by the printer you can use the following command:</p><div class="codebox"><pre><code>cat /var/log/cups/page_log | grep A4 | awk &#039;{pages += $6} END {print pages}&#039;</code></pre></div></div></blockquote></div><p><a href="http://porkmail.org/era/unix/award.html#cat" rel="nofollow">Useless use of cat</a>. <a href="http://porkmail.org/era/unix/award.html#grep" rel="nofollow">And grep too</a>.</p><p>Try these instead:</p><div class="codebox"><pre><code>awk &#039;/A4/{print $4$5 &quot; &quot; $6}&#039; /var/log/cups/page_log &gt; trimmed_log.txt
awk &#039;/A4/{pages += $6} END {print pages}&#039; /var/log/cups/page_log</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Mon, 24 Feb 2020 18:42:03 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=20211#p20211</guid>
		</item>
		<item>
			<title><![CDATA[Re: CUPS accounting [Solved]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=20206#p20206</link>
			<description><![CDATA[<p>The simplest way to trim information from the log is awk</p><p>I suppose in the &quot;Samsung_M2020_Series groucho 109 [27/Dec/2018:08:37:02 -0300] 1 1 - localhost H:\Desktop\flower_sm.jpg A4 -&quot; entry the 6th word (in this case it&#039;s &quot;1&quot;) is the number of printed pages. Therefore the following command will give a text table with date/time and amount of printed pages found by the word &quot;A4&quot;:</p><div class="codebox"><pre><code>cat /var/log/cups/page_log | grep A4 | awk &#039;{print $4$5 &quot; &quot; $6}&#039; &gt; trimmed_log.txt </code></pre></div><p>You can process it in spreadsheet.</p><p>If you want to get total amount of pages printed by the printer you can use the following command:</p><div class="codebox"><pre><code>cat /var/log/cups/page_log | grep A4 | awk &#039;{pages += $6} END {print pages}&#039;</code></pre></div><p>In this simple example grep is a tool used to find log entries according to defined word and awk is a tool used to parse and write every entry found by grep in shorter format. The default field separator is space. You can modify expressions from the example for best result.</p>]]></description>
			<author><![CDATA[dummy@example.com (ToxicExMachina)]]></author>
			<pubDate>Mon, 24 Feb 2020 09:14:27 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=20206#p20206</guid>
		</item>
		<item>
			<title><![CDATA[Re: CUPS accounting [Solved]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=20199#p20199</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>ToxicExMachina wrote:</cite><blockquote><div><p>Maybe I can help ...</p></div></blockquote></div><p>Thank you very much. =-)</p><div class="quotebox"><cite>ToxicExMachina wrote:</cite><blockquote><div><p>... but I need a sample of log.<br />... not sure /var/log/cups/page_log is the correct log ...<br />... it has no any contents ...</p></div></blockquote></div><p>It seems that CUPS can be quite informative.<br />I have three logs: access_log, error_log, and page_log, but I think logging/log level has (?) to be set in the configuration file.</p><p>If I remember correctly, I&#039;m using the default file which you can set in <span class="bbc">http://localhost:631/admin/</span>.<br />The first entry is <span class="bbc">LogLevel</span> and it is set to <span class="bbc">warn</span>.</p><p>Also, in <span class="bbc">http://localhost:631/admin/</span> -&gt; <span class="bbc">Server Settings</span> -&gt; <span class="bbc">Advanced</span> you can choose to preserve job history.<br />I have it set to 50 jobs max.</p><p>With respect to the page_log format, I found this ...</p><div class="quotebox"><blockquote><div><p>Page Logging</p><p>CUPS can log every page that is printed on a system to the page_log file. Page logging must be enabled by setting the PageLogFormat directive in the cupsd.conf file and is <span class="bbu">only available for drivers that provide page accounting information</span>, typically all PostScript and CUPS raster devices. Raw queues and queues using third-party solutions such as Foomatic generally do not have useful page accounting information available.</p></div></blockquote></div><p>... and this:</p><div class="quotebox"><blockquote><div><p>Access Log File Format</p><p>The access_log file lists each HTTP resource that is accessed by a web browser or client. Each line is in an extended version of the so-called &quot;Common Log Format&quot; used by many web servers and web reporting tools:</p><p>&#160; &#160;<span class="bbc">host group user date-time &quot;method resource version&quot; status bytes ipp-operation ipp-status</span></p></div></blockquote></div><p>It seems that the default <span class="bbc">page_log</span> format (apparently set in cupsd.conf) is this ...</p><div class="quotebox"><blockquote><div><p>PageLogFormat format-string<br />&#160; &#160; Specifies the format of PageLog lines. Sequences beginning with percent (%) characters are replaced with the corresponding information, while all other characters are copied literally. The following percent sequences are recognized:</p><p>&#160; &#160; &#160; &#160; &quot;%%&quot; inserts a single percent character.<br />&#160; &#160; &#160; &#160; &quot;%{name}&quot; inserts the value of the specified IPP attribute.<br />&#160; &#160; &#160; &#160; &quot;%C&quot; inserts the number of copies for the current page.<br />&#160; &#160; &#160; &#160; &quot;%P&quot; inserts the current page number.<br />&#160; &#160; &#160; &#160; &quot;%T&quot; inserts the current date and time in common log format.<br />&#160; &#160; &#160; &#160; &quot;%j&quot; inserts the job ID.<br />&#160; &#160; &#160; &#160; &quot;%p&quot; inserts the printer name.<br />&#160; &#160; &#160; &#160; &quot;%u&quot; inserts the username.</p><p>The default is the empty string, which disables page logging. The string &quot;%p %u %j %T %P %C %{job-billing} %{job-originating-host-name} %{job-name} %{media} %{sides}&quot; creates a page log with the standard items.</p></div></blockquote></div><p>... but my /etc/cups/cupsd.conf dos not have a <span class="bbc">PageLogFormat</span> entry.</p><p>In any case, the <span class="bbc">/var/log/cups/page_log</span> format in my log file is this:</p><p><span class="bbc">Samsung_M2020_Series groucho 109 [27/Dec/2018:08:37:02 -0300] 1 1 - localhost H:\Desktop\flower_sm.jpg A4 -</span></p><p>I have to see how to trim this a bit as I really have no use for so much information as (at least for now) it is one rig, one user and no external sharing or network access and I only need to know how many pages I have been able to print by the time my <ins>cheap HP printer with an expensive toner cartridge</ins> needs to be reloaded.</p><p>Thanks a lot for your input.</p><p>Cheers,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Sun, 23 Feb 2020 12:40:01 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=20199#p20199</guid>
		</item>
		<item>
			<title><![CDATA[Re: CUPS accounting [Solved]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=20197#p20197</link>
			<description><![CDATA[<div class="quotebox"><cite>Altoid wrote:</cite><blockquote><div><p>Hello:</p><div class="quotebox"><cite>ToxicExMachina wrote:</cite><blockquote><div><p>... use grep and/or awk for getting only necessary information from that log file.</p></div></blockquote></div><p>Hmmm ...</p><p>The data I&#039;m looking for is the sum of a set of numbers whose values I ignore and are (in this case) listed in 400 consecutive lines, one line per print job.<br />I don&#039;t see how grep could help me.</p><p>I thought there could be some script or front end I have not been able to find that would use the log file as input and get the total pages printed.</p><p>Thanks for your input.</p><p>Cheers,</p><p>A.</p></div></blockquote></div><p>May be I can help but I need a sample of log. I am not sure /var/log/cups/page_log is the correct log because in my case it has no any contents (the machine with working printer).</p>]]></description>
			<author><![CDATA[dummy@example.com (ToxicExMachina)]]></author>
			<pubDate>Sun, 23 Feb 2020 11:31:53 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=20197#p20197</guid>
		</item>
		<item>
			<title><![CDATA[Re: CUPS accounting [Solved]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=20186#p20186</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>ToxicExMachina wrote:</cite><blockquote><div><p>... use grep and/or awk for getting only necessary information from that log file.</p></div></blockquote></div><p>Hmmm ...</p><p>The data I&#039;m looking for is the sum of a set of numbers whose values I ignore and are (in this case) listed in 400 consecutive lines, one line per print job.<br />I don&#039;t see how grep could help me.</p><p>I thought there could be some script or front end I have not been able to find that would use the log file as input and get the total pages printed.</p><p>Thanks for your input.</p><p>Cheers,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Sun, 23 Feb 2020 00:01:48 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=20186#p20186</guid>
		</item>
		<item>
			<title><![CDATA[Re: CUPS accounting [Solved]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=20157#p20157</link>
			<description><![CDATA[<div class="quotebox"><cite>Altoid wrote:</cite><blockquote><div><p>Hello:</p><div class="quotebox"><cite>ToxicExMachina wrote:</cite><blockquote><div><p> .... in completed jobs of the printer ...</p></div></blockquote></div><p>Yes, I know.</p><p>Like I mention in my post:</p><div class="quotebox"><blockquote><div><p>There&#039;s the log at http://localhost:631/admin/log/page_log which is read from /var/log/cups/page_log ...</p></div></blockquote></div><p>But there are more than 400 completed jobs and I only need the amount of pages printed which I cannot seem to be able to get without some time consuming editing of the log file.</p><p>Thanks for your input.</p><p>A.</p></div></blockquote></div><p>You can use grep and/or awk for getting only necessary information from that log file.</p>]]></description>
			<author><![CDATA[dummy@example.com (ToxicExMachina)]]></author>
			<pubDate>Fri, 21 Feb 2020 07:45:36 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=20157#p20157</guid>
		</item>
		<item>
			<title><![CDATA[Re: CUPS accounting [Solved]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=20123#p20123</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>ToxicExMachina wrote:</cite><blockquote><div><p> .... in completed jobs of the printer ...</p></div></blockquote></div><p>Yes, I know.</p><p>Like I mention in my post:</p><div class="quotebox"><blockquote><div><p>There&#039;s the log at http://localhost:631/admin/log/page_log which is read from /var/log/cups/page_log ...</p></div></blockquote></div><p>But there are more than 400 completed jobs and I only need the amount of pages printed which I cannot seem to be able to get without some time consuming editing of the log file.</p><p>Thanks for your input.</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Tue, 18 Feb 2020 10:43:14 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=20123#p20123</guid>
		</item>
		<item>
			<title><![CDATA[Re: CUPS accounting [Solved]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=20121#p20121</link>
			<description><![CDATA[<p>Try too find it in completed jobs of the printer (CUPS web interface). You will see table with information you need.</p>]]></description>
			<author><![CDATA[dummy@example.com (ToxicExMachina)]]></author>
			<pubDate>Tue, 18 Feb 2020 07:17:24 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=20121#p20121</guid>
		</item>
	</channel>
</rss>
