Monday, June 23, 2008

sshfs - mount a filesystem when you only have ssh access

sshfs is one of the most useful tools I've found recently. Basically it allows you to mount a filesystem, let's say your home directory, on a remote machine, just by using ssh. It uses FUSE and sftp in the background, but you don't need to worry about that. If you can ssh, you can mount the remote filesystem.

By default it only allows root to mount, but all you have to do is add yourself to the "fuse" group and re-login(or sudo -yourloginid if you're lazy or don't want to lose all your windows) and you can start using it:
mount remotemachine:/your/home/directory /local/mount/point

to unmount it just do:
fusermount -u /local/mount/point

It's excellent when you don't have NFS/samba available.

Wednesday, June 11, 2008

Want a better "top", try atop

I was recently looking for a utility that could record cpu, memory, and load usage on a per-process basis over a specified period of time. "top" itself has a -p flag, that lets you watch a single process, but no way to record to a logfile that I could find. Other utilities, like sar are system-wide, instead of process-specific. I was ready to write a script, when I found atop.

Atop can work like top or sar(if used with atopsar binary), but unlike either of these, it has heaps of flexibility, including being able to write to a logfile. It also has color highlighting, so that you can define when the CPU reaches a certain threshold, that it should turn red. It can write an ASCII logfile with timestamps based on the intervals you define, and it lists the system state, along with the process state that you've chosen.

Try this simple .atoprc to watch firefox's activity at 5 minute intervals:
interval 5
procname firefox

Then just run it with "atop -M > your_log_file" and let it's do it's magic. This produces human-readable format but if you want something that's easily parseable(ie. tab separated data, check out the -P flag.

Tuxpaint--Brilliant painting program for kids

I recently read about TuxPaint on Newsforge, and since I'm always on the lookout for programs that my little daughter can play with, I was keen to check it out. I was definitely impressed!

It has a very simple and intuitive interface, lots of fun brush shapes(heart, star, flower etc) with a color palette on the bottom. It's easy to change the size of the brush. Then you have your basic set of shapes, but the thing that makes the program very unique is the stamps.

There are heaps of stamps. At first I only noticed the first set(animals), but there are 34 pages of shapes within a wide range of categories. These include, fruits and veggies, coins, letters and smilies, planets, cars and traffic signs, musical instruments, sports equipment, and even holiday-specific icons. And again the stamps are easily resized, and some allow you to change their colors. Very cool!

In addition to the above there are the "Magic" tools which are some of the usual photo retouching tools, with some creative ones(like sparkles) that again make it fun for kids. Even saving and opening is extremely easy. The dialogs only ask "yes" or "no" and are simple visual representations. I wish other programs designed for kids (for example Potato Guy) used similar dialogs.

So in conclusion, if you have kids try Tuxpaint. You won't be disappointed.
-T

Monday, June 2, 2008

Goosh-the CLI interface to google(web based!)

Like to use the command line? Want to have your recent searches all visible on an easy to read page.

http://www.goosh.org


Even does images (i ), and you can tell it to search blogs(b ). Press "h" for the full list. "addengine" adds it to the firefox search bar. Very cool!
-T