Prefetch Technologies // Keeping your cache lines cozy

pbcopy / pbpaste in OS X

macosFeb 13, 2009 1 min read

I came across a nifty utility in OS X that allows you to copy / paste data to/from the clipboard without having to select text and command+c/command+v Michael-MacBook-Pro:~ (michael)> echo foo | pbcopy Michael-MacBook-Pro:~ (michael)> pbpaste foo Thats kind of neat. What about connecting to a remote machine, executing some command, and then having that output in the clipboard of your local machine? Michael-MacBook-Pro:~ (michael)> ssh somehost.com uptime | pbcopy Michael-MacBook-Pro:~ (michael)> pbpaste 5:26pm up 64 day(s), 8:30, 4 users, load average: 0.04, 0.04, 0.04

$ read more →

Easily encoding documents prior to publishing them to the web

webFeb 13, 2009 1 min

While reviewing the command lines on commandlinefu, I came across this nifty little gem: This command line snippet takes a file as an argument, and escapes all of the characters that can't be directly published on the web (i.e., it will convert a right bracket to & gt). This is super useful, and is a welcome addition to the nifty tidy utility!

$ read more →

ZFS dataset and volume properties

storageFeb 10, 2009 4 min

A few chapters of the upcoming OpenSolaris Bible have been released. Specifically, looking through chapter 8 on ZFS, I came across this handy list of properties and their descriptions. Some of these properties were new to me, as they probably only exist in later versions of ZFS in OpenSolaris. Specifically, vscan, to scan files for viruses is interesting…

$ read more →

Adding environment variables to an SMF service

solarisFeb 6, 2009 1 min

I create an SMF manifest last week for a new service, and needed two environment variables to be set prior to the services' start method being invoked. After poking around the svccfg manual page, I came across the setenv subcommand, which can be used to set an environment variable: Since I was creating a manifest from scratch, I ran this against a temporary service and then used the svccfg "export" command to display the entry I needed to add to the manifest I was creating: Here is the XML that was displayed for the environment variable addition: I like SMF, but sometimes wonder if it is over-engineered for what it actually needs to do. If you have opinions on this, please let me know by submitting a comment.

$ read more →

Figuring out if a dedicated ZFS intent log will help

storageFeb 6, 2009 1 min

ZFS uses the ZFS intent log (also referred to as a ZIL) to store synchronous writes. This has the advantage that a full transaction group doesn't need to be written when a synchronous write occurs, and maximizes the use of I/O bandwidth. For some applications (databases come to mind), placing the ZIL on a dedicated device can be extremely helpful. But how can you tell if placing the intent log on a separate device would be useful…

$ read more →