Skip to main content

Posts

Showing posts with the label UNIX

Command to know the incoming network connections,transmitting data to server in unix

Command   to know the incoming network connections in unix   to know a command which would help knowing the incoming network connections through(from & to) different ip-address:ports netstat -anp | grep "port" | grep "process" Transmitting data to server through code in linux int no_of_bytes_to_send; char* buffer[100]; no_of_bytes_to_send=sizeof(buffer); while(no_of_bytes_to_send>0) { int byte_send = send(sd,buffer,no_of_bytes_to_send); no_of_bytes_to_send = no_of_bytes_to_send - byte_send; buffer+=byte_send; }

What are the disadvantages of select() on unix

What are the disadvantages of select() on unix One traditional way to write network servers is to have the main server block on accept(), waiting for a connection. Once a connection comes in, the server fork()s, the child process handles the connection and the main server is able to service new incoming requests. With select(), instead of having a process for each request, there is usually only one process that "multi-plexes" all requests, servicing each request as much as it can. So one main advantage of using select() is that your server will only require a single process to handle all requests. Thus, your server will not need shared memory or synchronization primitives for different 'tasks' to communicate. One major disadvantage of using select(), is that your server cannot act like there's only one client, like with a fork()'ing solution. For example, with a fork()'ing solution, after the server fork()s, the child process works with the client

what is the difference between spfile or pfile

what is the difference between spfile or pfile An spfile and a pfile are both init parameter files. The pfile is a readable text file which you can edit directly in Notepad (Windows) or vi (Unix). The pfile's name is initSID.ora. The spfile is a binary file, which means it can't be edited directly (if you try to edit it directly, it'll corrupt the file). The spfile can only be modified by using the "alter system" command. The spfile's name is spfileSID.ora. The spfile is useful to have because it lets you dynamically make changes to some parameters, whereas the pfile does not - you will need to shutdown and start up the instance for any changes you make in the pfile to be applied.