Restarting the Management agents on an ESXi or ESX host

From the Local Console or SSH:

  1. Log in to SSH or Local console as root.
  2. Run these commands:

    /etc/init.d/hostd restart
    /etc/init.d/vpxa restart

    Note: In ESXi 4.x, run this command to restart the vpxa agent:

    service vmware-vpxa restart

    Alternatively:

  • To reset the management network on a specific VMkernel interface, by default vmk0, run the command:

    esxcli network ip interface set -e false -i vmk0; esxcli network ip interface set -e true -i vmk0

    Note: Using a semicolon (;) between the two commands ensures the VMkernel interface is disabled and then re-enabled in succession. If the management interface is not running on vmk0, change the above command according to the VMkernel interface used.

  • To restart all management agents on the host, run the command:

    services.sh restart

    Caution:

  • Check if LACP is enabled on DVS for version 5.x and above. For more information, see vSphere 5.0 Networking Guide.
  • If LACP is not configured, the services.sh script can be safely executed.
  • If LACP is enabled and configured, do not restart management services using services.sh script instead restart independent services using /etc/init.d/module restart command.
  • If the issue is not resolved, and you have to restart all the services that are a part of the services.sh script, take a downtime before proceeding to the script.

    Note: For more information about restarting the management service on an ESXi host, see Service mgmt-vmware restart may not restart hostd in ESX/ESXi (1005566).

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003490

Android recording a device screen

$ adb shell screenrecord /sdcard/demo.mp4
$ adb shell
shell@ $ screenrecord --verbose /sdcard/demo.mp4
(press Ctrl-C to stop)
shell@ $ exit
$ adb pull /sdcard/demo.mp4
http://developer.android.com/tools/help/adb.html#screenrecord

Create the Start/stop Script on Ubuntu

sudo cp /etc/init.d/skeleton /etc/init.d/mydaemon
sudo chmod +x /etc/init.d/mydaemon
sudo vi /etc/init.d/mydaemon
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Description of the service"
NAME=daemonexecutablename
DAEMON=/usr/bin/$NAME
DAEMON_ARGS="--options args"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

Install Daemonize on ubuntu

$ git clone git://github.com/bmc/daemonize.git

$ sh configure
$ make
$ sudo make install

Install C Compiler on Ubuntu

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install build-essential
$ gcc -v
$ make -v