tag:blogger.com,1999:blog-88533073985997056622024-02-19T05:37:19.879-08:00Shayan De SilvaShayan De Silvahttp://www.blogger.com/profile/05727804340604107986noreply@blogger.comBlogger16125tag:blogger.com,1999:blog-8853307398599705662.post-1584906281646002702015-09-16T21:26:00.001-07:002015-09-16T21:27:19.370-07:00<h2>
<span style="font-family: Verdana, sans-serif;">Setting up Windows 2012 R2 server as Session Host server without installing a full RDS farm</span></h2>
<br />
If you are looking to setup a simple remote desktop session host server on windows 2012 R2 server like you were able to do in Windows 2008 R2 Server or pervious versions continue reading this article.<br />
<br />
<strong><u>Pre-requisites</u></strong><br />
A valid Remote desktop License server<br />
<br />
<strong><u>Here's a high-level process.</u></strong><br />
<br />
1. Stand up a Windows 2012 R2 server<br />
<br />
2. Install the Remote Desktop Services Session Host Server role from the server manager.<br />
<br />
3. Once a Windows 2012 R2 server is setup with the Session Host remote desktop services role (Remember to restart after the installation), go to Windows Registry.<br />
<br />
4. Update the value of "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\Licensing Core\LicensingMode" to "2" for per device or "4" per user<br />
<br />
5. Create a Multi_SZ value under "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TermService\Parameters\LicenseServers" with the name "SpecifiedLicenseServers" and specify the FQDN of the license server as the value. i.e. RDLicense.abc.com<br />
<br />
6. Restart the Server<br />
<br />
7. Open RD Licensing Diagnoser from Administrative Tools > Remote desktop<br />
<br />
8. It should not show any problems.Shayan De Silvahttp://www.blogger.com/profile/05727804340604107986noreply@blogger.com0tag:blogger.com,1999:blog-8853307398599705662.post-87759325009770454962012-05-03T17:29:00.003-07:002012-05-03T17:31:33.006-07:00Monitoring and Systems Management<div style="font-family: "Trebuchet MS",sans-serif;">
<span style="font-size: small;">I have been evaluating opensource software applications for Network and System Monitoring for quite a sometime. As most of the organizations do not authorise budget for monitoring software and the preasure is often put on IT to deal with the uptime SLA's. </span></div>
<div style="font-family: "Trebuchet MS",sans-serif;">
<br /></div>
<div style="font-family: "Trebuchet MS",sans-serif;">
<span style="font-size: small;">I evaluated Nagios, Icinga and Zenoss. Icinga is a fork of nagios and is backward compatible. Zenoss on the other hand has two versions community version for free and Enterprise verion at a cost. Icinga and Zenoss community version has its own pros and cons. </span></div>
<div style="font-family: "Trebuchet MS",sans-serif;">
<br /></div>
<div style="font-family: "Trebuchet MS",sans-serif;">
<span style="font-size: small;">However, Zenoss has a appealing interface with integration to goolgle maps and is equiped with real time graphs. Zenoss also have numerous plugins (zenpacks) that supports different hardware models. Most of all zenoss is agentless !!!. Which makes it a more prudent option in a data centre environment. The application owners wouldn't want any other software agents installed on the servers and agents cannot be installed without the concent from the application vendors. Therefore the agentless option is the way forward. Icinga on the other hand needs a agent to be installed does't provide out of the box performance graphs.</span></div>
<div style="font-family: "Trebuchet MS",sans-serif;">
<span style="font-size: small;"><br /></span></div>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">Both softwares are good but the goal was to find the best out of the best. In my humble opinion the winer is Zenoss. The zenoss VMware appliance makes it easy easy to start and run zenoss withing minutes!!!</span></span><br />
<br />Shayan De Silvahttp://www.blogger.com/profile/05727804340604107986noreply@blogger.com0tag:blogger.com,1999:blog-8853307398599705662.post-58927858290399715312011-10-16T20:41:00.000-07:002011-10-16T20:44:17.296-07:00Oracle IAS SSL "Page Cannot be Displayed" error on IE<span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;">I have been strugling for a while trying to figure out a strange issue with a SSL certificate. </span><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;">The web site in concern runs on Oracle IAS and the SSL certificate is setup on oracle wallet manager. It was</span><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"> previously configured to use a self-signed certificate and it worked on all the browsers (IE, FireFox, Chrome, etc...). However, after setting up a VeriSign EV certificate the web site did not load on some Windows XP IE browsers (IE6, IE7 and IE8). All the other browsers did not have any problem loading the web site. My first guess was that it was an issue with Microsoft patches related to VerSign EV (Extended Validation) since the web site was loaded after installing all the windows patches on the PC's that had the issue. Yet, as the website was accessed by outsiders we had to find a solution that does not require any changes to client computers. Thanks to google, I found the below document which described the exact problem and the solution.</span><br />
<span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="color: #009933; font-family: 'Trebuchet MS', sans-serif;"><span class="Apple-style-span" style="line-height: 15px;"><a href="http://www.ru.nl/publish/pages/528719/oraclewalletmanager_.doc">www.ru.nl/publish/pages/528719/oraclewalletmanager_.doc</a></span></span><br />
<span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"><br />
</span>Shayan De Silvahttp://www.blogger.com/profile/05727804340604107986noreply@blogger.com0tag:blogger.com,1999:blog-8853307398599705662.post-18519441003956147462011-07-18T21:21:00.000-07:002011-10-09T20:19:45.739-07:00Enabling VNC on Centos/Redhat<div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">Few of my friends asked how to enable VNC access to Linux servers (RHEL/CENTOS). Therefore, I thought it would be helpful to provide the easiest way I figured out to configure VNC server. </span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><br />
</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">1. open a ssh session to the server</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><br />
</div><div style="color: black; font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">2. <span class="Apple-style-span" style="border-collapse: separate; color: blue; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span class="Apple-style-span" style="line-height: 19px;">vi /etc/sysconfig/vncservers</span></span></span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">uncomment the lines that starts with VNCSERVERS= and VNCSERVERARGS[2]</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">modify the user ID with the user ID you wish to provide access ("root"). exit vi editor.</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><br />
</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">3. enter <span style="color: blue;">vncpasswd</span> and provide a password for VNC access</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><br />
</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">4. Start and stop VNC Server so that the xstartup file will get created.</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">enter <span style="color: blue;">vncserver :2</span> to start VNC Server</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">enter <span style="color: blue;">vncserver -kill :2</span> to kill the vnc server</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><br />
</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">5. vi xstartup</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">uncomment the 2 lines that start with unset SESSION... and exec /etc...</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><br />
</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">6. enter <span style="color: blue;">/sbin/chkconfig</span><span style="color: blue;"> vncserver on</span> command to start the service on boot.</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><br />
</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">7. open a VNC client and enter the <IP>:2 then you'll ask for the password set under step 3. </span></div>Shayan De Silvahttp://www.blogger.com/profile/05727804340604107986noreply@blogger.com0tag:blogger.com,1999:blog-8853307398599705662.post-32860061337493342342011-07-11T22:30:00.000-07:002011-07-16T07:25:28.061-07:00Extending VLAN cpabilities to VMWare<div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">I have been looking for a solution to have multiple VLANs on the VMWare ESXi server. The server which was allocated to the VMs had only 4 NIC's and we had to setup virtual servers from 5 VLANs. The solution was described in the VMWare ESXi documentation as well. The terminology is called VST (Virtual Switch Tagging).</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><br />
</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">Since we had 4 NIC ports we connected 3 links from the switch as trunk ports (dot1q, need to make the switch configuration) initially. The other port is kept for the VMWare ESXi management access. This is important to setup the VST in the ESXi server via the vSphere client. Once the ESXi is setup you can include this port also to the NIC load balance team. Following is the list of activities to perform.</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><br />
</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">Connect to the ESXi server via vSphere Client</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">Select the server from the left pane and Navigate to the configuration tab</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">Click on networking under hardware pane</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">Then click properties > select the VM Network and hit edit</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">On General tab, change VLAN ID to All(4095) </span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">Navigate to NIC Teaming tab and tick the load balancing and select the first option from the drop down list</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">Click OK and exit</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">Now click on Add and create VLAN ID's for Virtual Machine traffic for each VLAN (You need to get the VLAN ID's from the network personnel)</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><br />
</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">Now you can assign these to relevant virtual machine for connectivity to their respective VLAN's</span></div>Shayan De Silvahttp://www.blogger.com/profile/05727804340604107986noreply@blogger.com0tag:blogger.com,1999:blog-8853307398599705662.post-67775996601085562972011-07-11T20:31:00.000-07:002011-07-11T20:31:01.113-07:00VMWare P2V conversion Windows XP Activation issue<div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">We were executing a plan to convert all our physical windows XP boxes that are kept inside the server room for various non critical operations on to virtual hosts. At one point we were looking at consolidation options. However, due to the complexity and lack of documentation on implementing the systems made us go into a virtualization option. The physical virtual transition was some what smooth with VMware vCenter Converter Standalone Client (free version). The main challenge we faced was the windows activation issue once the virtual host is started. It didn't allow us to login to the computer at all and we were at a dilemma. </span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><br />
</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">Fortunately, I was able to find a solution for the issue. The reason we faced this issue is due to the OEM licenses installed on the physical machines. When the HW was changed the license need to be reactivated which created a need to purchase licenses. Once the license was purchased we had to follow the following to activate windows,</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><br />
</div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">On the virtual host </span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">Login to the Safe mode</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">execute the following command on run,</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">rundll32.exe syssetup,SetupOobeBnk</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">reboot the host</span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"> now you have 30 days to activate windows......</span></div>Shayan De Silvahttp://www.blogger.com/profile/05727804340604107986noreply@blogger.com0tag:blogger.com,1999:blog-8853307398599705662.post-75287568246298875862011-05-19T21:17:00.000-07:002011-05-19T21:29:19.687-07:00Automating windows Backups with error reporting<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Most organizations are tryng to move out from NTbackup for better managed backup software solutions. However, the legacy software applications and the cost involved in implementing a managed backup solution have forced the organizations to use ntbackups.</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">One of the biggest challenges faced in automating ntbackup is the error reporting functionality. By default, ntbackup does not support error handling. In otherwords, it cannot execute set of instructions upon error. Therefore, a workaround is necessary to overcome the situation. I was thinking all possible solutions and felt the following as the best suitable solution,</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Read the backup log file and count the number of "Backup completed" text. "Backup completed" is written to the logfile for each folder/drive backup item it backups. Therefore, if the count is not equal to the number of folder/drive backup items you could come to a conclusion that there is some issue with the backup.</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Following is a sample backup script used for the automation,</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;">@echo off</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;">echo %date% %time%</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;">echo Initiate backup job</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;">C:\WINDOWS\system32\ntbackup.exe backup "@C:\SCRIPTS\DAILY.bks" /t "Friday_File_SVR_BKP" /n "Friday_File_SVR_BKP" /d "Friday_File_SVR_BKP" /v:no /r:no /rs:no /hc:on /SNAP:off /m normal /j "Friday_File_SVR_BKP" /l:s</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;">echo Copy last backup job log to a seperate folder for the emailing purpose.</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;">set srcDir=C:\Documents and Settings\itops\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;">set destdir=C:\Scripts</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;">set lastmod=</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;">pushd "%srcDir%"</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;">for /f "tokens=*" %%a in ('dir /b /od 2^>NUL') do set lastmod=%%a</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;">if "%lastmod%"=="" echo Could not locate files.&goto :eof</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;">echo "%lastmod%"</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;">copy "%lastmod%" "%destDir%"\backup.log</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;">echo if the backup job is unsuccessful send the log via email (7 is the count of backup items)</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;">for /f "tokens=3" %%f in ('find /c /i "Backup completed" "C:\Scripts\backup.log"') do set isComplete=%%f</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;">if %isComplete% LSS 7 C:\Scripts\sendEmail.exe -f <from email> -t <to email> -s 192.168.1.2:25 -u <email subject withing quotes> -m <email body withing quotes> -a "C:\Scripts\backup.log"</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;">:eof</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;">echo </span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;">echo %date% %time%</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;">echo ----------END------------</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="color: blue;">echo </span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Hope the article will help you to save your valuable time spent going through the logs to ensure the backup is successful !!! Cheers!!!</span>Shayan De Silvahttp://www.blogger.com/profile/05727804340604107986noreply@blogger.com0tag:blogger.com,1999:blog-8853307398599705662.post-48108270139145070782011-05-08T20:12:00.000-07:002011-05-08T20:15:26.040-07:00Sri Lanka's two of the giant mobile service providers introduce 4G<div style="font-family: Verdana,sans-serif;"><span style="font-family: Verdana,sans-serif; font-size: small;">4G is the fourth generation of cellular wireless standards. It is a successor to the 3G.</span></div><div style="font-family: Verdana,sans-serif;"><br />
</div><span style="font-family: Verdana,sans-serif;">Technological advancement is a key determinant of countries economic growth.</span>Shayan De Silvahttp://www.blogger.com/profile/05727804340604107986noreply@blogger.com0tag:blogger.com,1999:blog-8853307398599705662.post-58447049355756561632011-05-02T20:41:00.000-07:002011-05-03T23:07:00.573-07:00Command Line tool for image conversion<div style="font-family: Verdana,sans-serif;"><span style="font-size: small;">I have been looking for a command line freeware to convert images in a folder. After an extensive google search I found an amazing tool. It can convert, compress and have great features. You could download the tool from the following web site.</span></div><span style="font-family: Verdana,sans-serif; font-size: small;"><br />
<a href="http://www.leadtools.com/utilities/default.htm"> </a></span><br />
<span style="font-family: Verdana,sans-serif; font-size: small;"><a href="http://www.leadtools.com/utilities/default.htm">http://www.leadtools.com/utilities/default.htm</a><br />
<a href="http://www.leadtools.com/utilities/default.htm"> </a></span>Shayan De Silvahttp://www.blogger.com/profile/05727804340604107986noreply@blogger.com0tag:blogger.com,1999:blog-8853307398599705662.post-85936285234784157792011-04-18T23:13:00.000-07:002012-10-03T19:58:25.555-07:00Sri Lanka launches sltime.org<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;"><br />
This web site will display the Sri Lanka's Standard time. The main objective behind this valuable initiative is to minimize difficulties faced due to contradicting times displayed by organizations in the country.<br />
<br />
Lets configure our organizations websites, PC, servers, etc... to sync with sltime.org ntp server.</span></div>
<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;"><br />
Follow the following steps in an windows active directory environment. <br />
</span><br />
<ol>
<li><span style="font-size: small;">First, Locate your Primary Domain Controller (PDC). Open the command prompt and type,<i> <span style="color: blue;">netdom /query fsmo</span> </i>(Netdom is a ntreskit tool which can be downloaded FOC)</span></li>
<li><span style="font-size: small;">Log in to your PDC Server.</span></li>
<li>Check time difference between your server and the NTP server <span style="color: blue;">w32tm /stripchart /computer:sltime.org /samples:5 /dataonly</span></li>
<li><span style="font-size: small;">Stop the W32Time service: <i style="color: blue;">net stop w32time</i></span></li>
<li><span style="font-size: small;"> Configure the external time source/s, type <i><span style="color: blue;">w32tm /config /syncfromflags:manual /manualpeerlist:sltime.org /Update</span></i></span></li>
<li><span style="font-size: small;"> Make the PDC a reliable time source, type <i><span style="color: blue;">w32tm /config /reliable:yes</span></i></span></li>
<li><span style="font-size: small;"> Start the w32time service, type <i><span style="color: blue;">net start w32time</span></i><br />
The windows time service will begin synchronizing the time. You could query the details trough <i style="color: blue;">w32tm /query /peers</i>,<span style="color: blue;"> </span><i style="color: blue;">w32tm /query /status</i> commands.</span></li>
<li>Optionaly execute <span style="color: blue;">w32tm /resync to do an immediate sync</span></li>
<li><span style="font-size: small;"> Check the Event Viewer for any errors.</span></li>
</ol>
</div>
<div style="font-family: Verdana,sans-serif;">
<br /></div>
<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;">Note: You might have to add/modify firewall rule/s to allow ntp access to sltime.org from your network. </span></div>
<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;"><br />
</span></div>
<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;">Congratulations !!! You are now in sync with the sltime.org ntp server.</span></div>
<div style="font-family: Verdana,sans-serif;">
<span style="font-size: small;"><br /></span></div>
Shayan De Silvahttp://www.blogger.com/profile/05727804340604107986noreply@blogger.com0tag:blogger.com,1999:blog-8853307398599705662.post-27004423314706812102011-04-11T00:09:00.000-07:002011-04-11T01:08:54.728-07:00How to format a report in MS word 2007/2010<div style="font-family: Verdana,sans-serif; text-align: justify;"></div><div></div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;">For the benefit of my MBA friends, I thought of writing an article on how to create table of contents (TOC) and use of page numbering for different sections in a report. (Steps are for MS Office 2007, I believe it’s the same for Office 2010)</div><div style="text-align: justify;"></div><h1 style="color: #3d85c6; font-family: Verdana,sans-serif; text-align: justify;"><span style="font-size: large;">1.<span style="font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span>Prepare the styles for the headings</span></h1><div style="text-align: justify;"></div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;">On the home tab, in the styles group right click on <i>heading 1</i> and click <i>modify</i> to open the Modify Style dialog box, change the formatting of the heading from here (Font, font size, etc...). If you want to have numbering for the headings (ex: 1. Introduction, 2. Literature Survey, 3. Critical Evaluation, etc...), click on <i>format</i>, click <i>numbering</i> and select a appropriate numbering format. Click <i>OK</i> to apply the settings.</div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><br />
</div><div style="text-align: justify;"></div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;">Follow the same procedure for rest of the sub headings (Heading 2, heading 3, heading 4, and the list goes on)</div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><br />
</div><div style="text-align: justify;"></div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;">If a heading style is not shown in the style group on the home tab, suppose if heading 3 is not shown, click on the down most arrow (refer below screen-shot, button inside red colour square shape) and click <i>apply style</i>. Type the style name you want, in this case Heading 3, click <i>modify</i> for formatting and modify the formatting as you wish.</div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><br />
</div><div class="separator" style="clear: both; font-family: Verdana,sans-serif; text-align: justify;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirkcXtlhA2okcxvpMdQJNQi3YCuWOxaeHfcAOCppgIcLZ7t6LvCzcWc3m8xrYly09H4PvdYQI5dPruwr-b2HamYCp1aWy1v83i21LKs3GuoQq-bFu6GgcYQAKp1OTpQregxsDWgvQxPLPR/s1600/1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="55" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirkcXtlhA2okcxvpMdQJNQi3YCuWOxaeHfcAOCppgIcLZ7t6LvCzcWc3m8xrYly09H4PvdYQI5dPruwr-b2HamYCp1aWy1v83i21LKs3GuoQq-bFu6GgcYQAKp1OTpQregxsDWgvQxPLPR/s400/1.jpg" width="400" /></a></div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><br />
<div style="color: #3d85c6;"><b><span style="font-size: large;">2. Change text styles of the headings</span></b></div><br />
Select the text you wish to make as a heading and select the appropriate heading type from the styles group on the home tab. Repeat this procedure for all the headings in your report.<br />
</div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"></div><h1 style="color: #3d85c6; font-family: Verdana,sans-serif; text-align: justify;"><span style="font-size: large;">3.<span style="font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span>Insert Table of Contents</span></h1><div style="text-align: justify;"></div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;">Once you have marked all the headings with appropriate styles, click on the beginning of the report, on the page layout tab, in the page setup group, click on <i>breaks</i> and select <i>next page</i> option. </div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvfczbluEANKV1EE83T4USvD8RhTmQwJHx_JSz3PB-A0WA8GshdtVt48Gspd0X3jdBj2SoJooJww28aPgOYn17zDYcx_Ica7xdTpX8vFYHvgXhhxYUT_jCIe1Fxob5jS7EoMLKf92wNRy1/s1600/2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="340" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvfczbluEANKV1EE83T4USvD8RhTmQwJHx_JSz3PB-A0WA8GshdtVt48Gspd0X3jdBj2SoJooJww28aPgOYn17zDYcx_Ica7xdTpX8vFYHvgXhhxYUT_jCIe1Fxob5jS7EoMLKf92wNRy1/s400/2.jpg" width="400" /></a></div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><br />
</div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><br />
</div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;">Then on the reference tab, click on t<i>able of contents</i> click on <i>insert table of contents</i>, if you wish you could do formatting for the table of content from here. Click <i>OK</i> to create the table of contents.<br />
<br />
Once the table of contents is created, you could right click on it, click Update field, select <i>entire table</i> and click <i>OK</i> to update the TOC with what ever the changes you make after the first creation.</div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><br />
</div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"></div><h1 style="color: #3d85c6; font-family: Verdana,sans-serif;"><span style="font-size: large;">4.<span style="font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span>Format page numbers differently in different sections of a document</span></h1><div class="MsoNormal" style="font-family: Verdana,sans-serif;">Suppose if you were to use roman numerals for the page numbering before introduction page (Title page, Table of contents, etc…) and use Arabic numerals for rest of the pages.</div><div class="MsoNormal" style="font-family: Verdana,sans-serif;"><br />
</div><div class="MsoNormal" style="font-family: Verdana,sans-serif;">Since a section break was inserted before creating the table of contents, now there are two sections in the report.</div><div class="MsoNormal" style="font-family: Verdana,sans-serif;"><br />
</div><div class="MsoNormal" style="font-family: Verdana,sans-serif;">On the<i> insert</i> tab, in the header and footer group click on <i>page number</i> and select <i>format page numbers</i>. Then select Roman numeral format. Again click on <i>page number</i> and select <i>bottom of page</i> and choose a format, on the design tab, navigation group click on <i>next section</i> and then click on <i>link to previous</i>. </div><div class="MsoNormal" style="font-family: Verdana,sans-serif;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBpETDUNC1jyhyphenhyphenRmoL2KN2tcRw52nV4W6Zy1goaiueDKRVHL5nr94jmO8t9xIm5m210zTiztFDKHVVU_p6L0iUMmnaKt7oXwITB05ZPqi2_ki9uFvj2ehFctBGTDFHGMLRdfMbisU59uQk/s1600/3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="52" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBpETDUNC1jyhyphenhyphenRmoL2KN2tcRw52nV4W6Zy1goaiueDKRVHL5nr94jmO8t9xIm5m210zTiztFDKHVVU_p6L0iUMmnaKt7oXwITB05ZPqi2_ki9uFvj2ehFctBGTDFHGMLRdfMbisU59uQk/s400/3.jpg" width="400" /></a></div><div class="MsoNormal" style="font-family: Verdana,sans-serif;"><br />
</div><div class="MsoNormal" style="font-family: Verdana,sans-serif;">Then click on the <i>page number</i> again in the header and footer group, click on <i>format page numbers</i>, select Arabic number format, select <i>start at</i> option and type<i> 1</i> and click <i>OK, </i>click <i>close Header and footer</i> to exit from designer<i>.</i> </div><div class="MsoNormal" style="font-family: Verdana,sans-serif;"><br />
</div><div class="MsoNormal" style="color: #3d85c6; font-family: Verdana,sans-serif;"><b><span style="font-size: large;">5. Insert a title page</span></b></div><div class="MsoNormal" style="font-family: Verdana,sans-serif;"><br />
</div><div class="MsoNormal" style="font-family: Verdana,sans-serif;">On the insert tab, in the pages group, click on <i>Cover Page</i> and select a suitable design. Enter details as you wish.</div><div class="MsoNormal" style="font-family: Verdana,sans-serif;"><br />
<br />
</div><div class="MsoNormal" style="font-family: Verdana,sans-serif;">Congratulations you have done it !!!! </div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><br />
</div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><br />
</div><div style="text-align: justify;"></div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><br />
</div><div style="text-align: justify;"></div><div style="font-family: Verdana,sans-serif; text-align: justify;"></div>Shayan De Silvahttp://www.blogger.com/profile/05727804340604107986noreply@blogger.com0tag:blogger.com,1999:blog-8853307398599705662.post-61205569997576128582011-04-07T20:22:00.000-07:002011-04-08T03:52:22.570-07:00IE 8 issue running oracle forms application with jinitiator<div style="font-family: Verdana,sans-serif;"><span style="font-size: small;">I have been having trouble with IE 8 with our company's main application which runs on oracle forms with jinitiator. After an extensive google search, i was able to find a much needed workaround and a solution.</span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><br />
</span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: small;">Workaround - Replace the <span style="color: blue;">C:\Program Files\Oracle\JInitiator <version>\bin\hotspot\jvm.dll</span> with Sun's JRE version <span style="color: blue;">C:\Program Files\Java\jre <version>\bin\client\jvm.dll</span> (these folder location are the default ones, change it to suite your environment. Make a backup before you replace).</span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><br />
</span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: small;">Solution - Oracle forms to use JRE and not jinitiator. </span><br />
<span style="font-size: small;"><a href="http://blogs.oracle.com/stevenChan/2008/12/reminder_migrate_your_jundefinediator_clients_to_sun_jre_now.html">http://blogs.oracle.com/stevenChan/2008/12/reminder_migrate_your_jundefinediator_clients_to_sun_jre_now.html</a> </span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><br />
</span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><br />
</span></div>Shayan De Silvahttp://www.blogger.com/profile/05727804340604107986noreply@blogger.com0tag:blogger.com,1999:blog-8853307398599705662.post-9744173197727125012011-04-07T02:44:00.000-07:002011-04-08T03:52:06.876-07:00How ATMs Work?<div style="font-family: Verdana,sans-serif;"></div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"></div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><span style="font-size: small;"><br />
</span></div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><span style="font-size: small;">This is a very interesting process, initially I didn’t have a clue about how an ATM works. The technology behind the machine is pretty simple except the security concepts behind it. I will not go into the details of security techniques in this article perhaps on another. </span></div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><span style="font-size: small;">Here’s how the process flows,</span></div><div class="separator" style="clear: both; font-family: Verdana,sans-serif; text-align: center;"><span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSxYwBXw-_118ZE1YqwMuCCglMlA5WZLU-KM7-PhgyectBA2zwxLzB_vpTZ-QDAlseWaXvbr5mWDLcE7eEuWKJUWwuHkeQR0lQ9vPixMB3Oq_-HJqMvxUw-4ANj-Xp008uQjvtl-vKC8LG/s1600/125.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="229" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSxYwBXw-_118ZE1YqwMuCCglMlA5WZLU-KM7-PhgyectBA2zwxLzB_vpTZ-QDAlseWaXvbr5mWDLcE7eEuWKJUWwuHkeQR0lQ9vPixMB3Oq_-HJqMvxUw-4ANj-Xp008uQjvtl-vKC8LG/s320/125.jpg" width="320" /></a></span></div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><span style="font-size: small;"><br />
</span></div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><span style="font-size: small;">There are two main categories of transactions initiated from an ATM,</span></div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><span style="font-size: small;"><b>ONUS</b> – Card and ATM from same </span><span style="font-size: small;">financial institute </span><span style="font-size: small;">(Ex: HSBC ATM card on HSBC Bank’s ATM)</span></div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><span style="font-size: small;"><b>OFFUS</b> – Card and ATM from different financial institutes (Ex: HSBC VISA enabled ATM card on Standard charted VISA enabled ATM)</span></div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><span style="font-size: small;"><br />
</span></div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><span style="font-size: small;"><u><b>Detailed transaction flow of an ATM </b></u>(ATM screen flow could change from ATM to ATM. Therefore this is a generic flow almost all ATMs are based on) </span></div><ol style="font-family: Verdana,sans-serif;"><li><span style="font-size: small;"><b>ONUS</b></span><span style="font-size: small;"><b> -</b>Customer inserts a card to the ATM > Enters the PIN > transaction > select the account > enter other required details for the transaction (Ex: for a withdrawal, withdrawal amount)</span><span style="font-size: small;">Then a message will be generated and sent to the ATM switch (PIN is encrypted) > ATM switch will send the encrypted PIN to the HSM > HSM will respond whether its correct or not > If the PIN is incorrect transaction will get voided and the customer will be asked to enter the PIN again > If the PIN is correct the transaction will be forwarded to the Core Banking System > The Core Banking System will check the customer account and approve or disapprove the transaction > if the transaction is disapproved a message will be shown on the ATM screen, mostly a descriptive message > if the transaction is approved the switch will instruct the ATM how to proceed (Ex: for a withdrawal the switch will tell the ATM to dispense number of bill from Bins). </span><span style="font-size: small;">Apart from the above process there will be additional messages between the ATM machine and the ATM switch. This is to get a list of accounts attached for the card. This is not available in OFFUS transactions. Therefore, customers will be able to transact from their primary accounts only (One account for Savings and one account for current)</span></li>
<li><span style="font-size: small;"><b>OFFUS-</b>Another banks customer inserts a ATM card > The ATM switch will forward the transaction to VISA network > the VISA network will do the necessary currency conversions and forward it to the issuing bank</span></li>
</ol><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><span style="font-size: small;"><br />
</span></div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><span style="font-size: small;"><br />
</span></div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><span style="font-size: small;"><b><br />
</b></span></div><div class="MsoNormal" style="font-family: Verdana,sans-serif; text-align: justify;"><span style="font-size: small;"><br />
</span></div>Shayan De Silvahttp://www.blogger.com/profile/05727804340604107986noreply@blogger.com0tag:blogger.com,1999:blog-8853307398599705662.post-42456116213332242922011-04-07T00:03:00.000-07:002011-04-08T03:51:51.316-07:00mget new files from a FTP<span style="font-size: small;"><span style="color: blue; font-family: "Courier New",Courier,monospace;"><span style="color: black; font-family: Verdana,sans-serif;">The following batch script will get <b>new</b> files from a ftp server. </span></span></span><br />
<span style="font-size: small;"><br />
</span><br />
<span style="font-size: small;"><span style="color: blue; font-family: "Courier New",Courier,monospace;"><span style="color: black; font-family: Verdana,sans-serif;">The actual scenario is, </span></span></span><br />
<span style="font-size: small;"><span style="color: blue; font-family: "Courier New",Courier,monospace;"><span style="color: black; font-family: Verdana,sans-serif;">A file is generated from application server A and needs to be uploaded to application server B. </span></span></span><br />
<span style="font-size: small;"><br />
</span><br />
<span style="font-size: small;"><span style="color: blue; font-family: "Courier New",Courier,monospace;"><span style="color: black; font-family: Verdana,sans-serif;">Flow of the operation,</span></span></span><br />
<ol><li><span style="font-size: small;"><span style="color: blue; font-family: "Courier New",Courier,monospace;"><span style="color: black; font-family: Verdana,sans-serif;">Create a ftp connection to application server A</span></span></span></li>
<li><span style="font-size: small;"><span style="color: blue; font-family: "Courier New",Courier,monospace;"><span style="color: black; font-family: Verdana,sans-serif;">Generate a list of files to upload to application server B</span></span></span></li>
<li><span style="font-size: small;"><span style="color: blue; font-family: "Courier New",Courier,monospace;"><span style="color: black; font-family: Verdana,sans-serif;">Dynamically generate a ftp script to mget and rename each file. (This is required as ftp doesn't allow rename or move with wild cards)</span></span></span></li>
<li><span style="font-size: small;"><span style="color: blue; font-family: "Courier New",Courier,monospace;"><span style="color: black; font-family: Verdana,sans-serif;">Backup logs and files transferred for debug purposes</span></span></span></li>
</ol><span style="font-size: small;"><span style="color: blue; font-family: "Courier New",Courier,monospace;"><span style="color: black; font-family: Verdana,sans-serif;"></span><br />
<span style="font-family: Verdana,sans-serif;">echo "=================Begin======================"</span></span></span><br />
<div style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><span style="color: blue;">echo %date% %time%</span></span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><span style="color: blue;">Rem Connect to the ftp server and get a list of files to be transfered. </span><br style="color: blue;" /><br style="color: blue;" /><span style="color: blue;">Rem The following command with execute the commands in "list_of_commands.txt" text file on the x.x.x.x ftp server. Refer List of commands heading below for a sample.</span><br style="color: blue;" /><span style="color: blue;">echo Generate a list of files to transfer. </span><br style="color: blue;" /><span style="color: blue;">ftp -s:list_of_commands.txt x.x.x.x > ftp.log</span><br style="color: blue;" /><br style="color: blue;" /><span style="color: blue;">Rem Following will check the size of the file. If there is no data (no file listed) the size is zero.</span><br style="color: blue;" /><span style="color: blue;">echo check whether there are any files to transfer. If no files to transfer delete temporary files.</span><br style="color: blue;" /><span style="color: blue;">FOR /F "usebackq" %%A IN ('filelist.txt') DO set size=%%~zA</span><br style="color: blue;" /><span style="color: blue;">if %size% EQU 0 (</span><br style="color: blue;" /><span style="color: blue;"> echo No file to transfer. Deleting temporary files</span><br style="color: blue;" /><span style="color: blue;"> del ftplist.txt</span><br style="color: blue;" /><span style="color: blue;"> del ftp.log</span><br style="color: blue;" /><span style="color: blue;"> goto :eos</span><br style="color: blue;" /><span style="color: blue;">)ELSE (</span><br style="color: blue;" /><span style="color: blue;"> echo Files found to be transferred to Swift.</span><br style="color: blue;" /><span style="color: blue;">)</span><br style="color: blue;" /><br style="color: blue;" /><span style="color: blue;">Rem The following will generate a ftp script dynamically based on the file list.</span><br style="color: blue;" /><span style="color: blue;">echo Generate ftp command file to transfer swift msgs.</span><br style="color: blue;" /><span style="color: blue;">>copy_FTP_Files.txt echo username</span><br style="color: blue;" /><span style="color: blue;">>>copy_FTP_Files.txt echo password</span><br style="color: blue;" /><span style="color: blue;">>>copy_FTP_Files.txt echo cd directory path</span><br style="color: blue;" /><span style="color: blue;">>>copy_FTP_Files.txt echo prompt n</span><br style="color: blue;" /><span style="color: blue;">>>copy_FTP_Files.txt echo ascii or binary</span><br style="color: blue;" /><span style="color: blue;">Rem The following for script will go through the list of files names in the filelist text file and generate mget and rename commands.</span><br style="color: blue;" /><span style="color: blue;">for /f %%U in (filelist.txt) do (</span><br style="color: blue;" /><span style="color: blue;">>>copy_FTP_Files.txt echo mget %%U</span><br style="color: blue;" /><span style="color: blue;">>>copy_FTP_Files.txt echo rename %%U %%U.sent</span><br style="color: blue;" /><span style="color: blue;">)</span><span style="color: blue;"> </span></span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><span style="color: blue;">>>copy_FTP_Files.txt echo bye</span></span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><br />
</span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><span style="color: blue;">execute command to upload file to application B </span></span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><br style="color: blue;" /><span style="color: blue;">Rem Execute ftp commands generated from the above step.</span><br style="color: blue;" /><span style="color: blue;">Echo Execute the dynamically generated ftp commands on the ftp connection.</span><br style="color: blue;" /><span style="color: blue;">ftp -s:copy_FTP_Files.txt x.x.x.x >> ftp.log</span></span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><br />
</span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><span style="color: blue;">Rem Backup files for debug purposes. </span></span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><span style="color: blue;">echo Create a folder based on date time<br />
SET DD=%DATE:~7,2%<br />
SET MM=%DATE:~4,2%<br />
SET YYYY=%DATE:~10,4%<br />
SET HH=%TIME:~0,2%<br />
SET MN=%TIME:~3,2%<br />
SET SS=%TIME:~6,2%<br />
<br />
SET FOLDER="%YYYY%-%MM%-%DD%_%HH%-%MN%-%SS%"<br />
mkdir folder path\%FOLDER%<br />
<br />
echo Move swift files copied to fromsymbols drirectory to the folder created with current date and time.<br />
move list of files mget to </span></span><span style="font-size: small;"><span style="color: blue;">folder path\%FOLDER%</span></span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><span style="color: blue;">move ftplist.txt </span></span><span style="font-size: small;"><span style="color: blue;">folder path\%FOLDER%</span></span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><span style="color: blue;">move ftp.log </span></span><span style="font-size: small;"><span style="color: blue;">folder path\%FOLDER%</span></span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><span style="color: blue;">move copy_FTP_Files.txt </span></span><span style="font-size: small;"><span style="color: blue;">folder path\%FOLDER%</span></span><span style="font-size: small;"><span style="color: blue;"> </span></span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><span style="color: blue;"><br />
</span></span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><span style="color: blue;">:eos<br />
echo %date% %time%<br />
Echo "=================end======================"</span></span></div><span style="font-size: small;"><span style="color: blue; font-family: "Courier New",Courier,monospace;"><br />
</span></span>Shayan De Silvahttp://www.blogger.com/profile/05727804340604107986noreply@blogger.com0tag:blogger.com,1999:blog-8853307398599705662.post-47222339154368631182011-04-06T22:46:00.000-07:002011-04-08T03:51:37.997-07:00I believe experience is education !!!<span style="font-family: Verdana,sans-serif; font-size: small;">Experience is the best teacher what do you think?</span>Shayan De Silvahttp://www.blogger.com/profile/05727804340604107986noreply@blogger.com1tag:blogger.com,1999:blog-8853307398599705662.post-24036593170000864662011-04-06T05:48:00.000-07:002011-04-08T03:51:03.874-07:00Shell Script to get a data file based on date via FTP<div style="font-family: Verdana,sans-serif;"><span style="font-size: small;">FTP from a AIX server and get a file based on date. Cool scripted tested extensively. It works like a charm.</span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: small;"><br />
</span></div><div style="color: blue; font-family: Verdana,sans-serif;"><span style="font-size: small;">TIME=$(date +%k%M)<br />
DAY=`/bin/date +%Y%m%d`<br />
echo $DAY</span></div><div style="color: blue;"><span style="font-size: small;"><span style="font-family: Verdana,sans-serif;">file_name=Prefix_${DAY}_suffix</span><br style="font-family: Verdana,sans-serif;" /><span style="font-family: Verdana,sans-serif;">echo "File name to pick " $file_name</span><br style="font-family: Verdana,sans-serif;" /><br style="font-family: Verdana,sans-serif;" /><span style="font-family: Verdana,sans-serif;">src_ip="x.x.x.x"</span><br style="font-family: Verdana,sans-serif;" /><span style="font-family: Verdana,sans-serif;">src_user="user name"</span><br style="font-family: Verdana,sans-serif;" /><span style="font-family: Verdana,sans-serif;">src_password="password"</span><br style="font-family: Verdana,sans-serif;" /><span style="font-family: Verdana,sans-serif;">dir_path="Directory path of the file to pick"</span><br style="font-family: Verdana,sans-serif;" /><br style="font-family: Verdana,sans-serif;" /><span style="font-family: Verdana,sans-serif;">#!/bin/csh</span><br style="font-family: Verdana,sans-serif;" /><br style="font-family: Verdana,sans-serif;" /><span style="font-family: Verdana,sans-serif;">ftp -n $src_ip << EndFTP</span><br style="font-family: Verdana,sans-serif;" /><span style="font-family: Verdana,sans-serif;">user $src_user $src_password</span><br style="font-family: Verdana,sans-serif;" /><span style="font-family: Verdana,sans-serif;">cd $dir_path</span><br style="font-family: Verdana,sans-serif;" /><span style="font-family: Verdana,sans-serif;">bin</span><br style="font-family: Verdana,sans-serif;" /><span style="font-family: Verdana,sans-serif;">hash</span><br style="font-family: Verdana,sans-serif;" /><span style="font-family: Verdana,sans-serif;">mget $file_name</span><br style="font-family: Verdana,sans-serif;" /><span style="font-family: Verdana,sans-serif;">EndFTP</span></span></div>Shayan De Silvahttp://www.blogger.com/profile/05727804340604107986noreply@blogger.com0