Wednesday, April 6, 2011

Capturing and replaying console/terminal sessions with script and scriptreplay

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.

Sunday, April 3, 2011

VMware Tools installation cannot be started manually while Easy Install is in progress.

I created a Virtual Machine using VMWare's Workstation version 7. I did not install the tools right away, and I think that because of a hurry I really did not pay attention during the install, so I think I installed it using the simple mode, maybe not. Not that is bad doing it that way, but I never usually do it that way.

Whatever happened, later, when I went to install the tools, I got this message:
"VMware Tools installation cannot be started manually while Easy Install is in progress."

Now, I did not have time to do extensive research. One web site said something about the floppy drive config. I did find something referring to simple mode floppy, but removing it from the config file did not help.

Here is the quick simple way I fixed it: Delete the *.vmx config file. Then create a new machine but point it to the same folder. You will get a "warning" about creating a machine in the same folder as an existing machine, but no worry. Just make sure you use an "existing disk", and point it to the original.

This fixed it for me and it only took me a few minutes.

How to use DiskSpd to simulate Veeam Backup & Replication disk actions

This HOW-TO contains information on how to use Microsoft© DiskSpd to simulate Veeam Backup & Replication disk actions to measure disk pe...