Sunday, August 31, 2008

How to mute the windows beep....

This is height of plagiarism. I am copy pasting a blog.. without mentioning its name..., on how to mute the windows beep.
The steps are;
1. Right-click on My Computer
2. On the Hardware tab, click on [Device Manager]
3. On the "View" menu, select "Show hidden devices"
4. Under "Non-Plug and Play Drivers", right-click "Beep"
5. Click "Disable"
6. Answer [Yes] when asked if you really want to disable it
7. Answer [No] when asked if you want to reboot
8. Right-click "Beep" again.
9. Click "Properties"
10. On the "Driver" tab, set the Startup type to Disabled
11. Click [Stop]
12. Click [OK]
13. Answer [No] when asked if you want to reboot
For preventive measures you can also go to the registry.. and try out.
HKEY_CURRENT_USER\Control Panel\Sound
Find the "Beep" key on the right-hand side and change the value to "no".
Now pray once for its windows.. u never know.. if it would work... :)

Ok suppose it worked...
I have a case.. and i have no idea. i am working on a remote machine.. if i off the beep it would off the beep of that remote machine hardware.. and i am not the administrator of the system through which i remotely access the 'beep' machine..Solutions ??????

Friday, August 29, 2008

Linux Commands....

As the whole blog remains a very unsystematic representation of My learning.... @PS@Lexington Tower @Oracle @ 4A068,4A064...4A083... we will infact have this unsystematic schema recursively in the blogs also..

So, as we learn we will update the blog... Now, this is called Freedom.

Today my mentor gave me his site link, which had the as u learn, so as u dump...schema... in his website.
The link is : http://www.zulfilee.net/

Now comes the worst part.. knowledge which is jst not structured.

1. We get the system call nos. in /usr/include/asm/unistd.h. So adding a new system call we need to append an entry here.

2. We have ftp to get and put files in another system. now this file transfer protocol is quite comman.. I was just going thru net and found something called ncftp. ncftp gives additional features as bookmarking the folder u visited to get or put something. The bookmarks are kept in the location $HOME/.ncftp/bookmark.file.

So what is nc. A bit of research just got me to a blog which said nc may stand for netcat. Netcat is a very fundamental tool. FTP is very easy to handle.. u do ftp mks.us.oracle.com or ftp 172.11.111.111 and you are prompted to enter user id and password . then u do cd to the location and then use bi for binary mode.. hash to show hashes as the file is being copied.. and then u do mget or mput..or just get or put.

But this is the application level of things.. FTP is an application which works on the principal or the fundamental layer of netcat which is a utility . something like a c code is first converted into an assembly language code. so these two are analogous.
try doing nc in the shell and type HELP. we get a no of basic commands so all operations are first written in terms of these basic commands and then assembly code and binary code which is executed then but the user sees is the ftp command. mget and mput.. so thanks to nc for making life easy... !!!



We talk of more here.. but this time a bit more systematic......(we will have them numbered :) )
1. To list the ports being used with the process we can use the command
              netstat -anp 
     Now to search for a given port we can use a pipe..and say
             netstat -anp|grep "port no." (without quotes.)


Saturday, August 23, 2008

How to find out if OS is 64 bit or 32 bit......

1. If it were windows its the most simple thing is to see into the properties of the system. Obviously these values shown in the property list are taken from the registry. The info is listed in the
HKEY_LOCAL_MACHINE/HARDWARE/Description.
2. On a linux machine if you login into the machine(may be using a putty), the description of the machine is displayed. else a simple command uname -a should do.
3.On an AIX machine things become a bit bitter. The uname thing doesnt work. So we have another command there which is:
bootinfo -K (It gives the kernal info if its 32 bit or 64 bit).
Now theres a link to the most basic commands in AIX,which shud'nt be left at home when u r at work on AIX machine. Link is: http://www.ibm.com/developerworks/aix/library/au-dutta_cmds.html

Ok, back to our topic of discussion.

4. Solaris gives answer to the same question by the command:
/usr/bin/isainfo -kv

5. Now if the problem is somehow to identify inside a code what platform its running on and then if its 32 bit or 64 bit might be difficult.
Ok, here we will make a simple assumption. And this is what makes things different for this blog...
we have a small program.A C code:

#include
printf("the integer pointer is of size %d",sizeof(int *));

Now the integer pointer for a 32 bit compiler will be 4 byte size.. and for a 64 byte compiler.
Again we are not addressing here the question we arose earlier that is if the system is 32 bit or 64 bit. but we have talked if the compiler is 32 bit or 64 bit.

So if the answer we get here is 8 , its sure to be a 64 bit compiler which will run on a 64 bit system. But if we get the answer as 4, we are not really sure of.

------------------------------------------------------------------------------------------------
Editing this information after i got some new info..... regarding the discussion

so write any C program anywhere in the system..
Then just compile it. as gcc filename.c
And then do readelf -a a.out

This gives the whole description of the symbol table. and the register usage. Just look at the address of any register there. You will get 0x<16> ... here is an answer.. each char in hex needs 4 bits to represent . If its 16digit no, this is 64 bit addressable memory. means a 64 bit machine... so the compiler helped in tracing the architecture.
Though i checked it in a Linux 32 and 64 bit machine.. it should do with all unix version.. :)



Saturday, August 16, 2008

The Great ASM installation on NT ...


ASM stands for Automatic Storage Management, an option provided in the Oracle Installations. In layman terms an ASM concept can be understood analogous to RAID concept in Operating System scenario, where we have redundant array of disks to provide high availability (in the sense that we have a backup for information retrieval with minimum loss).
So the first step to an ASM installation is:

1. Install a normal oracle database software. A 10.2.0.1 version software install will do.

2. Now if it were a normal installation of a database we would have done a Netca and Dbca installation after the software installation. Here we will go for the as usual netca installation but we need to configure few things before going for a dbca installation.

3. We first goto the bin directory of the installed oracle database software and call the asmtool.exe to create the raw disks(we need more than 1 disks to secure information , as in RAID).
The asmtool can be prompted by cmd on Windows. as:
asmtool.exe -create
eg. C:\\bin> asmtool -create C:\[oracle_home]\Disk1 1024

4. Now we set in a system environment variable OSM_INSTALL_TEST to true.

5. The next level is starting a css service. CSS stands for Cluster Synchronization Service.
It is configured to start every time the system boots. This daemon process is required to enable synchronization between Oracle ASM and database instances. It must be running if an Oracle database is using ASM for database file storage.
It can be initiated by calling "localconfig.bat add" from the bin directory of ur oracle home.

6.Now we go for dbca. The last step. The dbca can be called from the bin directory of oracle home(like the netca, the bin contains netca.bat and dbca.bat and many more.....) .
When you call dbca. it gives option to configure the ASM. click and proceed. At the end it tries to mount the available disk (for us its Disk1 we created above). Going to Create Disk , we supply the path of the Disk1 but it fails........ it does not find the disk.. the problem comes here... Its smooth sailing in Linux but our concern is Windows.
The problem here is a system variable OSM_INSTALL_TEST value is not reflected. The easiest solution is to reboot or restart the explorer. But in some scenarios that's not what is required.
In a testing scenario where the farm jobs need to be automated, a reboot will create more issues.

7. So, drilling deep into the OSM_INSTALL_TEST value and from where it is read by the dbca.. took a week time to finally figure out the solution.
We need to put value in the Registry location [HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_]
"OSM_INSTALL_TEST"="true".
and this works.... :) now no reboot required for ASM installation

P.S. : The article will be useful only to those going for a silent installation of the software....