<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>printing &#8211; Virtually Fun</title>
	<atom:link href="https://virtuallyfun.com/category/printing/feed/" rel="self" type="application/rss+xml" />
	<link>https://virtuallyfun.com</link>
	<description>Fun with Virtualization</description>
	<lastBuildDate>Fri, 26 Oct 2018 08:29:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>
	<item>
		<title>ttyplot &#8211; a real time plotting utility for the terminal</title>
		<link>https://virtuallyfun.com/2018/10/14/ttyplot-a-real-time-plotting-utility-for-the-terminal/</link>
					<comments>https://virtuallyfun.com/2018/10/14/ttyplot-a-real-time-plotting-utility-for-the-terminal/#comments</comments>
		
		<dc:creator><![CDATA[tenox]]></dc:creator>
		<pubDate>Sun, 14 Oct 2018 09:46:47 +0000</pubDate>
				<category><![CDATA[guest post]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[printing]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[unix]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/wordpress/?p=8982</guid>

					<description><![CDATA[(This is a guest post from Antoni Sawicki aka Tenox) I spend most of time in a day staring at a terminal window often&#160;running various performance monitoring tools and reading metrics. Inspired by tools like gtop, vtop and gotop&#160;I wished &#8230; <a href="https://virtuallyfun.com/2018/10/14/ttyplot-a-real-time-plotting-utility-for-the-terminal/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><em>(This is a guest post from Antoni Sawicki aka Tenox)</em></p>



<p class="wp-block-paragraph">I spend most of time in a day staring at a terminal window often&nbsp;running various performance monitoring tools and reading metrics.</p>



<p class="wp-block-paragraph">Inspired by tools like <a href="https://github.com/aksakalli/gtop">gtop</a>, <a href="https://github.com/MrRio/vtop">vtop </a>and <a href="https://github.com/cjbassi/gotop">gotop</a>&nbsp;I wished for a more generic terminal based tool that would visualize data coming from unix pipeline directly on the terminal. For example graph some column or field from <em>sar, iostat, vmstat, snmpget, etc. </em>continuously in real time.</p>



<p class="wp-block-paragraph">Yes <em>gnuplot</em> and several other utilities can plot on terminal already but none of them easily read data from stdin and plot continuously in real time.</p>



<p class="wp-block-paragraph">In just couple of evenings <a href="https://github.com/tenox7/ttyplot">ttyplot </a>was born. The utility reads data from stdin and plots it on a terminal with curses. Simple as that. Here is a most trivial example:</p>



<figure class="wp-block-image"><img fetchpriority="high" decoding="async" width="741" height="219" src="https://virtuallyfun.com/wp-content/uploads/2018/10/ttyplot-ping.png" alt="" class="wp-image-8984" srcset="https://virtuallyfun.com/wp-content/uploads/2018/10/ttyplot-ping.png 741w, https://virtuallyfun.com/wp-content/uploads/2018/10/ttyplot-ping-300x89.png 300w" sizes="(max-width: 741px) 100vw, 741px" /></figure>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph">To make it happen you take <em>ping</em>&nbsp;command and pipe the output via&nbsp;<em>sed</em> to extract the right column and remove unwanted characters:</p>



<pre class="wp-block-preformatted">ping 8.8.8.8 | sed -u 's/^.*time=//g; s/ ms//g' | ttyplot </pre>



<p class="wp-block-paragraph">Ttyplot can also read two inputs and plot with two lines, the second being in reverse-video. This is useful when you want to plot in/out or read/write at the same time.</p>



<figure class="wp-block-image"><img decoding="async" width="741" height="219" src="https://virtuallyfun.com/wp-content/uploads/2018/10/ttyplot-snmp.png" alt="" class="wp-image-8985" srcset="https://virtuallyfun.com/wp-content/uploads/2018/10/ttyplot-snmp.png 741w, https://virtuallyfun.com/wp-content/uploads/2018/10/ttyplot-snmp-300x89.png 300w" sizes="(max-width: 741px) 100vw, 741px" /></figure>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph">A lot of performance metrics are presented in as a &#8220;counter&#8221; type which needs to be converted in to a &#8220;rate&#8221;. <em>Prometheus</em> and <em>Graphana</em> have <em>rate()</em> or <em>irate()</em> function for that. I have added a simple <em>-r</em> option. The time difference is calculated automatically. This is an example using <em>snmpget</em> which is show in screenshot above:</p>



<pre class="wp-block-preformatted">{ while true; do snmpget -v 2c -c public 10.23.73.254 1.3.6.1.2.1.2.2.1.{10,16}.9 | gawk '{ print $NF/1000/1000 }'; sleep 10; done } | ttyplot -2 -r -u "MB/s"</pre>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph">I now find myself plotting all sorts of useful stuff which otherwise would be cumbersome. This includes a lot of metrics from Prometheus for which you normally need a web browser. And how do you plot metrics from Prometheus? With curl:</p>



<pre class="wp-block-preformatted">{ while true; do curl -s http://10.4.7.180:9100/metrics | grep "^node_load1 " | cut -d" " -f2; sleep 1; done } | ttyplot</pre>



<p class="wp-block-paragraph">If you need to plot a lot of different metrics ttyplot fits nicely in to panels in <em>tmux</em>, which also allows the graphs to run for longer time periods.<br><br></p>



<figure class="wp-block-image"><img decoding="async" width="1202" height="506" src="https://virtuallyfun.com/wp-content/uploads/2018/10/ttyplot-tmux.png" alt="" class="wp-image-8986" srcset="https://virtuallyfun.com/wp-content/uploads/2018/10/ttyplot-tmux.png 1202w, https://virtuallyfun.com/wp-content/uploads/2018/10/ttyplot-tmux-300x126.png 300w, https://virtuallyfun.com/wp-content/uploads/2018/10/ttyplot-tmux-768x323.png 768w, https://virtuallyfun.com/wp-content/uploads/2018/10/ttyplot-tmux-1024x431.png 1024w, https://virtuallyfun.com/wp-content/uploads/2018/10/ttyplot-tmux-1200x505.png 1200w" sizes="(max-width: 1202px) 100vw, 1202px" /></figure>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph">Of course in text mode the graphs are not very precise, but this is not the intent. I just want to be able to easily spot spikes here and there plus see some trends like up/down &#8211; which works exactly as intended.I do dig fancy braille line graphs and colors but this is not my priority at the moment. They may get added later, but most importantly I want the utility to work reliably on most operating systems and terminals.&nbsp;</p>



<p class="wp-block-paragraph">You can find compiled binaries <a href="https://github.com/tenox7/ttyplot/releases">here </a>and source code and examples to get you started &#8211;&nbsp;<a href="https://github.com/tenox7/ttyplot">here</a>.</p>



<p class="wp-block-paragraph">If you get to plot something cool that deserves to be listed as an example please send it on!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2018/10/14/ttyplot-a-real-time-plotting-utility-for-the-terminal/feed/</wfw:commentRss>
			<slash:comments>12</slash:comments>
		
		
			</item>
		<item>
		<title>VAX Snoopy!</title>
		<link>https://virtuallyfun.com/2015/10/05/vax-snoopy/</link>
					<comments>https://virtuallyfun.com/2015/10/05/vax-snoopy/#respond</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Mon, 05 Oct 2015 13:44:23 +0000</pubDate>
				<category><![CDATA[Fortran]]></category>
		<category><![CDATA[printing]]></category>
		<category><![CDATA[VAX]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/?p=5566</guid>

					<description><![CDATA[Following up on Adventures with Snoopy, MihaiÂ has delivered! Â Snoopy printed out from a VAX onto a real 9 pin printer, onto paper! Just the way we used to do things a million years ago! Be sure to check out the &#8230; <a href="https://virtuallyfun.com/2015/10/05/vax-snoopy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><div id="attachment_5567" style="width: 810px" class="wp-caption aligncenter"><a href="https://virtuallyfun.com/wp-content/uploads/2015/10/snoopy.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5567" class="size-full wp-image-5567" src="https://virtuallyfun.com/wp-content/uploads/2015/10/snoopy.jpg" alt="Hey Snoopy!" width="800" height="314" /></a><p id="caption-attachment-5567" class="wp-caption-text">Hey Snoopy!</p></div></p>
<p>Following up on <a href="https://virtuallyfun.com/2015/09/15/adventures-with-snoopy/">Adventures with Snoopy</a>, <a class="url" href="http://hawk.ro/" rel="external nofollow">Mihai</a>Â has delivered! Â Snoopy printed out from a VAX onto a real 9 pin printer, onto paper!</p>
<p>Just the way we used to do things a million years ago!</p>
<p>Be sure to check out the whole thing on <a href="http://hawk.ro/stories/snpcal/snpcal2.html">hawk.ro</a>, Â complete with pictures, and source material! Â Totally check it out, for that real programmer&#8217;s vibe!</p>
<p>And for those who have no idea, <a href="https://virtuallyfun.com/2010/04/07/the-real-programmers-snoopy-calendar/">here is where it all started</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2015/10/05/vax-snoopy/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Virtual Printers</title>
		<link>https://virtuallyfun.com/2014/12/10/virtual-printers/</link>
					<comments>https://virtuallyfun.com/2014/12/10/virtual-printers/#comments</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Wed, 10 Dec 2014 05:10:21 +0000</pubDate>
				<category><![CDATA[printing]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/?p=4855</guid>

					<description><![CDATA[So I got this SPAM today.. Ebay now tracks if you&#8217;ve clicked on anything (even when not signed in) and will alert you (and the seller no doubt) that something is price reduced. I was looking at some old setup, &#8230; <a href="https://virtuallyfun.com/2014/12/10/virtual-printers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>So I got this SPAM today.. Ebay now tracks if you&#8217;ve clicked on anything (even when not signed in) and will alert you (and the seller no doubt) that something is price reduced.</p>
<p><div id="attachment_4857" style="width: 687px" class="wp-caption aligncenter"><a href="https://virtuallyfun.com/wp-content/uploads/2014/12/ebay-okimate-10.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4857" class="size-full wp-image-4857" src="https://virtuallyfun.com/wp-content/uploads/2014/12/ebay-okimate-10.png" alt="Ebay at it's worst." width="677" height="427" /></a><p id="caption-attachment-4857" class="wp-caption-text">Ebay at it&#8217;s worst.</p></div></p>
<p>I was looking at some old setup, and I remembered back in the 80s I had an Okimate 10 printer. Â It was without a doubt the worst printer I&#8217;ve ever used. Â Not only was it god awfully slow, it required special ink cartridges that were almost impossible to find (and if you did they were very expensive) but to print properly it required special glossy paper.</p>
<p><div id="attachment_4858" style="width: 650px" class="wp-caption aligncenter"><a href="https://virtuallyfun.com/wp-content/uploads/2014/12/okimate-10-test-page.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4858" class="size-full wp-image-4858" src="https://virtuallyfun.com/wp-content/uploads/2014/12/okimate-10-test-page.jpg" alt="The 10's test page" width="640" height="566" /></a><p id="caption-attachment-4858" class="wp-caption-text">The 10&#8217;s test page</p></div></p>
<p>And if you hit the wrong button on the printer, you&#8217;d get this fabulous test page. Over and over. Ugh. Â It banded a full Yellow/Magenta/Cyan stripe on every pass. Â If you got 10 pages out of a ribbon it was amazing. Â But on my nostalgic trip to remember how badly this printer sucked, I found <a href="http://ptouchman.blogspot.hk/2014/07/okimate-20.html">a Virtual OkiMate 20</a>! Â It&#8217;s a <a href="http://googledrive.com/host/0B7Vet6dn3-GwWkwzeGZaVzFnd3M/index.html">javascript program</a> of all things, that&#8217;ll interpret the graphics output of an OkiMate 20 dump file.</p>
<p><div id="attachment_4859" style="width: 1007px" class="wp-caption aligncenter"><a href="https://virtuallyfun.com/wp-content/uploads/2014/12/okimate-20-test.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4859" class="size-full wp-image-4859" src="https://virtuallyfun.com/wp-content/uploads/2014/12/okimate-20-test.png" alt="Test file from an Amiga" width="997" height="412" /></a><p id="caption-attachment-4859" class="wp-caption-text">Test file from an Amiga</p></div></p>
<p>The test image is a picture from an Amiga Workbench. Â It&#8217;s immediately recognizable. Â But what is really cool, if you scroll down you&#8217;ll see something like this:</p>
<p><div id="attachment_4860" style="width: 687px" class="wp-caption aligncenter"><a href="https://virtuallyfun.com/wp-content/uploads/2014/12/Okimate-20-band.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4860" class="size-full wp-image-4860" src="https://virtuallyfun.com/wp-content/uploads/2014/12/Okimate-20-band.png" alt="How the Oki works" width="677" height="265" /></a><p id="caption-attachment-4860" class="wp-caption-text">How the Oki works</p></div></p>
<p>And here you can see how the OkiMate 20 was busy devouring a colour band from it&#8217;s virtual cartridge.</p>
<p>Peter has quite a few <a href="http://ptouchman.blogspot.hk/">virtual printers on his blog</a>, The one that caught my eye was the <a href="http://ptouchman.blogspot.hk/2014/06/epson-jx-80-javascript-interpreter.html">Epson JX-80</a>. Â Windows NT supports that printer (probably many other OS&#8217;s but I was going to stick with something quick and easy). Â I took my 10 crash screen, and printed it out!</p>
<p><div id="attachment_4856" style="width: 1076px" class="wp-caption aligncenter"><a href="https://virtuallyfun.com/wp-content/uploads/2014/12/Virtual-Epson-JX-80.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4856" class="size-full wp-image-4856" src="https://virtuallyfun.com/wp-content/uploads/2014/12/Virtual-Epson-JX-80.png" alt="Printing from Windows NT 4.0 at 120x144" width="1066" height="1040" /></a><p id="caption-attachment-4856" class="wp-caption-text">Printing from Windows NT 4.0 at 120&#215;144</p></div></p>
<p>Pretty cool!</p>
<p>For some reason the printer emulator only is printing in monochrome, it&#8217;ll interpret the colour bands, but it doesn&#8217;t switch ink colours. Â I guess it automagically is doing that. Â Also I had to change the default Windows resolution of 144&#215;240 to 144&#215;120, to get it to print.</p>
<p>Of course if you wanted to the best thing to do is install an Apple Laser Write II printer, and have it output to a file, as they are PostScript printers. Â Then you can use <a href="http://www.ghostscript.com/download/gsdnld.html">ghostscript</a> to convert your postscript file to a PDF, and print that email it, or remember what a pain write only devices are.</p>
<p>As an update you can download all of the printer emulators from the authors blogÂ <a href="http://ptouchman.weebly.com/blog">ptouchman.weebly.com</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2014/12/10/virtual-printers/feed/</wfw:commentRss>
			<slash:comments>8</slash:comments>
		
		
			</item>
		<item>
		<title>Printing within Qemu</title>
		<link>https://virtuallyfun.com/2009/10/12/printing-within-qemu/</link>
					<comments>https://virtuallyfun.com/2009/10/12/printing-within-qemu/#respond</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Tue, 13 Oct 2009 01:04:00 +0000</pubDate>
				<category><![CDATA[printing]]></category>
		<category><![CDATA[QEMU]]></category>
		<category><![CDATA[Xenix]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/?p=170</guid>

					<description><![CDATA[For a while I was unsure of the syntax of printing from within Qemu. I know for the Xenix crowd this is kind of &#8216;a big deal&#8217;. Along with more serial ports for consoles &#38; stuff&#8230; Anyways for the printer &#8230; <a href="https://virtuallyfun.com/2009/10/12/printing-within-qemu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>For a while I was unsure of the syntax of printing from within Qemu.  I know for the Xenix crowd this is kind of &#8216;a big deal&#8217;.  Along with more serial ports for consoles &amp; stuff&#8230;</p>
<div></div>
<div>Anyways for the printer I found an example on line, and it&#8217;s quite easy:</div>
<div></div>
<div>
<blockquote><p>qemu xenix_hard_disk.vhd -parallel file:lpt1: -M isapc -m 16 -k en-us</p></blockquote>
<p>Now I&#8217;ve seen it actually spool stuff to the printer once the emulator is exited&#8230; I&#8217;m sure there is some way to kick these jobs better&#8230; I&#8217;ve also been trying to keep it as dumb as possible and there is a chance my HP printer /scanner thing doesn&#8217;t talk like a 1970&#8217;s style printer.. I&#8217;ll know more tomorrow..</p></div>
<div></div>
<div>But at the moment this should serve enough to get people started.  Also you could redirect the parallel port out to a file, and then open that file in say word and print from there as well.</div>
<div></div>
<div>This is becoming a bigger deal now that future versions of Virtual PC no longer support things like parallel ports, floppy disks &amp; sound blasters&#8230;. Qemu will be the only out for a few people.</div>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2009/10/12/printing-within-qemu/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
