View Multiple esxtop Outputs Side-by-Side

The Problem

I often use esxtop to review realtime performance metrics of various aspects of my virtual infrastructure.  One annoying thing is that I cannot view multiple ESX hosts in a single esxtop session.  That would be such a nice feature to have, really.

The Solution

My solution is to use Linux screen command to accomplish side-by-side viewing of multiple esxtop output windows.
Screen does not come with ESX(I) but I have access to the ESX hosts from one of my management servers that runs a Linux distribution and has screen installed.  So I use PuTTy to access the Linux management server, and then from there launch screen and create two windows to then ssh to my ESX servers.

How I Did It

SSH to my Linux server and start screen.

  1. Created two windows (Ctrl-a c)
  2. Named each window (Ctrl-a A) ESX#
  3. Split the window vertically in screen (Ctrl-a |)
  4. On the first split, I SSH’d to the first ESX box
  5. Then Ctrl-a Tab to get to the second region of my vertical split
  6. Issue Ctrl-a 1 to access screen window #2
  7. SSH to second ESX server and run esxtop command.
Ctrl-a Anew window
Ctrl-a nnext window
Ctrl-a pprevious window
Ctrl-a Ssplit terminal horizontally
Ctrl-a |split terminal vertically
Ctrl-a :resizeresize current region
Ctrl-a :fitfit screen size to new terminal size
Ctrl-a :removeremove region
Ctrl-a tabmove to next region
Ctrl-a Aset window title
Ctrl-aselect window from list
esxtop
esxtop in screen with vertical window split for side-by-side viewing of 2 ESX server’s esxtop output

Linux Permissions Primer

You may ask yourself when on your own Linux system or come across a blog what linux rw rw r means?  The following primer can help you answer that.  In short, this means User has read/write, Group has read/write and Other has read permissions to whichever file or folder this access is set for.

Ownership

Every file on your Linux system, including directories, is owned by a specific user and group. File permissions are defined separately for users, groups, and others.

User

The username of the person who owns the file. By default, the user who creates the file will become its owner.

Group

The usergroup that owns the file. All users who belong into the group that owns the file will have the same access permissions to the file. This is useful if, for example, you have a project that requires a bunch of different users to be able to access certain files, while others can’t. In that case, you’ll add all the users into the same group, make sure the required files are owned by that group, and set the file’s group permissions accordingly.

Other

A user who isn’t the owner of the file and doesn’t belong in the same group the file does. In other words, if you set a permission for the “other” category, it will affect everyone else by default. For this reason, people often talk about setting the “world” permission bit when they mean setting the permissions for “other.”

Access Permissions

There are three types of access permissions on Linux: read, write, and execute. These permissions are defined separately for the file’s owner, group and all other users.

Read (r)

On a regular file, the read permission bit means the file can be opened and read. On a directory, the read permission means you can list the contents of the directory.

Write (w)

On a regular file, this means you can modify the file, aka write new data to the file. In the case of a directory, the write permission means you can add, remove, and rename files in the directory. This means that if a file has the write permission bit, you are allowed to modify the file’s contents, but you’re allowed to rename or delete the file only if the permissions of the file’s directory allow you to do so.

Execute (x)

In the case of a regular file, this means you can execute the file as a program or a shell script. On a directory, the execute permission (also called the “search bit”) allows you to access files in the directory and enter it, with the cd command, for example. However, note that although the execute bit lets you enter the directory, you’re not allowed to list its contents, unless you also have the read permissions to that directory.

None (-)

No permission is specified by using a hyphen.
Here’s a run down of what the first character could be in any output of ls -l:
d = directory
= regular file
l = symbolic link
s = Unix domain socket
p = named pipe
c = character device file
b = block device file
For permissions, here are the character representations and possibilities:
r = read permission
w = write permission
x = execute permission
= no permission

Example

drw-rw-r-x 2 root root 4096 Oct 31 10:18 test

“test” is a directory with Owner and Group belonging to root.  Permissions for Owner are read and write, and permissions for group are read and write and permissions for Other are execute.

-rw-rw-r-- 2 user1 devs 4096 Oct 10 09:32 linux

“linux” is a file with Owner (user1) having read/write permission, Group (devs) having read/write permission and Other having read permissions.

Few notes on vim diff

Start up diff: vimdiff or vim -d (requires full install not vim-tiny)
If you load up two files in splits (:vs or :sp), you can do :diffthis on each window and achieve a diff of files that were already loaded in buffers
:diffoff can be used to turn off the diff mode.
do – Get changes from other window into the current window.
dp – Put the changes from current window into the other window.
]c – Jump to the next change.
[c – Jump to the previous change.
Ctrl W + Ctrl W – Switch to the other split window.

BIND DNS Security Hole Workaround

There has been a recent discovery that affects BIND DNS servers.

A nameserver can be locked up if it can be induced to load a specially crafted combination of resource records.  CVE-2012-5166

To check your version, issue:

named -v

Affected BIND DNS server versions:

  • 9.2.x -> 9.6.x
  • 9.4-ESV->9.4-ESV-R5-P1
  • 9.6-ESV->9.6-ESV-R7-P3
  • 9.7.0->9.7.6-P3
  • 9.8.0->9.8.3-P3
  • 9.9.0->9.9.1-P3

Upgrading to one of the following corrects the problem

  • 9.7.7
  • 9.7.6-P4
  • 9.6-ESV-R8
  • 9.6-ESV-R7-P4
  • 9.8.4
  • 9.8.3-P4
  • 9.9.2
  • 9.9.1-P4

You can also work around the issue by setting a view or global option and setting minimal-responses to yes.

Access remote disk over net using SFTP protocol and map it to local drive letter – SFTP Net Drive

SFTP Net Drive lets you create a virtual drive on your local computer that will expose the remote file system accessible via SFTP protocol.

http://www.eldos.com/sftp-net-drive/
I have found this tool invaluable. It comes in handy when you want to work on development remotely and don’t want the hassle of setting up SAMBA between your mixed Linux/Windows environment.  Oh, and it’s FREE.  =)
SFTP Net Drive for:

  • Windows XP
  • 2003 Server
  • Vista
  • 2008 Server
  • Windows 7
  • 2008 Server R2

32-bit and 64-bit platforms are supported.