About Pages in Google Chrome

You can get some interesting information out of these if you pop then into Google Chrome: about:crash about:memory about:stats about:histograms about:dns about:version about:network about:internets about:cache
Read more →

Thin Provisioning Disks in ESX

Log in over SSH and run: vmkfstools -c 50G -d thick /vmfs/volumes/san/vm/thick.vmdk vmkfstools -c 50G -d thin /vmfs/volumes/san/vm/thin.vmdk A ls will show: 50G thick-flat.vmdk 373 thick.vmdk 50G thin-flat.vmdk 398 thin.vmdk However a du will show: 50G thick-flat.vmdk 64K thick.vmdk 1.0M thin-flat.vmdk 64K thin.vmdk Which is, I think, rather neat…
Read more →

Sniffing Network Traffic in ESX

If you want to enable promiscuous network sniffing within a vSwitch the safest way to do it is to create a second port group. Promiscuous mode can be enabled on an existing port group but once this has been done, any device connected to that port group has that ability. Once you have your second port group correctly configured you can attach a monitoring appliance. To do my monitoring I tend to use OpenBSD with tcpdump and then use Wireshark to analyse the data.
Read more →

Sysinternals Live from Powershell

Sysinternals Live is a service that enables you to execute Sysinternals tools directly from the Web without hunting for and manually downloading them. dir \live.sysinternals.com\tools\ | fw -Column 4
Read more →

A Basic Traceroute in Scapy

ans,unans=traceroute(['www.google.co.uk','www.yahoo.com','www.microsoft.com']) ans ans.graph(target="> /tmp/graph.svg")
Read more →

SU on ESX

When you su in ESX you may find that you can not run the usual commands. This may be down to environmental variables, use: su - This will change the environmental variables to the new user.
Read more →

Searching Active Directory

This is a quick way to search Active Directory from the cmd line: dsquery user -name * -limit 0 Just pop the name or name + wildcard where the * is. If you want to reduce the output to the relative distinguished name then just add: dsquery user -name * -limit 0 -o rdn
Read more →

Running Programs over SSH

This is by far the best thing to use when you are running programs that take a while to complete. The danger is that you lose your SSH connection and your program along with it. Use the following to start a screen session: screen This generates a screen session that can be detached from by pressing: ctrl + a d At this point you can safely close down the SSH session.
Read more →

Matching Multiple Strings in Grep

Syntax: grep -E (string|string2) *
Read more →

How to Send Email from the Command Line in Windows

Blat is the way forward. Blat is a small, efficent SMTP command line mailer for Windows. It is the SMTP sending part of an eMail User Agent (MUA) or eMail client. As such, Blat sends eMail via SMTP (or internet eMail) from the command line, or CGI, … blat 1.txt -t [email protected] -attach 1.bmp -base64 -html This will include the contents of 1.txt in the body of the email and attach the file 1.
Read more →