this line in my windows hosts file:
127.0.0.1 localhost bridal ties home l h g ebay.com www.ebay.com bb ll hh
doesn’t work for thing after ebay.com
fix:
split onto multiple lines
weird windows bug. No idea where to report those
this line in my windows hosts file:
127.0.0.1 localhost bridal ties home l h g ebay.com www.ebay.com bb ll hh
doesn’t work for thing after ebay.com
fix:
split onto multiple lines
weird windows bug. No idea where to report those
Add a line to /etc/rc.local like
nohup /usr/bin/Xvfb :1 -screen 0 1152x900x8 &
[at least on redhat that's a good file to dump it into]
refs:
http://www.idevelopment.info/data/Unix/General_UNIX/GENERAL_XvfbforSolaris.shtml
http://blog.shingara.fr/en/2008-09-03-profile-a-request-in-rails.html
shows how to use script\performance\request — it needs an input file.
Note that in 2.3 you’ll need to use a plugin, apparently. Still seems useful to me, though.
Apparently strace doesn’t play well by default with java.
strace -p pid doesn’t work, for example.
This does, though [follows forks--why necessary, dunno].
Run it under strace:
$ strace -F -f java Readfiles # where Readfiles.class exists
$ strace -F -p <pid>
ref: http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/index.jsp?topic=/com.ibm.java.doc.diagnostics.60/html/linux_tools.html
This program tries them all then tells you which one was fastest
http://www.coyotegulch.com/products/acovea/
now how to apply this to ruby…
ref: http://ruby-perspectives.blogspot.com/2008/07/oprofile-is-my-new-best-friend.html
here’s an example:
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.util.StringTokenizer;
public class Readfiles {
public static void main(String[] a) throws Exception {
System.out.println("here");
readTapeToFile(new File("out1"));
}
static void readTapeToFile(
File dstFile) throws FileNotFoundException,
IOException {
long start = System.currentTimeMillis();
File srcFile = new File("/dev/nst2");
InputStream inTape = new FileInputStream(srcFile);
OutputStream outFile = new FileOutputStream(dstFile);
try {
byte[] buf = new byte[1024 * 64];
int size;
while ((size = inTape.read(buf)) >= 0) {
outFile.write(buf, 0, size);
}
}
finally {
outFile.close();
inTape.close();
}
}
}
I don’t want to tear down bitmountain, just catalog a list of things that could improve with future versions of it, should it become open source.
Currently:
can’t delete a single file.
Doesn’t handle [?] oveflow conditions well?
does it handle directories well?
the ability to have foreign key “and other” restraints done solely at the DB level, instead of in rails.
ex:
validates_uniqueness_of
at load time, check if the DB already does this. If not spit out a warning and code for how to make this happen, then do it in Ruby.
Faster, safer [for validates uniqueness of].
Assuming that the devices are setup to access the tapes
you need to make yourself a member of group disk
you need to edit the access_control/internet.addresses to enable your user from your host still.
Also may need to compile the tape api lib on localhost.
Should be good to go.
Mount the tapes using the api, then write to them via the device.
You can tell which drive maps to which device by comparing the [device] scsi serial number with the serial number advertised by that drive [within acsss display drive
./ext/mingw/rubyeventmachine.so: 5: Access is denied. – ./ext/mingw/rubyeventmachine.so (LoadError)
meant [I think] you need to recompile your .so to work with a different machine. Maybe
Powered by WordPress