Monday, August 31, 2009

pdf concatenation

This worked for putting a bunch of pdfs into 1

gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf in3.pdf

(randomly found on the web)

pdf concatenation

This worked for putting a bunch of pdfs into 1

gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf in3.pdf

Sunday, August 23, 2009

uuid

Another tidbit that I do infrequently is have to look up the uuid of a drive.

One way to do it is using tune2fs -l /dev/sda3 or whatever

Thursday, August 20, 2009

Mime decoding

When the scanner encounters a file it deems too big, it breaks it up into a couple of chunks. Unfortunately it does not do this nicely, rather it just truncates it and then sends a new message continuing where it left off.

Anyways, to reassemble
1. Save all of the parts into one file
2. Elide the headers out of the file except for the first one
3. Use munpack or mimedecode to get the pdf

Not too bad, but the extra editing is a little annoying

Dec 2009 update:
It works better if I view the email and then save it. The headers do not get saved to the file, which makes decoding go much better.

New server - nfs woes

The new server came in and I installed the new drives with no problem, although I will probably order another 90 sata cable next time. The raid setup went ok, I went with a raid 5. On doing the performance testing though (using iobench) the write performance was only about 10% of what we were getting previously. Locally on the machine the read and write performance is fine, but over nfs 3 it is terrible. Then I tried it over nfs to a partition that was not raid, and it was still terrible. So, the problem appears to nfs and not the physical setup.

My next step is to try openafs and hope that the performance characteristics of it will be sufficient.