Aleksey Tsalolikhin's blog

How to read tapes in TAR per frame format

Submitted by Aleksey Tsalolikhin on Fri, 2008-05-23 11:21.

TAR per frame means each TIFF file is written as a separate TAR file onto tape. This is a practice in the entertainment industry.

Now, the default tape device (/dev/st0 on Linux) rewinds after each command. Trying to read consecutive files, and rewinding between each read, adds a lot of time.

It's possible to specify a no-rewind tape device which doesn't rewind after each command. The device name is different on every Unix but on Linux it's /dev/nst0. (the "n" stands for no-rewind. The "st" stands for SCSI tape.)

Here is a loop to read a file and then advance to the next This command will extract the entirety of the TAR per frame tape.

Allow me to encourage you to join the very cool USENIX Association

Submitted by Aleksey Tsalolikhin on Wed, 2008-03-12 23:52.

This just in:

USENIX is pleased to announce open public access to all its conference
proceedings.

This significant decision will allow universal access to some of the
most important technical research in advanced computing. In making this
move USENIX is setting the standard for open access to information, an
essential part of its mission.

USENIX could not achieve such goals without the support and dedication
of its membership. We urge you to encourage others to join USENIX.
Membership helps us present over 20 influential conferences each year
and offer open access to the technical information presented there.

backing up crontabs over ssh (many-to-one disk-to-disk backup)

Submitted by Aleksey Tsalolikhin on Wed, 2008-03-05 22:02.

Here is a pair of ssh "for" loops to backup all the crontabs on my Linux and HP-UX systems to my admin host:

for f in `cat ~/linux_hostnames.txt `
do
echo backing up $f; ssh $f 'sudo tar cvf - /var/spool/cron/' > $f.tar
done

for f in `cat ~/hpux_hostnames.txt `
do
echo backing up $f; ssh $f 'sudo tar cvf - /var/spool/cron/crontabs' > $f.tar
done

Let me know if this is useful to you.

Best,
Aleksey

How to use zip to compress files

Submitted by Aleksey Tsalolikhin on Sat, 2008-02-16 20:22.

The syntax is:

zip output_archive_name input_file_name

Examples:

zip new_archive_name existing_file_name

will compress existing_file_aname into new_archive_name.zip

zip new_archive_name directory_name

will create new_archive_name.zip

useful little perl script to insert timestamps into your data stream / pipeline

Submitted by Aleksey Tsalolikhin on Thu, 2008-02-14 19:21.

I wrote this script to insert a timestamp into the pipeline. I call it "teetime" after /usr/bin/tee.

It can make vmstat more informative, for example:

vmstat 1 | teetime


14Feb2008-18:21:51 procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
14Feb2008-18:21:51 r b swpd free buff cache si so bi bo in cs us sy id wa
14Feb2008-18:21:51 1 0 160 15796 41996 255964 0 0 0 0 1035 88 0 0 100 0
14Feb2008-18:21:52 0 0 160 15796 41996 255964 0 0 0 208 1049 99 0 0 99 0

Endorsements of Aleksey Tsalolikhin from his colleagues

Submitted by Aleksey Tsalolikhin on Tue, 2008-02-12 13:06.

To start the day off on a positive note, I decided to post my LinkedIn endorsements on my web site.

Here are a few:

"It was always a pleasure working with Aleksey at Earthlink. His dedication to projects, technical knowledge, and interpersonal skills are only a few of his many attributes." (December 25, 2005)
– Jason Wells, worked with Aleksey at EarthLink

"Aleksey has a natural ability to care and help his peers with seemingly complex problems. His can-do attitude is extremely refreshing in high stress situations." (August 4, 2005)
– Alonso Robles, worked with Aleksey at EarthLink

How to remove IPv6 on Red Hat nodes

Submitted by Aleksey Tsalolikhin on Sun, 2008-02-03 14:52.Linux

Picked up this tid-bit on how to disable IPv6 (which aligns with the general sys admin philosophy of "if we are not using it, remove it or turn it off to simplify the system and increase security":

(1) Edit /etc/sysconfig/network and set NETWORKING_IPV6=no.

(2) Issue the following command as root: 'chkconfig ip6tables off'.

(3) Reboot the host machine.

XML feed