Archive

Archive for May, 2014

Shutdown and Restart Application Script

May 7, 2014 Leave a comment

This is a script to shutdown and restart an application (i.e. jboss) on windows.
It also renames the application generated log file(s).

taskkill /f /t /fi “WINDOWTITLE eq 3 Scheduler”

for /F “tokens=1,2” %%d in (‘date /T’) do set day=%%d & set date=%%e
set yyyy=%DATE:~6,4%
set mm=%DATE:~3,2%
set dd=%DATE:~0,2%
set dateserial=%yyyy%-%mm%-%dd%
ren “D:\logs\scheduler\scheduler.log” %dateserial%-scheduler.log

start /min “3 Scheduler” cmd /c “D:\scheduler\bin\run.bat”

Exit

-Eric

Note: I found the base script from here

How to create RDM (Raw Device Mapping) on ESXi host

May 5, 2014 Leave a comment
  1. Run fdisk -l to see all the disks available to ESXi host.
  2. Run /dev/disks/ -l to find out VML ID, which will be used in the command to create RDM.
  3. Create a folder (i.e. RDMs) for mapping file(s) on the DataStore
  4. Create the mapping files with LSILogic controller using the following command
    vmkfstools -r /vmfs/devices/disks/vml.01000000002020202020202020202020205733383132564439535431303030 RDM1.vmdk -a lsilogic
    Two mapping files (RDM1.vmdk and RDM1-flat.vmdk) were created. (Note: file appears to your total disksize but it actually takes no space).
  5. Go to your VM and add the mapping file as a second disk. Select the option existing disk and point to the RDM1.vmdk file.

-Eric

Source: vm-help

Day Against DRM

May 5, 2014 Leave a comment

Tomorrow is International Day Against DRM. I noticed that one of my favourite book publishers is running a campaign to celebrate it. Only for 24 hours all of their content is available for $10 – thats all 2000+ ebooks and Videos. Go take a look at http://bit.ly/1q6bpha

-Eric

Categories: Random