Linux Blog

CPU Flags and Meanings

Filed under: General Linux — TheLinuxBlog.com at 11:38 pm on Tuesday, August 11, 2009

Having a brain that is somewhat comparable to a sift for remembering acronym’s, I’m always asking a friend which (I, probably incorrectly call) CPU extension is for virtualization. So I figured I’d blog about this topic. This page CPU feature flags and their meanings clearly explains each of the flags that may be on your machine, which you can check what your CPU supports by typing:

cat /proc/cpuinfo | grep flags

Secure Virtual Machine. (AMD’s virtualization extensions to the 64-bit x86 architecture, equivalent to Intel’s VMX, both are also known as HVM in the Xen hypervisor.)

So to answer my own question SVM and VMX are what to look for when considering a CPU for virtualization. My laptop supports VMX, but my desktop doesn’t. Considering I’d rather do my virtualization on my desktop, I’ll have to upgrade my CPU. Now all I need to do is find out where to find this information for AMD processors and hope I can get a CPU for my outdated socket type. I don’t even think that it is AM2 :(

SSH Escape

Filed under: General Linux — TheLinuxBlog.com at 2:27 pm on Tuesday, September 2, 2008

You can get into a special area of SSH that you by using the SSH Escape key sequence.It can be set at the connection time to a custom character but if you didn’t set one it is probably set to the Tilda (~). To open the SSH Escape dialog to manage your connection (I assume you know what you want to do, but your wondering how you use it)

Its simple to use; just hit shift, then the back tick (`) to get the Tilda (~) then type the command you want to use.

For example to pull up the SSH Escape dialog help up you use the question mark (?) so do the following:

[owen@Linux_Blog ~]$ ~?
Supported escape sequences:
~.  - terminate connection
~B  - send a BREAK to the remote system
~C  - open a command line
~R  - Request rekey (SSH protocol 2 only)
~^Z - suspend ssh
~#  - list forwarded connections
~&  - background ssh (when waiting for connections to terminate)
~?  - this message
~~  - send the escape character by typing it twice
(Note that escapes are only recognized immediately after newline.)

For more information on the SSH Escape Sequence check out the SSH Man Page

Post By: Owen From: TheLinuxBlog.com

Automatically reconnecting to a host

Filed under: Shell Script Sundays — TheLinuxBlog.com at 9:15 pm on Sunday, August 17, 2008

If you follow me on Twitter: http://www.twitter.com/LinuxBlog then you may know that I regularly update a bunch of Linux PC’s and servers. Now, since I’m sort of lazy and don’t like manually doing anything I don’t have to I thought I’d post the one liner I use to automatically reconnect to a host.

while ! ping -W 1 -c 1 [hostname or IP] 2>&1 >/dev/null; do true; done && sleep 15; ssh [user]@[hostname or IP]

This script uses the ping command to ping the server once (-c 1) with the timeout of 1 second (-W 1) ping a host or IP with a timeout of one second. Once the ping loop is broken (ping returns true) I let it sleep for 15 seconds to enable SSH to come up. Then the inevitable happens. I use SSH to reconnect to the host.

There you have it, a quick way to reconnect to a host without typing the command or pressing the up arrow every time. Enjoy!