The Path to Root - SysAdmin Blog (Beta)

A log of learning Linux, UNIX, Free Software, computing systems, and networking.

Thursday, September 06, 2007

Logging a Terminal Session in Linux with Script

Ever wonder how you can capture the output of your terminal session to a file for reference later? Check it out:

Have you ever wondered how you can easily capture a console session on Linux (and probably most other Unix-like OSes) without the need for special video recording software?

Here's how: you can use the script(1) command (part of the bsdutils package).

  • Start the script command. Without parameters the sessions will be logged to a file called typescript. You can also supply a filename on the command line: script mysession.log.
  • Type whatever you want to record...
  • End the recording session with exit or CTRL-d.
  • You can now view the file with less -r mysession.log (it contains line feeds, escape sequences etc., so a simple text viewer will probably display garbage). You can even print it with lpr(1). Or simply display it on the terminal with cat mysession.log.

An even cooler feature is that you can replay a script with the correct timing information:

  • First you have to also record the timing information using the -t switch: script -t 2>mysession.timing mysession.log.
  • You can then replay the script: scriptreplay mysession.timing mysession.log.

See the script(1) and scriptreplay(1) manpages for more details.

—Uwe Hermann

Now you know! Thanks Uwe!

Labels: , ,

8:22 PM | Logging a Terminal Session in Linux with Script

0 comments

Sunday, August 12, 2007

Introduction to Hamachi, Part 1

Hamachi Screenshot: Create a new network

A few months ago, a friend of mine turned me on to Hamachi, but I didn't get around to trying it out until now. Hamachi is a free (as in beer) multi-platform software package for the creation of ad-hoc Virtual Private Networks (VPNs).

To truly appreciate Hamachi, you have to understand the problems with traditional VPNs. The short of it is that VPNs have traditionally been:

This is where Hamachi comes in. Hamachi is as close to the "Holy Grail of VPNs" as I have seen. Hamachi solves in spades virtually all of the problems with traditional VPNs:

Hamachi Security Architecture: 2 peers with connections to mediation server

The best explanation of how Hamachi works is the Hamachi Security Architecture description, but it basically boils down to Hamachi using the same public key cryptography that made personal cryptography feasible.

My Mileage, YMMV

My personal experience with Hamachi has been extremely positive. I have created VPNs and made connections successfully under several different conditions, including through a proxied Internet connection. One of Hamachi's nicer features is its ability to create multiple networks on one machine. Because of its peer-to-peer model you can, in effect, configure multiple VPNs to multiple computers (up to 64 separate networks with the free version).

In "Introduction to Hamachi, Part 2," I will be addressing the Hamachi Linux client, so stay tuned...

More Reading & Resources...

Labels: , , ,

4:54 AM | Introduction to Hamachi, Part 1

0 comments

Wednesday, August 08, 2007

xkcd: Linux User at Best Buy

xkcd comic

xkcd. Great comic.

Labels: ,

4:32 AM | xkcd: Linux User at Best Buy

0 comments

Sunday, July 29, 2007

OLPC News 2007-07-28

"Free Drop: Mary Lou Jepsen and Quanta reviewed all the 10-point free-drop data that we have been collecting over since December 2006. The units are dropped on all corners, all side bumpers, and front and back. Initially, we had dropped onto plywood, but this spring we made the test tougher: we have been dropping on a hard steel plate, with and without a carpet. B4 units pass a 150cm 10-point drops onto a carpet-covered steel plate; a 105cm simulated slanted-desk 'slide' onto a steel plate; and a 80cm 10-point free drop onto a steel plate. The laptop, when dropped on the antennas, withstands a 150cm drop. To put these data into perspective: a standard laptop only passes a 45cm 10-point drop on plywood (a much softer material than steel)."

I am consistently impressed by the engineering on the One Laptop Per Child systems. The system is the "greenest" laptop yet, consistently passes and exceeds torture tests, and boasts some of the most advanced wireless engineering available for laptop clients. Oh, and it boasts one of the most inexpensive price points for any portable computing device.

Labels: , ,

4:33 AM | OLPC News 2007-07-28

0 comments

Monday, June 25, 2007

Crash Course in Slackware

Slackware Linux

If you are interested in learning Linux, Slackware is the way to go. And, if you're interested in getting a jump start on Slackware, Chess Griffin—creator of the Linux podcast "Linux Reality"—has a great (audio) crash course in Slackware Linux.

Check out these other Slackware resources as well...

Slackware Official Resources
Reference

Other respectable, trustworthy resources....

Labels: ,

6:49 PM | Crash Course in Slackware

0 comments

Monday, June 18, 2007

Your Computer is a Heater. No, Really.

"Computer Sauna" (c) Jazza2
"Believe it or not, the average desktop PC wastes nearly half the power delivered to it."

I have seen articles over the years about Google's interest in the power efficiency of PCs but this is the first I have seen their initiative formalized. It is good to see, too, that this extends down into the "user space," and is not simply a corporate initiative for Big Business. So many of these kinds of programs are launched as marketing campaigns and then there is a long, drawn-out wait before any real, tangible results materialize, if at all. But then, I shouldn't be surprised. It has always been the Google way to not just "Do no evil," but to "First do, then say," and I respect them greatly for this.

As a system administrator, you are probably interested in the efficiency of your power supplies, what you can do to participate and how your infrastructure can change.

Personally, I find the prospect intriguing, and not just from a "Green" perspective. Computers are hot, noisy, and inefficient. Nothing bugs geeks more than inefficiency. OK, few things.... Back in the day, you might have entertained the idea of turning your systems off on a schedule, but now it is just out of the question. On the other hand the idea of all of your servers just hemorrhaging heat and electrical power is just as annoying. Add to it that in most cases you combat this by pounding these systems with cold air and venting the hot... all this entropic nightmare just expending even more energy. I look forward to checking power supply inefficiency off my list of hardware annoyances.

Now if Google would just come up with a Silence Savers Computer Initiative.

More information

Labels: , ,

4:41 AM | Your Computer is a Heater. No, Really.

0 comments

Friday, June 15, 2007

Notes for Slackware on the Dell Inspiron 5150

I have recently overhauled one of my laptops with Slackware 11 and am again picking my quest for a fully-functioning, full-documented configuration.

One of the first items on my list is power management. If you are (un)lucky enough to have purchased a Dell Inspiron 5150, then you are aware of the chronic overheating issues. As a start I found this PDF with some helpful information on loading the ACPI sensors in Slackware using a custom rc.acpi script: Inspiron 5150: Making the most of Linux.

The follow are also some good resources for information on how to install Linux on the Dell Inspiron 5150:

Of course, the obvious thing to keep in mind is that, while these sources provide plenty of good information on what works or does not, the instructions pertain to the specific distribution. The is still plenty of information to be gleaned, however. My ultimate goal is to get all of the hardware features, including function keys, special hardware switches, power management, wireless, et al. to work and fully document both the process of installation and the configurations themselves.

Stay tuned...

Labels: , ,

9:41 AM | Notes for Slackware on the Dell Inspiron 5150

0 comments

Google Groups
Subscribe to treehead.net
Email:
Visit this group

treehead.net blogs

treehead elsewhere