commands to check whether vmware tools installed or not in ubuntu guest & the version

# ps -ef | grep vmware-guestd
root     10213     1  0 15:33 ?        00:00:00 /usr/lib/vmware-tools/sbin32/vmw                                                             are-guestd --background /var/run/vmware-guestd.pid
root     10446 10429  0 15:44 pts/0    00:00:00 grep vmware-guestd

OR

# ps -ef | grep vmware-tools
root     10213     1  0 15:33 ?        00:00:00 /usr/lib/vmware-tools/sbin32/vmware-guestd --background /var/run/vmware-guestd.pid
root     10559 10429  0 15:52 pts/0    00:00:00 grep vmware-tools
# vmware-config-tools.pl -h
Use of uninitialized value $gSystem{"system"} in concatenation (.) or string at                                                              /usr/bin/vmware-config-tools.pl line 2421.
VMware Tools 4.0.0 build-171294 for  configurator
Usage: /usr/bin/vmware-config-tools.pl [[-][-]d[efault]] [[-][-]c[ompile]]
[[-][-]p[rebuilt]] [[-][-]t[ry-modules]] [[-][-]p[reserve]]
[[-][-]o[verwrite][[-][-]m[odules-only]] [[-][-]k[ernel-version] version]
. default: Automatically answer questions with the proposed answer.
. compile: Force the compilation of kernel modules.
. prebuilt: Force the use of pre-built kernel modules.
. try-modules: Try to load all the compatible modules . preserve: Always
preserve user-modified configuration files.
. overwrite: Always overwrite user-modified configuration files.from the VMware
Tools package.
. modules-only: Only build/install kernel modules, skip all other configuration
steps.
. kernel-version: Build/install modules for the given kernel version instead of
the running one, implies modules-only, skip-stop-start and compile.
Command line arguments:  The acceptable characters are:
        the letters A, B, C, ...,
        the letters a, b, c, ...,
        the numbers 0, 1, 2, ...,
        and the special characters '_' and '-' and '='.

# grep buildNr /usr/bin/vmware-config-tools.pl
  my $buildNr;
  $buildNr = '4.0.0 build-171294';
  return remove_whitespaces($buildNr);

Add Swap Partition in Linux/Ubuntu

  Create a 512MB swap file
  #dd if=/dev/zero of=/mnt/new.swap bs=1M count=512
  Change Permission to new.swap
  #chmod 600 /mnt/new.swap
  Formatting that file to create a swapping device:
  #mkswap /mnt/512Mb.swap
  Adding the swap to the running system:
  #swapon /mnt/512Mb.swap
  To check swap info
  #cat /proc/meminfo.
 Making the change permanent, open fstab 
 #  vi /etc/fstab
Add below line at the end of the file and save.
/mnt/new.swap none swap sw 0 0

Change Computer or Host Name in Windows Using Command

Below is the command to rename Computer Name or Hostname in Windows.Changing Computer name will require a reboot. Follow below commands to change computer name and reboot system.

wmic computersystem where name="OLDNAME" call rename name="NEWNAME"
shutdown -r   ---Reboot System
hostname       ----Display Computer Name or Hostname in Windwos  and Linux as well.

check running status & kill services in Windows from command line

tasklist  --- To see the list of running services & PID (Process ID) on Windows from command line.
taskkill --- To kill any running services on Windows from command line
  1. Go to Start > Run, then type CMD and press Enter.
  2. In the Command Prompt window type any of the above commands(taskkill,tasklist) and press enter key
Ex: taskkill /PID 1412 /PID 139 /T /F  ---- To kill running service
above command will kill process id 1412 and 139 forcefully 
/T -Tree kill
/F -forcefully

Fastest way of transferring files between 2 server's over network in Linux

Fastest way of transferring files between 2 server's over network in Linux

-- SCP :  It showed 20MB/sec
-- FTP : Requires ftp installed id/password  : 40MB/sec
-- NetCAT : Might work if netcat is installed.  : 60MB/sec      
   source : tar -cvzf /dir/ |netcat -l 7777
   client :  netcat source_ip:7777 |tar -xvzf path

-- Using Python / WGet  : 80MB/sec

Server:
 # cd $folder_have the file
 # Start python webserver with this command.
 python -m SimpleHTTPServer
Client :
 wget -c http://Server IP:8000/$file
-c will recover from a file break if something broke half way.


Convert Windows Physical System to Virtual Using disk2vhd

Disk2vhd is a tool that creates VHD (Virtual Hard Disk - Microsoft's Virtual Machine disk format) versions of physical disks for use in Microsoft Virtual PC or Microsoft Hyper-V virtual machines (VMs) or Latest KVM Hypervisor.

Steps to Convert Windows 2003 Physical System to VHD format
============================================
1.Download disk2vhd tool from below link into windows server 2003
http://technet.microsoft.com/en-us/sysinternals/ee656415.aspx
2.Extaract Disk2vhd.zip file
3.Run or double click disk2chd.exe, it will pupup a windows with all drives selected.On it select the drive you would like to convert into VHD format. De-select other drives and only keep selected C drive.
For now we need to convert only C Drive, so select only C Drive.Please find enclosed image.
4.At VHD File Name:
Browse a target location where we want to store or save VHD. Make sure we have sufficient space on it.Means we should have free space on target drive as C drive' data size.
5.Click on Create to start conversion process.
6.Once the conversion process completed, click Close to close the tool.

Domain,Tree,Forest & Domain Controller

Domain: Domain is a logical grouping present in the network, in which one or more systems can access one or more shared resources and there is a centralized database.
              All the systems are depend upon the Server carrying the Database.
              Once we created Domain, it logically creates Domain,Tree and Forest 
Tree: Tree is a set of one or more Domains with contiguous names or Collection of multiple Domains.
Root Domain: The first Domain created is the "Root Domain" of the first tree.The first domain that you create in your Active Directoryforest is automatically designated as the forest root domain     
Child Domain: Other Domains in the same domain tree is called Child Domain.
Parent Domain: A Domain immediately above another domain in the same domain tree is it Parent Domain 

Forest: Forest is a collection of multiple Trees.

Domain Controller: The system which maintain Active Directory Service(ADS) is called Domain
Controller.
ADDS: In Windows Server 2008 the Active Directory Service(ADS) is called Active Directory Domain
Service(ADDS).