Seach Makes Easy

Labels:

  • System gets stuck

  • It happens mostly when archive area is overloaded. Run the program brarchive with deletion option to release disk space.
  • Short dump

  • Not always the problem is technical. Try to create all SAPoffice users through transaction SO32 (create all SAPoffice users) and review your application data carefully.
  • Field exits are completely ignored

  • Make sure your SAP profile parameter contains the option abap/fieldexit = yes.
  • Transaction SE16 (table contents) does not work properly

  • Make usage of the menu option to regenerate the display program. You can also try changing key words according to field names. Choose Option -> Parameters users.
  • Rollback segments are too small

  • Before increasing up the rollback segment size you should verify your programs. Very often the problem belongs to them.
  • Files for rollback segments are already enormous

  • Check the rollback segments configuration. It has to match the allocated area on tablespaces. Changes have to be done using Oracle tools.
  • Extended help under windows does not link correctly

  • Check the file sapdoccd.ini under your presentation server. It must be present in the main windows directory and should assign to help files directory.
  • Release procedure with classification does not work

  • As a matter of fact you are not the only one to notice it. It hardly works. Before using release strategy you should apply all notes on OSS. Pray might be useful too.
  • Transport area is overloaded

  • The command tp clearold «SysID» cleans up the transport area according to parameters previously set on the plain file TPPARAM.
  • Instance does not establish communication

  • Shutdown the whole system and check the Interprocess Communication Facilities. Any references should be found. Either the command IPCS (UNIX) or showipc «INSTANCE NUMBER» (SAP) show all message queue, semaphore set and shared memory identifier. Before trying again you have to remove them using the command IPCRM (UNIX) or cleanipc «INSTANCE NUMBER» (SAP).

Labels:

Symptoms

  • No work processes (disp+work.exe) exist in Task Manager.
  • Dispatcher shows status "stopped" in the SAP MMC.
  • Errors found in "dev_disp":
***LOG Q0I=> NiPBind: bind (10048: WSAEADDRINUSE: Address already in use) [ninti.c 1488]
*** ERROR => NiIBind: service sapdp00 in use [nixxi.c 3936]
*** ERROR => NiIDgBind: NiBind (rc=-4) [nixxi.c 3505]
*** ERROR => DpCommInit: NiDgBind [dpxxdisp.c 7326]
*** DP_FATAL_ERROR => DpSapEnvInit: DpCommInit
*** DISPATCHER EMERGENCY SHUTDOWN ***

Problem Analysis
I highlighted the keywords in the error messages above:

  • Address already in use
  • Service sapdp00 in use
The TCP port number assigned in the "services" file is being occupied by another application. Due to the conflict, the dispatcher shuts down.

Solution
If your server has a firewall client, disable it and attempt to start the SAP instance again.
If the instance starts successfully you can enable the client firewall back again.
If there is no firewall client at all, or if disabling it did not resolve the problem, edit the "services" file and check what port the appropriate "sapdp" is using.
If the instance number is 00, look for sapdp00. If the instance number is 01 look for sapdp01 and so on. You can use the following OS command to help you resolve port conflicts:
netstat -p TCP

There are also utilities on the Internet that can help you list all the TCP and UDP ports a system is using.

Labels:

There's probably nothing worse than not being able to start your SAP system … Especially the production system! Aside from the operating system and the database server you must pay close attention to certain places in SAP to find out what caused the problem and how to solve it. Here are the two places you will definitely need to check: EventViewer (Application and System logs) and the SAP Management Console (MMC).

EventViewer can provide useful information and it may help you pinpoint where the problem resides. The SAP MMC gives you the ability to visually see the system status (green, yellow or red lights), view the work processes status and view the developer traces, which are stored in the "work" directory. Example: /usr/sap/TST/DVEBMGS00/work.

For a central SAP instance to start successfully, both the message server and the dispatcher need to start. If one of them or both fail to start, users cannot log in to the system. The following scenarios will illustrate possible causes of why an SAP instance might not start and the reason of the message:
"*** DISPATCHER EMERGENCY SHUTDOWN ***".

Things you need to get familiar with:

  • Developer Traces:
    -- dev_disp Dispatcher developer trace
    -- dev_ms Message Server developer trace
    -- dev_wp0 Work process 0 developer trace
  • The "services" file, which contains TCP and UDP services and their respective port numbers. This plain-text configuration file is located under %winnt%/system32/drivers/etc.
  • Windows Task Manager (TASKMGR.exe).
  • Dispatcher Monitor (DPMON.exe), which is located under /usr/sap//sys/exe/run.
  • Database logs.
  • EventViewer (EVENTVWR.exe).

Labels:

Checklist for troubleshooting SAP server startup:

What to CheckHow to Check ItTips
Network
  1. Make sure that your database is mounted and open.
  2. Use either Control Panel >> Services >> Oracle TNSListener, or the command lsnrctl (preferable) to start the listener service
  3. execute tnsping
  4. execute tp connect (from /usr/sap/trans/bin dir). If it doesn't work, do a tp go to show the environment variables.
Check listener.ora, tnsnames.ora, sqlnet.ora. Using lsnrctl gives more feedback, which is recorded in the file listener.log. Also see sqlnet.log
Database Use svrmgr or sqldba to check database startup and shutdown:
  1. connect internal
  2. shutdown
  3. startup
  1. add the immediate or abort options to shutdown if necessary
  2. divide startup into phases by starting startup nomount, then continuing with alter database mount and alter database open
  3. try alter database recover after a crash or power failure
Applications After successfully starting the database, start the application services (from NT, use the SAP Service Manager). From UNIX, use the startsap r3 script).
  • Check the logs in the directory usr/sap/SID/DVEBMGS/work
  • For NT, make sure the Oracle and SAP Services are started. Also check that the NT service RPC is started and working (test it by adding a new printer; if the first screen shows up, it should be OK).
SAP DB + Applications If both the DB and applications startup are fine when performed separately, try starting them together with the SAP Service Manager (NT) or startsap (UNIX). For NT, the startsap script can be found in usr/sap/SID/SYS/exe/run/strdbs.cmd

Labels:

Procedure

Analysis

Procedure

1) Does the job have a start date?

Display the job’s start date (see Analyzing Job Status)

Does the job have a start date?

Yes: Continue with step 2.

No: Assign the job a start date

End of analysis

2) Does the user who scheduled the job have authorization to release jobs?

Display the authorizations that the user has for background processing (see Analyzing Status, Configuration and Administration Data)

Does he have release authorization?

Yes: Continue with step 3

No: Either give the user release authorization or have the batch administrator release the job.

End of analysis

3) Has the start date been reached?

Yes: Is start date = ‘after Event’ and was the event raised using the sapevt program?

Yes: Check whether sapevt is working (see Analyzing Problems With Events)

– Is sapevt Notifying problems?

Yes: End of analysis

No: Continue with step 4

No: Either wait until the start date is reached or assign the job a new start date (see Analyzing Job Status)

– End of analysis

4) Are the resources necessary for executing the job available?

– Call the graphical job monitor

(see Analyzing ABAP Runtime Problems)

– Does the job have a target server?

Yes: Is there a free background work process on the target server for the job class requested?

Yes: Continue with step 5.

No: Either set up a minimum of one background work process on the target server for the job class (see Analyzing Parts of the Runtime Environment,"Switching between operating modes") or remove the target server from the job definition (see Analyzing Job Status)

– End of analysis

No: Is there at least one host with a free background work process for the job class requested?

Yes Continue with step 5

No: Either wait until a background work process becomes free or set up an additional background work process for the job class (see Analyzing Parts of the Runtime Environment,"Switching between operating modes")

– End of analysis

5) Can the time-controlled or the event-controlled job scheduler be started?

– Does the job have a target server?

Yes:Check the profile parameters of the background processing on the target server (see Analyzing Status, Configuration and Administration Data)

No: Check the profile parameters of the background processing on all job servers (see Analyzing Status, Configuration and Administration Data)

– Are errors evident in the log?

Yes:Fix the problems, e.g. change the profile parameters etc.

– End of analysis

No: Continue with step 6

6) Are there unusual entries in the system log?

– Does the job have a target server?

Yes: Check the system log on the target server for entries (see Analyzing the Work Processes and System Log of an Application Server)

No: Check the system logs of all job servers for entries (see Analyzing the Work Processes and System Log of an Application Server)

– Did you find entries ?

Yes: Can you solve the problem yourself?

Yes: End of analysis

No: Continue with step 7.

No: Continue with step 7.

7) Record the background processing

– Record the component of the background processing which is responsible for starting the job (see Analyzing Parts of the Runtime Environment)

– Analyze the trace information

– Can you solve the problem yourself?

Yes: End of analysis

No: Send the trace to SAP

Labels:

Procedure

Analysis

Procedure

1) Are there error messages in the job log?

– Display the job log (see Analyzing Job Status)

– Are there error messages?

Yes: – View the error message long texts (choose Goto ® Long text)

Due to the large number of different problems which can cause termination of a job, it is not possible here to give a generalized procedure for analyzing the problems. There follows a list of some of the more commonly observed problems:

– A variant of an ABAP program cannot be found, because it has been deleted

– There is a syntax error in an ABAP program

– There is a runtime error in an ABAP program, e.g. divide by zero

– An external program cannot be started (see Analyzing Problems With External Commands and Programs)

No :

Could the problem be solved ?

Yes: End of analysis

No: Continue with step 2

2) Are there unusual entries in the system log?

– Does the job have a target server?

Yes: Check the system log on the target server for entries (see Analyzing the Work Processes and System Log of an Application Server)

No: Check the system logs of all job servers for entries (see Analyzing the Work Processes and System Log of an Application Server)

– Did you find entries?

– Can you solve the problem yourself?

Yes: End of analysis

No: Notify SAP of the problem

Labels:

Procedure

Analysis

Procedure

1) Can job logs be created?

– Perform the following test on all job servers:

– Schedule the job with the target server = name of host on which the job server is running.

For example, you can specify the ABAP program RSPARAM as a step.

Start date of job = ‘Immediate’

– Log on to job server (see Analyzing the Work Processes and System Log of an Application Server)

– Can the job log be displayed (see Analyzing Job Status)?

Yes: End of analysis

No : Continue with step 2

2) Are there unusual entries in the system log?

– Check the system log of the job server (see Analyzing the Work Processes and System Log of an Application Server)

– Are there any ‘permission denied’ entries, which indicate that the job server is not permitted to create a job log?

Yes: Change the access permissions belonging to the directory in which the job log was created, so that the user ID in which the job server is running (generally c11adm) is given read and write permission for the directory

End of analysis

No : Test on the job server whether the TemSe subsystem used for creating job logs is working (see Analyzing Status, Configuration, and Administration Data)

– Does the test report errors?

Yes: You will now find entries in the system log which describe the problem in more detail

End of analysis

No : Continue with step 3

3) Is the job log supposed to be displayed on an application server other than the job server?

– Find out which host the job is to be executed on (see Analyzing Job Status)

– Is the system attempting to display the job log from an application server which is running on a different host than the host on which the job is being executed?

Yes: Do the application server and the job server each have their own global directory?

Yes: - The job log cannot be displayed because the application server cannot access the global directory of the job server. Make the necessary changes so that both servers have the same global directory.

End of analysis

No: Report the problem to SAP

Labels:

Procedure

Analysis

Procedure

1) Is the job really still running?

– Check the status of the job explicitly

(see Analyzing Job Status)

– Is the job still active?

– Yes: To find out what the job is currently doing, you can ‘capture’ it (see Analyzing Job Status). However, this only works for ABAP programs that are executed as job steps. It is not possible to analyze external programs in this way. For an external program, the check if it is still active must be made at the operating system level.

– Is the job waiting for an external program that is being executed in the job to be terminated?

Yes: Check whether the user SAPCPIC exists in the client in which the job is running (see Analyzing Status, Configuration and Administration Data)

No: continue with step 2

2) Was the job server restarted while the job was still running?

– Find out the start time and the execution host of the job (see Analyzing Job Status)

– Find out from the system log of the job server when the job server was last started.

– Is the start time of the job server after the start time of the job?

– Yes:

– The Job Server was restarted while the job was running. The runtime environment of the background processing system was not able to update the job status in the database.

– You can manually set the job status to aborted (see Analyzing Job Status)

– End of analysis

– No: Contact your SAP consultant.

Labels:

Analyzing ABAP Runtime Problems

Use

An error in an ABAP program that is running in a background generally causes an immediate termination of the background job. The only exception to this rule is if the error was output by a function module called in the program and the program has been instructed to handle the error as an exception. In this case, control returns to the ABAP program, which can attempt to correct the error and continue.

A background job is terminated, if, for example, the program does not correct the error or a division by zero takes place.

If an ABAP program terminates, an ABAP dump is usually generated. This dump contains a description of the precise cause of the error.

Procedure

# To call an analysis method, choose Tools ® ABAP Workbench ® Test ® Dump-Analysis from the SAP Easy Access menu.
# In the initial screen, you must specify whether you want to view today’s dump or the dump from yesterday. If these selection criteria are too imprecise, you can enter more specific criteria. To do this, choose Goto ® Select Short Dump
# You can display a list of all ABAP dumps by choosing Edit ® Display List. You can then display and analyze a selected dump. To do this, choose Short Dump ® Dump Analysis.

Labels:

Procedure

From the CCMS initial screen, choose Jobs ® Maintenance.

All background processing jobs can be subjected to an analysis of job status. This analysis is concerned with the following criteria:

  • Existence
  • Attributes

(requested/actual start time, steps, target server, job class and so on)

  • Status (scheduled, released, active, nd so on)
  • Activity of a running job

You can restrict the number of jobs selected on the request screen:

This graphic is explained in the accompanying text

It is important whether or not the user who makes the selection has an administrator authorization for background processing. If a user has administrator administration, then jobs will be selected across all clients. If not then jobs will only be selected in the client onto which the user has logged on.

The system displays a list of the jobs that were found:

This graphic is explained in the accompanying text

This overview displays information that is of particular importance for problem analysis, that is, job status. The list is usually sorted alphabetically, but you can sort it according to other criteria (by choosing Edit ® Sort). You can sort it chronologically, for example, so that you can easily see the jobs that ran over a given time period.

The following functions are especially important for problem analysis:

  • Job log:

This contains information about any problems which occurred in the job at runtime, such as whether an ABAP program was terminated or an external program could not be started.

This also contains a list of all messages which were output either by ABAP programs with the MESSAGE statement or by external programs.

  • Job ® Display:

Displays all data belonging to a given job, such as the start date, steps, spool lists generated by steps, etc. The job detail information also shows on which host and in which work process the job was executed.

  • Job ® Change:

To change job data such as target server, start date, steps, and so on.

  • Spool List :

You can access the spool list of a job directly from here.

  • Steps:

You can access the step data of a job directly from here.

  • Job ® Capture:

This can be used to pause and analyze an active job which is in the middle of executing an ABAP program. An ABAP debugger window is opened, showing the ABAP program code at the point at which it is being executed. The code can now be analyzed. You exit the debugger by choosing Debugging ® Continue.

The ABAP program (the job) then continues to execute from the point at which it was stopped. You cannot use this function on external programs.

  • Job ® Cancel job:

This immediately terminates an active job.

  • Job ® Check status:

This allows you to check whether the status of a job as shown in the list is the same as the real status of the job. There is a database table that contains the status information of the jobs.

Situations sometimes occur (for example, a problem in the connection to the database) that prevent the background processing runtime system from entering the current status of a job in the appropriate database table. This will cause a discrepancy between the real status of a job and the status that was entered in the database.

Labels:

Checklist for troubleshooting the client connection (do in the listed order):

What to CheckHow to Check ItTips
Client IP configuration Make sure the client's IP configuration is properly set up. Find out from the systems administrator what your network settings should be, and check that your computer is configured properly if you are using Win95 or Win98, execute winipcfg from Start>>Run to see the IP configuration.
Network Connection without DNS Check that your computer can ping the SAP server (via IP address) using ping . If there is no reply, then probably your computer is configured incorrectly or there is a problem with the physical network connection of your computer. You can also try ping -w 10000 (the "-w 10000" option tells ping to wait 10 seconds before timing out). The problem might be in a faulty cable attached to your computer, or to a faulty outlet. Try using a network outlet and a network cable that has already been used by a client to successfully ping to the server's IP address.
Network Connection with DNS Check that your computer can ping the SAP server (via server name) using ping . If this step fails, but the previous step succeeded, then your computer is having problems finding the IP address of the server. If this step fails, there are several possible solutions:
  • Use the IP address instead of server name. This does not always work.
  • Add an entry for the server in the hosts file of the client machine.
  • Re-configure the DNS settings of the client and/or DNS server (verify with system administrator)
Connect to SAP with SAPIcon Use sapicon (Start>>Programs>>SAP>>SapIcon) to create a Start Menu shortcut to your SAP system. Use this shortcut to log onto SAP. If an error is encountered before the SAPGui progress bar fills, then there is a problem with the SAP client/server connection. Make sure the system ID (number) and SAPRouter string are correct in your SAPIcon settings. Check these values with the system administrator.
Connect to SAP with SAPLogon SAPLogon often messes up and won't connect when it should. If you cannot connect with SAPLogon, first verify the settings with your system administrator. Often SAPLogon problems go away after re-installation (run SAPSetup).
Connect to SAP: Other There are some other settings, such as routing, language code page, or special security, that may need to be changed before you can connect properly to SAP. Check with your system administrator.

Labels:

How To Debug XI 3.0


How To Handle XI 3.0 Caches


Message Troubleshooting In XI 3.0


How To Monitor analyze Errors In SAP J2EE Engine


Troubleshooting XI

Labels:

RFC is an SAP protocol to handle communications between systems which simplifies the programming. A remote function call (RFC) is the call of a function module that runs in a different system to the calling program. It is also possible to call a function module in the same system as an RFC; normally RFCs are used when the caller and the called function module run in different systems. In the SAP system, these functions are provided by the RFC interface system. The RFC interface system enables function calls between two SAP systems, or between an SAP system and an external system. RFCs manage

1) Communication process

2) Parameter transfer

3) Errors.

RFC describes an interface to call the function. In RFC communications between two SAP systems, the calling system uses an RFC definition in the target system to access a specific function. The destination of an rfc call might be R/2 connection, R/3 connection, internal connections, logical connections (like to logical systems) or TCP/IP (external systems) connections.

There are five types of RFCs in SAP

1) Synchronous RFC (sRFC)

It requires that the target system is active when the RFC is made. This type of rfc is used for communication between different systems and between SAP Web AS and SAP GUI.

2) Asynchronous RFC (aRFC)

It doesn’t require the target system to be active when RFC is made. This is used for parallel processing jobs and for communication between different systems.

3) Transactional RFC (tRFC)

This is a variation of aRFC. The transactions are divided into steps and are processes step by step. This is an asynchronous transaction. This is helpful in scenarios where there is probability of network failure between the systems.

4) Queued RFC (qRFC)

This is a variation of tRFC. Here the individual steps are executed sequentially.

5) FastRFC

This is used for system internal communications. Interactions between J2ee engine in sap & the abap runtime environment in the same instance are done using these RFC. This type of RFC is possible only if both the source & target are on the same system.

The RFCs are managed using t-code sm59

Use t-code SMT1 to manage trusted systems

Labels:

Use

An application can make calculations and collect data simultaneously by using the various types of asynchronous RFCs. This can also happen indirectly, as with the inbound queue in qRFC. Every RFC request occupies a dialog work process on the application server on which the RFC is executed.

The possible configurations of the SAP System are described below.

Asynchronous RFC with Load Balancing (Parallel RFC)

You can use this RFC type to program parallel RFC calls. The resources are checked and assigned as far as the set quotas allow.

The required ABAP language element is:

CALL FUNCTION remote function STARTING NEW TASK task name DESTINATION IN GROUP group name

With this ABAP command, you are telling the SAP system to process function module calls in parallel. The command implements parallel processing by sending asynchronous RFC calls to the appropriate servers. These are servers in the RFC server group Group Name specified as being available for processing requests. The group name DEFAULT means that all available application servers are being used.

qRFC with Outbound Queue

The qRFC LUWs are executed using the outbound scheduler. The outbound scheduler uses parallel RFC for processing the outbound queue. For this to be possible, you have to maintain the destinations using transaction SMQS.

The outbound scheduler then checks the resources and executes parallel RFCs, if resources are available. If no resources are available, synchronous RFC is used.

qRFC with Inbound Queue

If you are using the inbound queue, the inbound scheduler takes over the processing of the inbound queue. You have to register the queue names to be processed using the inbound scheduler. To do this, use transaction SMQR.

The inbound scheduler then checks the resources and executes parallel RFCs, if resources are available. If no resources are available, the scheduler waits until resources become available..

Transactional RFC

Transactional RFC uses resource checking only. It does not use parallel RFCs.

The required ABAP language element is:

CALL FUNCTION remote function DESTINATION destination IN BACKGROUND TASK

This ABAP command flags the function module remote function for asynchronous processing. The module is not executed immediately. The data transferred with EXPORTING or TABLES is placed in a database table. A COMMIT WORK then triggers the function module. There are various cases:

· The data is updated. In this case the function module is executed within the update following the V1 phase, usually even on a different server.

· The data is not updated. In this case the function module is executed in the same work process.

Caution

Note that RFC calls with CALL FUNCTION are processed in DIALOG work processes. Therefore, the DIALOG limitation for processing a dialog step (default: 300 seconds, system profile parameter rdisp/max_wprun_time) also applies to these RFC calls. Remember to take this limitation into consideration when you are dividing up your data packets for parallel processing.

Labels:

UME Idap Screen Shots--->

http://www.zshare.net/download/10888335695bb62e/

Labels:

An operating system is a means of communicating with a computer; on a VAX the operating system is VMS, on a PC it is DOS, and on a Alpha it is UNIX.

UNIX is one of the most popular operating systems in the World, it runs on more platforms than any other, it is not tied down to any architecture and it has a rich assortment of utilities and commands.

UNIX is available on so many platforms there is no need to learn a new operating system each time you change hardware vendor, it is far cheaper than any other operating system, and it is slowly standardising itself. The problem many new users discover is the fact it was designed by computer specialists for computer specialists, and consequently the syntax of the commands are very user unfriendly. But X Windows has conquered this problem.

Labels:

To access a UNIX host from a PC in one of the computer rooms a connection must be made to it from either DOS or Winows, this is done by means of a program called telnet. We shall be using a UNIX host called thunder.

Thunder is the name given to the newest and fastest machine the University possesses.

It is a Digital 2100 Server Model A500MP and was purchased to provide the UNIX based compute server. The configuration is a three processor system with 384Mb of main memory and 10 Gbytes of disk. The operating system is Digital’s OSF/1 unix.

Here is an example of a telnet call:{NFS} M:>telnet thunder OR

Note: if you need to use graphics orwould like a multi-windows environment then you can use eXceed/W rather than

Labels:

Unix as an operating system is unique in many ways. Throughout the years Unix has been used as a tool by administrators.

In the beginning Unix was designed by experts for their own use; that is why in the early stages of development the ” average user ” or beginning users were never even considered and it seemed difficult for anyone who was not an expert to understand Unix. After many hours of debugging and re-programming Unix, the advantages of the system moved quickly in favor from expert to lower levels of usage so that others would understand how to use the system.

Now that the ” average user ” was happy for understanding and comprehending the Unix system programmers felt that even more improvements were needed to make the “completely confused” users feel comfortable.

Most Unix guru’s would say that Unix is the best operating system, and just like everything else there are people who say that Unix is not a high-quality operating system or that it lacks something that it will obliviously never have.

I think Unix is great for Servers because of its stability and dependability.

Labels:

Unix is different from other operating systems in that it was designed pacifically to run multiple processes effortlessly. When you begin to understand the basic concepts of the Unix system, a user or administrator can do many things in a very neat and simple approach.

Sometimes users who move to other operating systems wonder why things such as multitasking, which seemed so straightforward under Unix are just not possible in other environments.

Labels:

Using vi Beginning Your Editing Session
   To edit a file                       vi [ filename ]
To recover an editing session vi -r [ filename ]
Notes on vi commands and modal editing

All vi commands are entered in command mode. To enter command mode, press the ESC key.
Some vi commands cause vi to enter another mode. For example, the i (insert command)
causes vi to enter insert mode after which all keystrokes are inserted as text. To return
to command mode from insert mode, press the ESC key. The :set showmode commandwill cause
vi to display the current editing mode in the lower right corner of the editing screen.

Controlling The Screen Display of Your Session
   Repaint the current screen           {ctrl-l}
Display line #, # of lines, etc.. {ctrl-g}

Moving the Cursor

Beginning of current line 0 or ^
Beginning of first screen line H
Beginning of last screen line L
Beginning of middle screen line M
Down one line j, {return}, +
End of current line $
Left one character h, {ctrl-h}
Left to beggining of word b, B
Right one character l, {space}
Right to end of word e, E
Right to beginning of word w, W
Up one line k, -
Beginning of next sentence )

Beginning of previous sentence (

Paging Through Text

Back one screen {ctrl-b}
Down half a screen {ctrl-d}
Down one screen {ctrl-f}
Forware to end of file G
Move cursor to specified line line no. G
Up half a screen {ctrl-j}

Special Pattern Characters

Beginning of line ^
End of line $
Any character except newline .
Any number of the preceding character *
Any set of characters (except newline) .*

Searching Through Text

Backward for pattern ?pattern
Forward for pattern /pattern
Repeat previous search n
Reverse direction of previous search N

Show all lines containing pattern :beg,endg/pattern/p
:1,$g/compiler/p Will print all lines with the pattern compiler.

Substitute patt2 for all patt1 found. :beg,ends/patt1/patt2/g
:%s/notfound/found/g Will change all occurences of notfound to found.

Creating Text

Append text after cursor a
Append text after end of line A
Insert text before cursor i
Insert text at beginning of line I
Open new line after current line o
Open new line before current line O
Take next character literally
(i.e. control characters...)
and display it {ctrl-v}

Modifying Text

Change current word cw, cW
Change current line (cursor to end) C
Delete character (cursor forward) x
Delete character (before cursor) X
Delete word dw, dW
Delete line dd
Delete text to end of line D
Duplicate text (use yank and put)
Join current line with next line J
Move text (use delete and put)
Put buffer text after/below cursor p
Put buffer text before/above cursor P
Repeat last modification command .
Replace current character r
Replace text to end of line R
Substitute text for character s
Undo your previous command u
Transpose characters xp
Yank (copy) word into buffer yw
Yank (copy) current line into buffer Y

Making Corrections During Text Insertions

Overwrite last character {delete}
Overwrite last word {ctrl-w}

Ending Your Editing Sessions

Quit (no changes made) :q
Quit and save changes ZZ, :wq
Quit and discard changes :q!

Using ex Commands From Within vi

Copy specified lines :co, t
Display line numbers :set nu
Disable display of line numbers :set nonu
Move lines after specified line :m
Read file in after specified line :r filename
Review current editor options :set
Review editor options :set all
Set new editor option :set option
Write changes to original file :w
Write to specified file :w filename
Force write to a file :w! filename


Some useful set options for your ~/.exrc file:

:set all Display all Set options
:set autoindent Automagically indent following lines to the indentation
of previous line.
:set ignorecase Ignore case during pattern matching.
:set list Show special characters in the file.
:set number Display line numbers.
:set shiftwidth=n Width for shifting operators <<>>
:set showmode Display mode when in Insert, Append, or Replace mode.
:set wrapmargin=n Set right margin 80-n for autowrapping lines
(inserting newlines). 0 turns it off.

Labels:

Level Explanation Advantages Disadvantages Remarks
0 Striping across disks Larger I/Os or throughput

Full utilization of disk array capacity

Good for read & write

No fault tolerance

One disk fails, entire volume fails.

Cannot recover from failed disk.

Usually 2-4 drives. Applications requiring high performance but non –critical data and low cost.
1 Mirroring Highest fault tolerance.

Good for read

Higher cost Smaller applciations with high availability
0 + 1 Striping + Mirroring Very high reliability

Good for read & write

High performance

Higher cost Samller applications with high performance
2 Inherently parallel mapping and protection technique. Mostly it is not deployed because it needs special disk futures. Disk production is not economical cost wise.
3 Data striped across disks. Min. 3 disks are required Cost is lower than other redundant levels Bottleneck for small I/O operations

RAID 3 is not found on all controllers.

Large I/O request like CAD, CAM imaging.
4 Similar to Raid 3. Unlike Raid 3 it wirtes parity in a single disk. Parity data for whole array requires just one disk. Bottleneck for small I/O operations due to Large file transfers
5 Calculates parity, and writes the data in stripes across disks. Rotational parity Smaller datafiles high throughput.

Even if one disk fails system will be up and runing.

Reasonable cost.

Slower Write than Raid-3 and Raid-4.

Write performance poor. Recovery is slow.

Very high read rate. Less write applications.

OLTP

File server

Web server

ORACLE - RAID MATRIX



Oracle files Raid Levels
Parameter files 5 , 0+1 , ANY
Control files 5, 0+1, ANY
Redo logs 1, 0+1
System Tablespace 5,1, 0+1
Temporary Tablespace 0
Rollback Tablespace 5
Data files 5 , 0+1
Index Tablespace 5, 0+1

Labels:

It is good to do it single user mode. You can do it in either command line login mode or CDE, Openwindows mode.

Insert the disk into the slot, check the cable connections if it is external pack.

Boot the system with “boot -r” command or
Create a file called “reconfigure” at / area.

# cd /

# touch reconfigure

# reboot

when systems comes up login as root.

Sun Microsystems Inc. SunOS 5.6 Generic August 1997

# format

Searching for disks...done



AVAILABLE DISK SELECTIONS:

0. c0t0d0

/sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@0,0

1. c0t1d0 internal

/sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@1,0

2. c0t2d0

/sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@2,0

3. c0t4d0

/sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@4,0

4. c0t5d0

/sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@5,0

Specify disk (enter its number): 3

selecting c0t4d0s

[disk formatted]



FORMAT MENU:

disk - select a disk

type - select (define) a disk type

partition - select (define) a partition table

current - describe the current disk

format - format and analyze the disk

repair - repair a defective sector

label - write label to the disk

analyze - surface analysis

defect - defect list management

backup - search for backup labels

verify - read and display labels

save - save new disk/partition definitions

inquiry - show vendor, product and revision

volname - set 8-character volume name

! - execute , then return

quit

format> partition



PARTITION MENU:

0 - change `0' partition

1 - change `1' partition

2 - change `2' partition

3 - change `3' partition

4 - change `4' partition

5 - change `5' partition

6 - change `6' partition

7 - change `7' partition

select - select a predefined table

modify - modify a predefined partition table

name - name the current table

print - display the current table

label - write partition map and label to the disk

! - execute , then return

quit

partition> print

Current partition table (original):

Total disk cylinders available: 8150 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks

0 root wm 0 0 (0/0/0) 0

1 unassigned wm 0 0 (0/0/0) 0

2 backup wu 0 - 8149 8.51GB (8150/0/0) 17848500

3 unassigned wm 0 0 (0/0/0) 0

4 unassigned wm 0 0 (0/0/0) 0

5 unassigned wm 0 0 (0/0/0) 0

6 unassigned wm 0 - 8149 8.51GB (8150/0/0) 17848500

7 unassigned wm 0 0 (0/0/0) 0

partition> quit

[ Hint: I decided to go with that s6 partition ]

FORMAT MENU:

disk - select a disk

type - select (define) a disk type

partition - select (define) a partition table

current - describe the current disk

format - format and analyze the disk

repair - repair a defective sector

label - write label to the disk

analyze - surface analysis

defect - defect list management

backup - search for backup labels

verify - read and display labels

save - save new disk/partition definitions

inquiry - show vendor, product and revision

volname - set 8-character volume name

! - execute , then return

quit

format> quit

Create a new file system with new disk

# newfs /dev/rdsk/c0t4d0s6

newfs: /dev/rdsk/c0t4d0s6 last mounted as /u02

newfs: construct a new file system /dev/rdsk/c0t4d0s6: (y/n)? y

/dev/rdsk/c0t4d0s6: 17848500 sectors in 8150 cylinders of 10 tracks, 219

sectors 8715.1MB in 204 cyl groups (40 c/g, 42.77MB/g, 5376 i/g)

super-block backups (for fsck -F ufs -o b=#) at:

32, 87856, 175680, 263504, 351328, 439152, 526976, 614800, 702624, 790448,

878272, 966096, 1053920, 1141744, 1229568, 1317392, 1401632, 1489456,

1577280, …………………………………………………………………………

……………………………………………………………………………………

16819232, 16907056, 16994880, 17082704, 17170528, 17258352, 17346176,

17434000, 17521824, 17609648, 17697472, 17785296,

Create mount point

# mkdir /u004

Mount the file system

# mount /dev/dsk/c0t4d0s6 /u004

Use df -k to verify disk

One more case study.

# format

Searching for disks...done



AVAILABLE DISK SELECTIONS:

0. c0t0d0

/sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@0,0

1. c0t1d0 internal

/sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@1,0

2. c0t2d0

/sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@2,0

3. c0t4d0

/sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@4,0

4. c0t5d0

/sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@5,0

Specify disk (enter its number): 4

selecting c0t5d0

[disk formatted]



FORMAT MENU:

disk - select a disk

type - select (define) a disk type

partition - select (define) a partition table

current - describe the current disk

format - format and analyze the disk

repair - repair a defective sector

label - write label to the disk

analyze - surface analysis

defect - defect list management

backup - search for backup labels

verify - read and display labels

save - save new disk/partition definitions

inquiry - show vendor, product and revision

volname - set 8-character volume name

! - execute , then return

quit

format> partition



PARTITION MENU:

0 - change `0' partition

1 - change `1' partition

2 - change `2' partition

3 - change `3' partition

4 - change `4' partition

5 - change `5' partition

6 - change `6' partition

7 - change `7' partition

select - select a predefined table

modify - modify a predefined partition table

name - name the current table

print - display the current table

label - write partition map and label to the disk

! - execute , then return

quit

partition> print

Current partition table (original):

Total disk cylinders available: 4924 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks

0 root wm 0 0 (0/0/0) 0

1 swap wu 0 0 (0/0/0) 0

2 backup wm 0 - 4923 8.43GB (4924/0/0) 17682084

3 home wm 0 - 4923 8.43GB (4924/0/0) 17682084

4 unassigned wm 0 0 (0/0/0) 0

5 unassigned wm 0 0 (0/0/0) 0

6 unassigned wm 0 0 (0/0/0) 0

7 unassigned wm 0 0 (0/0/0) 0

partition> modify

Select partitioning base:

0. Current partition table (original)

1. All Free Hog

Choose base (enter number) [0]?

Part Tag Flag Cylinders Size Blocks

0 root wm 0 0 (0/0/0) 0

1 swap wu 0 0 (0/0/0) 0

2 backup wm 0 - 4923 8.43GB (4924/0/0) 17682084

3 home wm 0 - 4923 8.43GB (4924/0/0) 17682084

4 unassigned wm 0 0 (0/0/0) 0

5 unassigned wm 0 0 (0/0/0) 0

6 unassigned wm 0 0 (0/0/0) 0

7 unassigned wm 0 0 (0/0/0) 0

Do you wish to continue creating a new partition

table based on above table[yes]?

Free Hog partition[6]?

Warning: No space available from Free Hog partition.

Continue[no]?

Free Hog partition[6]?

Warning: No space available from Free Hog partition.

Continue[no]? yes

Warning: no space available for '0' from Free Hog partition

Warning: no space available for '1' from Free Hog partition

Enter size of partition '3' [17682084b, 4924c, 8633.83mb, 8.43gb]: 0.00gb

Enter size of partition '4' [0b, 0c, 0.00mb, 0.00gb]: 0.00gb

Enter size of partition '5' [0b, 0c, 0.00mb, 0.00gb]: 0.00gb

Enter size of partition '7' [0b, 0c, 0.00mb, 0.00gb]: 8.43gb

Part Tag Flag Cylinders Size Blocks

0 root wm 0 0 (0/0/0) 0

1 swap wu 0 0 (0/0/0) 0

2 backup wm 0 - 4923 8.43GB (4924/0/0) 17682084

3 home wm 0 0 (0/0/0) 0

4 unassigned wm 0 0 (0/0/0) 0

5 unassigned wm 0 0 (0/0/0) 0

6 unassigned wm 0 0 (0/0/0) 0

7 unassigned wm 0 - 4923 8.43GB (4924/0/0) 17682084

Okay to make this the current partition table[yes]?

Enter table name (remember quotes): 'disk5'

Ready to label disk, continue? yes

partition> print

Current partition table ('disk5'):

Total disk cylinders available: 4924 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks

0 root wm 0 0 (0/0/0) 0

1 swap wu 0 0 (0/0/0) 0

2 backup wm 0 - 4923 8.43GB (4924/0/0) 17682084

3 home wm 0 0 (0/0/0) 0

4 unassigned wm 0 0 (0/0/0) 0

5 unassigned wm 0 0 (0/0/0) 0

6 unassigned wm 0 0 (0/0/0) 0

7 unassigned wm 0 - 4923 8.43GB (4924/0/0) 17682084

partition> quit



FORMAT MENU:

disk - select a disk

type - select (define) a disk type

partition - select (define) a partition table

current - describe the current disk

format - format and analyze the disk

repair - repair a defective sector

label - write label to the disk

analyze - surface analysis

defect - defect list management

backup - search for backup labels

verify - read and display labels

save - save new disk/partition definitions

inquiry - show vendor, product and revision

volname - set 8-character volume name

! - execute , then return

quit

format> quit

# newfs /dev/rdsk/c0t5d0s7

newfs: /dev/rdsk/c0t5d0s7 last mounted as /d01

newfs: construct a new file system /dev/rdsk/c0t5d0s7: (y/n)? y

/dev/rdsk/c0t5d0s7: 17682084 sectors in 4924 cylinders of 27 tracks, 133

sectors

8633.8MB in 308 cyl groups (16 c/g, 28.05MB/g, 3392 i/g)

super-block backups (for fsck -F ufs -o b=#) at:

32, 57632, 115232, 172832, 230432, 288032, 345632, 403232, 460832, 518432,

576032, 633632, 691232, 748832, 806432, 864032, 921632, 979232, 1036832,

,

17526560, 17584160, 17641760,

Create mount point

# mkdir /u005

Mount the file system

# mount /dev/dsk/c0t5d0s7 /u005

Labels:

A UNIX Shell is in simplest terms, a command line interpreter, that takes the users input and gives it to the Kernel. If you are familiar with DOS, you will remember the ‘command.com’ that file takes the users information and passes it to the operating system in a way it can be understood by the system. With DOS you only had one type of shell, but with UNIX you have a variety, each with their own abilities, pluses and minuses.

Keep in mind as you read about these shells, that though they may have major differences when they were created, that they have been updated and many features that were once only available in a single shell, may be available in other shells. This is more of a history lesson.

sh
The Bourne shell, named after its creator Steve Bourne is the oldest shell for most major distributions of UNIX and LINUX. Most shells today are in some fashion derived from the Bourne shell.

csh
The C Shell. The C shell is a great shell that has many advantages over the original Bourne shell, it was the first to introduce a history (the ability to scroll up, to view past commands). Also the C Shell as the name implies also integrates a great portion of the C programming language. If you are able to program in C, you can pretty much do it all in a shell script or from the command line, if you so desired.

ksh
The Korn Shell. Named after its creator David Korn. This shell is able to do most of the things both the Bourne, and C Shell can do, and improves on them. For instance, the history feature is available, plus you are able to call up the history, edit the command, and then re-run it.

bash
The Bourne-Again Shell. This is probably the most widely used shell to date, and is the default shell for most newer Linux distributions. Again it integrates most of the above features and improves upon them. It was developed by the Free Software Foundation.

There are many other shells out there, but chances are if you are using a UNIX style operating system, you are using one of the above mentioned shells. My personal favourite is the bash shell, which also happens to be the first one I was exposed towards, so I may be biased. However typically when shell scripting, I use the korn shell because of its programming friendly structure.

Labels:

An operating system is a means of communicating with a computer; on a VAX the operating system is VMS, on a PC it is DOS, and on a Alpha it is UNIX.

UNIX is one of the most popular operating systems in the World, it runs on more platforms than any other, it is not tied down to any architecture and it has a rich assortment of utilities and commands.

UNIX is available on so many platforms there is no need to learn a new operating system each time you change hardware vendor, it is far cheaper than any other operating system, and it is slowly standardising itself. The problem many new users discover is the fact it was designed by computer specialists for computer specialists, and consequently the syntax of the commands are very user unfriendly. But X Windows has conquered this problem.

Connection via a PC

To access a UNIX host from a PC in one of the computer rooms a connection must be made to it from either DOS or Winows, this is done by means of a program called telnet. We shall be using a UNIX host called thunder.

Thunder is the name given to the newest and fastest machine the University possesses.

It is a Digital 2100 Server Model A500MP and was purchased to provide the UNIX based compute server. The configuration is a three processor system with 384Mb of main memory and 10 Gbytes of disk. The operating system is Digital's OSF/1 unix.

Here is an example of a telnet call:{NFS} M:\>telnet thunder OR

Note: if you need to use graphics orwould like a multi-windows environment then you can use eXceed/W rather than

telnet

{NFS} M:\>telnet thunder

OSF/1 (thunder) (ttyp8)

login: iss133

Password:

Last login: Tue Oct 11 09:45:22 from simone

DEC OSF/1 [EXT] V3.2 (Rev. 214); Mon Apr 24 16:15:57 BST 1995

DEC OSF/1 V3.2 Worksystem Software (Rev. 214)

Welcome to Thunder!

---------------------------------------------------------------------------

| If you have any problems using this system or software on this system |

| please send E-mail to: |

| helpdesk |

| |

| explaining in sufficient detail what you require help with. |

---------------------------------------------------------------------------

Good Morning! There are currently 6 user(s) running 30 programs.

thunder:/homedir/iss133>_

Below is what you should see when you login to thunder.

Logout

To exit the system use:

thunder:/homedir/iss133> exit

Password

yppasswd will change a user's password, by first prompting the user for the old password followed by the new password which is then typed in again for verification. The password can be of any length but must be greater than six characters, and the characters can be any letter/digit/punctuation mark or escape sequence.

thunder:/homedir/iss133> yppasswd iss033

Old NIS Password:

New Password:

Verification:

NIS Passwd changed on clss1

Note: you should not allow any other person to login as you, if you think your account has been compromised then please change your password.

Labels:

Level Explanation Advantages Disadvantages Remarks
0 Striping across disks Larger I/Os or throughput

Full utilization of disk array capacity

Good for read & write

No fault tolerance

One disk fails, entire volume fails.

Cannot recover from failed disk.

Usually 2-4 drives. Applications requiring high performance but non –critical data and low cost.
1 Mirroring Highest fault tolerance.

Good for read

Higher cost Smaller applciations with high availability
0 + 1 Striping + Mirroring Very high reliability

Good for read & write

High performance

Higher cost Samller applications with high performance
2 Inherently parallel mapping and protection technique. Mostly it is not deployed because it needs special disk futures. Disk production is not economical cost wise.
3 Data striped across disks. Min. 3 disks are required Cost is lower than other redundant levels Bottleneck for small I/O operations

RAID 3 is not found on all controllers.

Large I/O request like CAD, CAM imaging.
4 Similar to Raid 3. Unlike Raid 3 it wirtes parity in a single disk. Parity data for whole array requires just one disk. Bottleneck for small I/O operations due to Large file transfers
5 Calculates parity, and writes the data in stripes across disks. Rotational parity Smaller datafiles high throughput.

Even if one disk fails system will be up and runing.

Reasonable cost.

Slower Write than Raid-3 and Raid-4.

Write performance poor. Recovery is slow.

Very high read rate. Less write applications.

OLTP

File server

Web server

ORACLE - RAID MATRIX


Oracle files Raid Levels
Parameter files 5 , 0+1 , ANY
Control files 5, 0+1, ANY
Redo logs 1, 0+1
System Tablespace 5,1, 0+1
Temporary Tablespace 0
Rollback Tablespace 5
Data files 5 , 0+1
Index Tablespace 5, 0+1

Labels:

Print column1, column5 and column7 of a data file or output of any columns list

$awk ‘{print $1, $5, $7}’ data_file

$cat file_name |awk ‘{print $1 $5 $7}’

$ls –al |awk ‘{print $1, $5, $7}’ -- Prints file_permissions,size and date

Syntax of running an awk program

Awk ‘program’ input file(s)

List all files names whose file size greater than zero.

$ls –al |awk ‘$5 > 0 {print $9}’

List all files whose file size equal to 512bytes.

$ls –al |awk ‘$5 == 0 {print $9}’

print all lines

$awk ‘{print }’ file_name

$awk ‘{print 0}’ file_name

Number of lines in a file

$awk ‘ END {print NR}’ file_name

Number of columns in each row of a file

$awk ‘ {print NF’} file_name

Sort the output of file and eliminate duplicate rows

$awk ‘{print $1, $5, $7}’ |sort –u

List all file names whose file size is greater than 512bytes and owner is "oracle"

$ls –al |awk ‘$3 == "oracle" && $5 > 512 {print $9}’

List all file names whose owner could be either "oracle" or "root"

$ls –al |awk ‘$3 == "oracle" || $3 == "root" {print $9}’

list all the files whose owner is not "oracle

$ls –al |awk ‘$3 != "oracle" {print $9}’

List all lines which has atlease one or more characters

$awk ‘NF > 0 {print }’ file_name

List all lines longer that 50 characters

$awk ‘length($0) > 50 ‘{print }’ file_name

List first two columns

$awk ‘{print $1, $2}’ file_name

Swap first two columns of a file and print

$awk ‘{temp = $1; $1 = $2; $2 = temp; print }’ file_name

Replace first column as "ORACLE" in a data file

$awk ‘{$1 = "ORACLE"; print }’ data_file

Remove first column values in a data file

$awk ‘{$1 =""; print }’ data_file

Calculate total size of a directory in Mb

$ls –al |awk ‘{total +=$5};END {print "Total size: " total/1024/1024 " Mb"}’

Calculate total size of a directory including sub directories in Mb

$ls –lR |awk ‘{total +=$5};END {print "Total size: " total/1024/1024 " Mb"}’

Find largest file in a directory including sub directories

$ls –lR |awk ‘{print $5 "\t" $9}’ |sort –n |tail -1

Labels:

Replace ORACLE with UNIX-ORACLE in a data_file

$sed 's/ORACLE/UNIX-ORACLE/' data_file

Replace two words or more words at a time

$sed -e 's/ORACLE/UNIX-ORACLE/' -e 's/DOS/UNIX/' data_file

Remove blank lines from a file

$sed '/^$/d' file_name

Delete lines between two patterns(including the pattern lines)

$ sed '/Unix-abcd/,/Dos-abcd/d' file_name

Delete lines from 10 to end of the file

$ sed 10,\$d tst

Delete lines from 10 to 300 in a file

$ sed 10,300d tst

Delete all lines expept lines in between the patterns

$sed '/ORACLE/,/UNIX/\!d' file_name

Print first line of a file

$sed q file_name

print 200th line of a file

$sed 200\!d file_name

Print last line of a file

$sed '$\!d' file_name

$sed -n '$p' file_name

list only first 20 lines of a file

$sed '20q' file_name

Print only the lines where ORACLE is present

$sed -n '/ORACLE/p' file_name

Print only the lines where ORACLE doesn't exist

$sed -n '/ORACLE/\!p' file_name

Add double spacing to a file

$ sed G file_name

How many number of lines in a file

$ sed -n '$=' file_name

Change DOS into UNIX for only the lines containing ORACLE

$sed '/ORACLE/s/DOS/UNIX/g' file_name

Change DOS into UNIX, except lines which contains ORACLE

$sed /ORACLE/\!s/DOS/UNIX/g' file_name

Reverse the order of lines

$sed -n 1\!G;h;$p' file_name

Delete all blank lines

$sed '/^$/d' file_name

Labels:

For those of you working on large programs performance is a critical issue. This is especially true with the database folks who write DB precompiler code like pro*C.

Well good news is that you can do what is called as 'compiler based FBO' (compiler based feedback optimization). The concept large and need to be discussed in specific details of the situation present.

Generally speaking here is how it works...

[1]: Compile your program with symbol tables

[2]: Run the instrumentor

[3]: Test your program. This will generate a data file for the program performance. Rule of the thumb is bigger the data file better the performance. Keep in mind though this is linear and not vertical.

[4]: Recompile your program with symbol tables using the performance data file. This will tell the compiler to generate better and faster code by looking at the performance problem area earlier collected in the FBO file [3].

[5] Strip off the symbol table and check the program performance with the pervious versions. Theoritacally speaking it is possible to extract 'n' time linear performance factor from perviously unoptimized programs. On already optimized programs law of "diminishing marginal returns" applies. That is to say that the performance gain you get is would be less evertime you increase an optimization factor. [heeee bloody economists are right here]. In my experience I've seen upto 35% gains in
performances coupled with other variables. Compilers that I know of, can do optimization: Sun Solaris, HP-UX, DEC, SCO, AIX and IRIX. Using 'gcc' or gnu compiler is not advised for performance optimizations. It does very poorly. And is not recomended. Native compilers and tools have better understanding of exec image being optimized and what to look for. Although you may find some tools from universities and research organizations which are better than native tools. But again
they are not commericial products and their algorithims are still under development [though some are really good]

Labels:

All commands are specific to Sun Solaris operating system

UNIX backups/Restore

Commands to take backup of /usr /var /lib directories to tape and disk using "tar"

ANS: a) tar -cvf /dev/rmt/0 /usr /var /lib [Taking into tape ]

b) tar -cvf backup_file.tar /usr /var /lib [ Taking disk image] Taking backup to a tape device attached to a remote system

ANS: a) tar -cv /var /usr /lib | rsh remote_hostname dd of=/dev/rm/0 obs=128

b) ufsdump 0ucf remote_hostname:/dev/rmt/0 /file_system Extracting / Restore the contents of a tape /tar file

ANS: a) tar -xvf /dev/rmt/0 [ restore contents of a tar tape ]

b) tar -xvf filename.tar [ Restore contents of a tar file ]

c) ufsrestore f /dev/rmt/0 filename [Restore from ufsdump tape backup]

d) ufsrestore rf remote_hostname:/dev/rmt/0 filename [ Restore from remote host tape device ]

List contents of backup

ANS: a) tar -tvf /dev/rmt/0 [ List contents of a tar tape ]

b) tar -tvf filename.tar [ List contents of a tar file ]

c) ufsrestore tf /dev/rmt/0 [ list contents of a tape of ufsdump]

Processes and Processor

What are the types of priority classes supported by Solaris ?

ANS: timesharing, system and reat-time

How will you place a running process in real time class?

ANS: priocntl -s –c RT –I uid process_id_number

How will you start a process in real time class?

ANS : priocntl –c RT –e process_name

How will you bind a process to processor ?

Ans: pbind –b processor_no process_id

Network

What is the pocket size used by SQL*NET Version 2 on Solaris

Ans : Default is 2K

What is the procket size used by network layer TCP/IP in SQL*NET v2?

Ans : Default 1K

Inter process communication (IPC) tuning

What is post wait driver ?

The post wait driver reduces the overhead incurred by the more expensive use of semaphore operation for interprocess communication.

Memory

What is the kernel parameter which controls the UNIX buffer cache on solaris ?

Ans : bufhwm ( bufhwm is the maximum amount of physical memory, in kilobytes that can be used by

I/O buffers) While starting an oracle process , the unix system displays an erro message like "Cannot allocate more shared memory segment for the processes" If oracle person approaches you, how will you fix this problem?

ANS: increase the value for kernel memory parameter "set semsys:seminfo_semmns" in /etc/system file. [ this is a blind way]

System configurations

How do you find out total RAM installed on your machine

Ans: $prtconf |grep size

How do you find no. of processors installed on your sun box and processing speed?

Ans: $psrinfo –v

How do you find out how many disks are available on your system?

Ans: $ format (for sysadmins)

$ iostat –E (for users – count only the disks which has disk size correctly)

System Boot Options

How do you boot sun box in single user mode?

ANS: At ok prompt type "boot -s" [ ok boot -s OR ok boot -1 OR ok boot -S ]

What are the commands to shutdown the system?

ANS: shutdown, init , halt, reboot

Devices

What is the meaning of logical name of a disk drive format like c0t0d0s0?

ANS: c0 - Controller number

t0 - SCSI bus target number

d0 - Disk number

s0 - Partition or slice number

List some of the main device types?

ANS: /dev/dsk - Disk devices

/dev/rdsk - Raw or character devices

/dev/rmt - Tape devices

/dev/term - Serial line devices

/dev/pts - Pseudo terminals

List commands to display physical devices ?

ANS: prtconf

Sysdef

Dmesg

sysinfo

Followers

Blog Archive