How can I improve my file tranfer performance

I have file transfers that take 10 hours using rcp. (Huge amounts of data) I want to use SCP but a 1 GB file takes 4mins with a max transfer rate of 4.5 Mb. RCP only take 1.5 mins. (SFTP take only a few second less that SCP)
I have a Sun E10k with 100Mb cards locked at 100/full. Does anyone have a suggestions on how to bring SCP more in-line with the rcp transfer rate?

is this from ISP-to-ISP or is this within the same network LAN..? How close are the computers 10 feet away or 2000 miles away?
What is the packet size set for ? There are many factors here when passing data back-and-forth.
You have transfers that take 10 hrs using rcp. Then you say rcp takes 1.5 minitues. Interesting but need more facts.

Similar Messages

  • HT1651 how can i improve my macbook's performance without installing memory

    how can i improve my macbook's performance without installing memory

    More RAM & bigger faster Hard Drive will help, maybe a better Graphics card also, since 10.5 ises the Video much harder.
    At the Apple Icon at top left>About this Mac.
    Then click on More Info>Hardware and report this upto *but not including the Serial#*...
    Hardware Overview:
    Machine Name: Power Mac G5 Quad
    Machine Model: PowerMac11,2
    CPU Type: PowerPC G5 (1.1)
    Number Of CPUs: 4
    CPU Speed: 2.5 GHz
    L2 Cache (per CPU): 1 MB
    Memory: 10 GB
    Bus Speed: 1.25 GHz
    Boot ROM Version: 5.2.7f1
    Then click on More Info>Hardware>Graphics/Displays and report like this...
    NVIDIA GeForce 7800GT:
      Chipset Model:          GeForce 7800GT
      Type:          Display
      Bus:          PCI
      Slot:          SLOT-1
      VRAM (Total):          256 MB
      Vendor:          nVIDIA (0x10de)
      Device ID:          0x0092
      Revision ID:          0x00a1
      ROM Revision:          2152.2
      Displays:
    VGA Display:
      Resolution:          1920 x 1080 @ 60 Hz
      Depth:          32-bit Color
      Core Image:          Supported
      Main Display:          Yes
      Mirror:          Off
      Online:          Yes
      Quartz Extreme:          Supported
    Display:
      Status:          No display connected

  • How can I improve an Import/ Export performance?

    Hi,
    How can I improve an Import/ Export performance?
    Also any good links to learn about Datapump Please?
    Thanks,
    Felipe.

    F. Munoz Alvarez wrote:
    Dear Felipe,
    Please take a look on this excellent notes by Chris Foot about datapump:
    * http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-06-08.1893574515
    * http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-06-02.2786242018
    * http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-05-26.3042156388
    * http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2006-05-19.6918984141
    Notes are excellent but nowhere, in all the 4 links he talks about performance improvement. He is just discussing the concepts :(
    Amardeep Sidhu

  • How can I improve NFSv3 file performance with MythTV thru a NAS Drive?

    Basically, I have both my MythTV combined frontend/backend machine and a NAS Drive connected via gigabit ethernet connections.
    The NAS drive stores my recordings, shared via NFSv3 (because that's all the NAS drive came with, unfortunatly).
    Now, my problem is that I can record or watch multiple *seperate* HD files simultaneously, travelling back and forth from the NAS without problem.
    However when I try to watch the same file *While it's still being recorded*, after around 20 minutes the network connection is full/overloaded (between the mythserver and the NAS drive) and playback grinds to a halt (It doesn't stop the recording, just the playback).
    It used to happen much quicker when I was only using a 100mb connection.
    As i've said, this doesn't happen at ALL with seperate files, just only if i watch the *same* file that's being recorded at the same time.
    Is there anyway (bar just having the recordings on a Hard Drive within my backend) that I can stop this problem? Is it because I use NFSv3 on the NAS drive? are there any options I can change in the /etc/exports file on the NAS drive that would help? Thanks
    If you want me to post what my NAS drive (Readynas Duo V2) has in its /etc/exports file, I will

    Post the file but I dunno how many Archer are using NFSv3... ;/

  • How can I improve my imac performance?

    Hi guys,
    When I'm using a complex files on Adobe illustrator CS4, it crashes...
    How can I improve my imac performance?
    Here's my system's specs:
      Model Name:    iMac
      Model Identifier:    iMac11,1
      Processor Name:    Intel Core i5
      Processor Speed:    2.66 GHz
      Number Of Processors:    1
      Total Number Of Cores:    4
      L2 Cache (per core):    256 KB
      L3 Cache:    8 MB
      Memory:    4 GB
      Processor Interconnect Speed:    4.8 GT/s
      Boot ROM Version:    IM111.0034.B02
      SMC Version (system):    1.54f36
    Thanks for youyr help!

    I figured you'd ask for those    Since I can't remember the topic/subject line, I have no idea if I have enough time  in this life to try to find them - I had subscriptions for all of them, but of course, those went poof into cyberspace.
    Edit: Athough the search function does not work well (could not specificy 'iMac' - would get "unauthorized to search" every time), so I had to go through quite a few, but I found two of the major threads:
    https://discussions.apple.com/message/12417693#12417693
    https://discussions.apple.com/message/12807961#12807961
    Enjoy reading....
    Barbara

  • I have multiple apple ids was backing up everything to iCloud from iPhone 5. I just bought iPhone 6 and perform a iCloud restore. I received a message that all files did not restore.   How can I restore apps, files manually?

    I have multiple apple ids was backing up everything to iCloud from iPhone 5. I just bought iPhone 6 and perform a iCloud restore. I received a message that all files did not restore.   How can I restore apps, files manually?

    Yes - I connected my phone to my computer / Itunes and went into the apps section, but from there I have no idea how to manage the push notifications.  I even tryied going into itunes that is installed on my phone.  I still cannot find anyplace to manage these popups.  I have also gone into settings - notifiations - and tried turning all notifications for these apps all off but that didnt work either.  Any guidance is MUCH appreciated - Im not sure where to go from here.

  • How can I flip my iphone videos on my PC? My videos from my iphone are horrible when I transfer them to my PC. How can I improve the video on my PC? Can I just convert the files to WMV? When the video plays the speed is off, it's half slow-motion

    My videos from my iphone are horrible when I transfer them to my PC. How can I improve the video on my PC? Can I just convert the files to WMV? When the video plays the speed is off, it's half slow-motion and staggers into normal play. The clips are slightly cut as well, the clips do not roll continuously.  I'm taling about videos that are no more than 2 minutes long.  I'm frustrated and I could really use some advice-my kids basketball games is what I'm recording and I'm trying to send them to my family (they are not very tech savvy). Thanks

    Not it's only function but one for which it was most admirably suited, which is why I really hope someone can find a work around. I am hoping my post to the Apple feedback may prompt a useful response from Apple and I live in hope that my post here will elicit a useful response from another user. I did not miss the the text at the top of the feedback form but you presumably missed my initial text, 'someone here can explain' or my subsequent 'work around from another user'
    Just in case anyone reading this has a large collection of music videos, video podcasts or iTunes U then DO NOT upgrade your iPad to iOS 5. If you are considering purchasing the iPad as a useful mobile device to experience these media organised in your iTunes please don't as you will be wasting your money. (unless someone on this forum knows of a way to undo the mess created by those infallible folks at Apple)
    Yes I know it does other things but the purpose I bought it for doesn't work anymore

  • How Can we improve the report performance..?

    Hi exports,
    I am learning the Business Objects XIR2, Please let me know How Can we improve the report performance..?
    Please give the answer in detailed way.

    First find out why your report is performing slowly. Then fix it.
    That sounds silly, but there's really no single-path process for improving report performance. You might find issues with the report. With the network. With the universe. With the database. With the database design. With the query definition. With report variables. With the ETL. Once you figure out where the problem is, then you start fixing it. Fixing one problem may very well reveal another. I spent two years working on a project where we touched every single aspect of reporting (from data collection through ETL and all the way to report delivery) at some point or another.
    I feel like your question is a bit broad (meaning too generic) to address as you have phrased it. Even some of the suggestions already given...
    Array fetch size - this determines the number of rows fetched at a single pass. You really don't need to modify this unless your network is giving issues. I have seen folks suggest setting this to one (which results in a lot of network requests) or 500 (which results in fewer requests but they're much MUCH larger). Does either improve performance? They might, or they might make it worse. Without understanding how your network traffic is managed it's hard to say.
    Shortcut joins? Sure, they can help, as long as they are appropriate. [Many times they are not.|http://www.dagira.com/2010/05/27/everything-about-shortcut-joins/]
    And I could go on and on. The bottom line is that performance tuning doesn't typically fall into a "cookie cutter" approach. It would be better to have a specific question.

  • How can we improve performance while selection production orders from resb

    Dear all,
    there is a performance issue in a report which compares sales order and production order.
    Below is the code, in this while reading production order data from resb with the below select statement.
    can any body tell me how can we improve the performance? should we use indexing, if yes how to use indexing.
    *read sales order data
      SELECT vbeln posnr arktx zz_cl zz_qty
      INTO (itab-vbeln, itab-sposnr, itab-arktx, itab-zz_cl, itab-zz_qty)
      FROM vbap
      WHERE vbeln  = p_vbeln
      AND   uepos  = p_posnr.
        itab-so_qty = itab-zz_cl * itab-zz_qty / 1000.
        CONCATENATE itab-vbeln itab-sposnr
           INTO itab-document SEPARATED BY '/'.
        CLEAR total_pro.
    **read production order data*
        SELECT aufnr posnr roms1 roanz
        INTO (itab-aufnr, itab-pposnr, itab-roms1, itab-roanz)
        FROM resb
        WHERE kdauf  = p_vbeln
        AND   ablad  = itab-sposnr+2.

    Himanshu,
    Put a break point before these two select statements and execute in the production.This way you will come to know which select statement is taking much time to get executed.
    In both the select statements the where clause is not having the primary keys.
    Coming to the point of selecting the data from vbap do check the SAP note no:-185530 accordigly modify the select statement.
    As far as the table RESB is concerened here also the where clause doesn't have the primary keys.Do check the SAP Note No:-187906.
    I guess not using primary keys is maring the performance.
    K.Kiran.

  • How can I Improve the Performance using Global Temo Tables ??

    Hi,
    Can anyone tell me , How can i make use of Global Temporary Tables to improve the Performance.
    I have few sample scripts ,
    Say i have the View based on some Complex query like ,
    CREATE OR REPLACE VIEW Profile_values_view AS
    SELECT d.Profile_option_name, d.Profile_option_id, Profile_option_value,
    u.User_name, Level_id, Level_code
    FROM Profile_definitions d, Profile_values v, Profile_users u
    WHERE d.Profile_option_id = v.Profile_option_id
    AND ((Level_code = 'USER' AND Level_id = U.User_id) OR
    (Level_code = 'DEPARTMENT' AND Level_id = U.Department_id) OR
    (Level_code = 'SITE'))
    AND NOT EXISTS (SELECT 1 FROM PROFILE_VALUES P
    WHERE P.PROFILE_OPTION_ID = V.PROFILE_OPTION_ID
    AND ((Level_code = 'USER' AND
    level_id = u.User_id) OR
    (Level_code = 'DEPARTMENT' AND
    level_id = u.Department_id) OR
    (Level_code = 'SITE'))
    AND INSTR('USERDEPARTMENTSITE', v.Level_code) >
    INSTR('USERDEPARTMENTSITE', p.Level_code));
    Now i have created the Global temp Table as ,
    CREATE GLOBAL TEMPORARY TABLE Profile_values_temp
    Profile_option_name VARCHAR(60) NOT NULL,
    Profile_option_id NUMBER(4) NOT NULL,
    Profile_option_value VARCHAR2(20) NOT NULL,
    Level_code VARCHAR2(10) ,
    Level_id NUMBER(4) ,
    CONSTRAINT Profile_values_temp_pk
    PRIMARY KEY (Profile_option_id)
    ) ON COMMIT PRESERVE ROWS ORGANIZATION INDEX;
    Now I am Inserting the Records into Temp table as
    INSERT INTO Profile_values_temp
    (Profile_option_name, Profile_option_id, Profile_option_value,
    Level_code, Level_id)
    SELECT Profile_option_name, Profile_option_id, Profile_option_value,
    Level_code, Level_id
    FROM Profile_values_view;
    COMMIT;
    Now what my doubt is, when do i need to execute the Insert Statement.
    Say , if the View returns few millions of records , then loading such a data into Global Temporary table takes lot of time.
    Then what is the use of Global Temporary tables and how can i improve the Performance using the same.
    Raj

    Thanks for the responce ,
    There are 2 to 3 complex views in our database, and there always be more than 5000+ users will be workinf on the application and is OLTP application. Those complex views are killing the application performance.
    I what i felt was, if i create the Global Temporary tables for thow views and will be able to load the one third million of records returned by the views in to cache and can improve the application performance.
    I have created the Global Temporary tables for 2 views with the option On Commit Preserve , But after am inserting the records into the Temp table and when i Issue the commit statement, the Temp table is getting Cleared.
    I really got surpised of this behaviour as i know that with the Option On Commit Preserve , the rows should retain in the Temp Table, Instead , it's getting cleared.
    Pelase suggest , what to do ??
    Raj

  • How can I improve performance for BC4J/JSP-application

    Hi,
    I have developed a JSP-Applikcation with the master-detail views. This Application has been implemented
    as SSO enabled web portlet into portal. Whenn I click on a row retrieved from the master view (Master.jsp), it take 15 seconds
    until the associated data in detail view will be displayed on the other window(Detail.jsp). The master table has about 2500 records and detail table about 7000. (Other case: it takes 2 seconds for 162 rows (master) and 228 rows (detail) respectively)
    In Master.jsp I set rangesize = "10" to reduce data loading time.
    ======================== master.jsp =================================
    <jbo:DataSource id="dsMaster appid=testAppId viewobject="MaterView" rangesize="10">
    <a href="detail.jsp?RowKeyValue=<jbo:ShowValue datasource="dsMaster" dataitem="RowKey"/>">
    Here Click
    </a>
    ==================================================================
    Because all records from master view have firstly to be retrieved to locate right row, I set rangesize="-1" in detail.jsp. Consequently this leads to a lower performance.
    When rangesize="20" sets instead rangesize="-1", The performance is good, but the wanted Data from detail view are not displayed if the records of master view cliked on ist not in this range.
    ======================== detail.jsp ======================================
    <jbo:DataSource id="dsMaster appid=testAppId viewobject="MaterView" rangesize="-1">
    <jbo:RefreshDataSource datasource="dsMaster">
    <jbo:Row id="msRow" datasource="dsMaster" action="Find" rowkeyparam="RowkeyValue">
    <jbo:dataSource id="dsDetail" appid="testAppId viewobject="DetailView">
    ======================================================================
    Is my programming logic not to be suited for the high performance?
    How can I improve the performance, if it is so?
    Many thanks for your help.
    regards,
    Yoo

    http://forums.adobe.com/thread/1369260?tstart=0

  • How can I improve below SQL performance.

    Hi,
    How can I improve below SQL performance. This SQL consumes CPU and occures wait events. It is running every 10 seconds. When I look at the session information from Enterprise Manager I can see that "Histogram for Wait Event: PX Deq Credit: send blkd"
    I created some indexes. I heard that the indexes are not used when there is a NULL but when I checked the xecution plan It uses index.
    SELECT i.ID
    FROM EXPRESS.invoices i
    WHERE i.nbr IS NOT NULL
    AND i.EXTRACT_BATCH IS NULL
    AND i.SUB_TYPE='COD'
    Explain Plan from Toad
    SELECT STATEMENT CHOOSECost: 77 Bytes: 6,98 Cardinality: 349                     
         4 PX COORDINATOR                
              3 PX SEND QC (RANDOM) SYS.:TQ10000 Cost: 77 Bytes: 6,98 Cardinality: 349           
                   2 PX BLOCK ITERATOR Cost: 77 Bytes: 6,98 Cardinality: 349      
                        1 INDEX FAST FULL SCAN INDEX EXPRESS.INVC_TRANS_INDX Cost: 77 Bytes: 6,98 Cardinality: 349
    Execution Plan from Sqlplus
    | Id | Operation | Name | Rows | Bytes | Cost | TQ |IN-OUT| PQ Distrib |
    | 0 | SELECT STATEMENT | | 349 | 6980 | 77 | | | |
    | 1 | PX COORDINATOR | | | | | | | |
    | 2 | PX SEND QC (RANDOM) | :TQ10000 | 349 | 6980 | 77 | Q1,00 | P->S | QC (RAND) |
    | 3 | PX BLOCK ITERATOR | | 349 | 6980 | 77 | Q1,00 | PCWC | |
    |* 4 | INDEX FAST FULL SCAN| INVC_TRANS_INDX | 349 | 6980 | 77 | Q1,00 | PCWP | |
    Predicate Information (identified by operation id):
    4 - filter("I"."NBR" IS NOT NULL AND "I"."EXTRACT_BATCH" IS NULL AND "I"."SUB_TYPE"='COD')
    Note
    - 'PLAN_TABLE' is old version
    - cpu costing is off (consider enabling it)
    Statistics
    141 recursive calls
    0 db block gets
    5568 consistent gets
    0 physical reads
    0 redo size
    319 bytes sent via SQL*Net to client
    458 bytes received via SQL*Net from client
    1 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    0 rows processed
    Instance Efficiency Percentages (Target 100%)
    Buffer Nowait %: 100.00
    Redo NoWait %: 100.00
    Buffer Hit %: 99.70
    In-memory Sort %: 100.00
    Library Hit %: 99.81
    Soft Parse %: 99.77
    Execute to Parse %: 63.56
    Latch Hit %: 90.07
    Parse CPU to Parse Elapsd %: 0.81
    % Non-Parse CPU: 98.88
    Top 5 Timed Events                         
    Event     Waits     Time(s)     Avg Wait(ms)     % Total Call Time     Wait Class
    latch: library cache     12,626     16,757     1,327     62.6     Concurrency
    CPU time          5,712          21.Mar     
    latch: session allocation     1,848,987     1,99     1     07.Nis     Other
    PX Deq Credit: send blkd     1,242,265     981     1     03.Tem     Other
    PX qref latch     1,405,819     726     1     02.Tem     Other
    The database version is 10.2.0.1 but we haven't installed the patch 10.2.0.5. yet.
    I am waiting your comments.
    Thanks in advance

    Welcome to the forum.
    I created some indexes. I heard that the indexes are not used when there is a NULL but when I checked the xecution plan It uses index. What columns are indexed?
    And what do:
    select i.sub_type
    ,      count(*)
    from   express.invoices i
    where  i.nbr is not null
    and    i.extract_batch is null
    group by i.sub_type; and
    select i.sub_type
    ,      count(*)
    from   express.invoices i
    group by i.sub_type; return?
    Also, try use the {noformat}{noformat} tag when posting examples/execution plans etc.
    See: HOW TO: Post a SQL statement tuning request - template posting for more tuning instructions.
    It'll make a big difference:
    SELECT i.ID
    FROM EXPRESS.invoices i
    WHERE i.nbr IS NOT NULL
    AND i.EXTRACT_BATCH IS NULL
    AND i.SUB_TYPE='COD'
    Explain Plan from Toad
    SELECT STATEMENT CHOOSECost: 77 Bytes: 6,98 Cardinality: 349                     
         4 PX COORDINATOR                
              3 PX SEND QC (RANDOM) SYS.:TQ10000 Cost: 77 Bytes: 6,98 Cardinality: 349           
                   2 PX BLOCK ITERATOR Cost: 77 Bytes: 6,98 Cardinality: 349      
                        1 INDEX FAST FULL SCAN INDEX EXPRESS.INVC_TRANS_INDX Cost: 77 Bytes: 6,98 Cardinality: 349
    Execution Plan from Sqlplus
    | Id | Operation | Name | Rows | Bytes | Cost | TQ |IN-OUT| PQ Distrib |
    | 0 | SELECT STATEMENT | | 349 | 6980 | 77 | | | |
    | 1 | PX COORDINATOR | | | | | | | |
    | 2 | PX SEND QC (RANDOM) | :TQ10000 | 349 | 6980 | 77 | Q1,00 | P->S | QC (RAND) |
    | 3 | PX BLOCK ITERATOR | | 349 | 6980 | 77 | Q1,00 | PCWC | |
    |* 4 | INDEX FAST FULL SCAN| INVC_TRANS_INDX | 349 | 6980 | 77 | Q1,00 | PCWP | |
    Predicate Information (identified by operation id):
    4 - filter("I"."NBR" IS NOT NULL AND "I"."EXTRACT_BATCH" IS NULL AND "I"."SUB_TYPE"='COD')
    Note
    - 'PLAN_TABLE' is old version
    - cpu costing is off (consider enabling it)
    Statistics
    141 recursive calls
    0 db block gets
    5568 consistent gets
    0 physical reads
    0 redo size
    319 bytes sent via SQL*Net to client
    458 bytes received via SQL*Net from client
    1 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    0 rows processed
    Instance Efficiency Percentages (Target 100%)
    Buffer Nowait %: 100.00
    Redo NoWait %: 100.00
    Buffer Hit %: 99.70
    In-memory Sort %: 100.00
    Library Hit %: 99.81
    Soft Parse %: 99.77
    Execute to Parse %: 63.56
    Latch Hit %: 90.07
    Parse CPU to Parse Elapsd %: 0.81
    % Non-Parse CPU: 98.88
    Top 5 Timed Events                         
    Event     Waits     Time(s)     Avg Wait(ms)     % Total Call Time     Wait Class
    latch: library cache     12,626     16,757     1,327     62.6     Concurrency
    CPU time          5,712          21.Mar     
    latch: session allocation     1,848,987     1,99     1     07.Nis     Other
    PX Deq Credit: send blkd     1,242,265     981     1     03.Tem     Other
    PX qref latch     1,405,819     726     1     02.Tem     Other

  • How can I improve performance when scopes are open?

    How can I improve performance when scopes are open?
    When Color correcting, performance severely lags, stalls, freezes!
    Nothing to complex...simple 3 way color corrector, occasional curves filters.
    I am constantly waiting for the timeline to update as I move around....sometimes as long as a minute or so.
    I'm on brand new 2.7 Ghz 12-Core MacPro with 64 GB of RAM
    Thanks in advance.
    Jay

    http://forums.adobe.com/thread/1369260?tstart=0

  • I have Airport Extreme as the base unit and an Express unit in a room separated by a brick wall to improve signal. Express shows a green light indicating signal but my iPad does not perform well. How can I improve other than hardwire ethernet connection?

    I have Airport Extreme as the base unit and an Express unit in a room separated by a brick wall to improve signal. Express shows a green light indicating signal but my iPad does not perform well. How can I improve other than hardwire ethernet connection?

    Other suggestions, and more info about the nature of the problem, may be in this Apple tech note.
    http://support.apple.com/kb/HT1365
    For example, you might find that the brick wall is not the only problem. There may be other devices pumping out enough wireless interference to be making things even worse.
    I agree with Bob Timmons that Ethernet is best and most reliable. And that powerline (which I use) is easier and potentially faster than wireless...but only if your power lines do not have electrical devices plugged in which produce electrical noise on the line. Powerline will be slower than Gigabit Ethernet.
    Ethernet cable is the only way to ensure that the signal goes directly there in a shielded way for a clear fast signal. Wireless and powerline are much slower because of all the other things the signal has to fight past to get to the other device.

  • How can i wrote configuration file in Log4j

    iam new log4j .i have seen one small programme in log4j examples folder ..i e. shown below
    Sort.java
    =====
    package examples;
    import org.apache.log4j.PropertyConfigurator;
    import org.apache.log4j.Logger;
    import org.apache.log4j.Priority;
    Example code for log4j to viewed in conjunction with the {@link
    examples.SortAlgo SortAlgo} class.
    <p>This program expects a configuration file name as its first
    argument, and the size of the array to sort as the second and last
    argument. See its <b>source
    code</b> for more details.
    <p>Play around with different values in the configuration file and
    watch the changing behavior.
    <p>Example configuration files can be found in <a
    href="doc-files/sort1.properties">sort1.properties</a>, <a
    href="doc-files/sort2.properties">sort2.properties</a>, <a
    href="doc-files/sort3.properties">sort3.properties</a> and <a
    href="doc-files/sort4.properties">sort4.properties</a> are supplied with the
    package.
    <p>If you are also interested in logging performance, then have
    look at the {@link org.apache.log4j.performance.Logging} class.
    @author Ceki G&uuml;lc&uuml; */
    public class Sort {
    static Logger logger = Logger.getLogger(Sort.class.getName());
    public static void main(String[] args) {
         if(args.length != 2) {
              usage("Incorrect number of parameters.");
         int arraySize = -1;
    try {
              arraySize = Integer.valueOf(args[1]).intValue();
              if(arraySize <= 0)
                   usage("Negative array size.");
    catch(java.lang.NumberFormatException e) {
    usage("Could not number format ["+args[1]+"].");
    PropertyConfigurator.configure(args[0]);
    int[] intArray = new int[arraySize];
    logger.info("Populating an array of " + arraySize + " elements in" +" reverse order.");
    for(int i = arraySize -1 ; i >= 0; i--) {
              intArray[i] = arraySize - i - 1;
    SortAlgo sa1 = new SortAlgo(intArray);
    sa1.bubbleSort();
    sa1.dump();
    // We intentionally initilize sa2 with null.
    SortAlgo sa2 = new SortAlgo(null);
    logger.info("The next log statement should be an error message.");
    sa2.dump();
    logger.info("Exiting main method.");
    static void usage(String errMsg) {
         System.err.println(errMsg);
         System.err.println("\nUsage: java org.apache.examples.Sort " + "configFile ARRAY_SIZE\n"+
    "where configFile is a configuration file\n"+" ARRAY_SIZE is a positive integer.\n");
    System.exit(1);
    and
    SortAlgo.java
    ==========
    package examples;
    import org.apache.log4j.Category;
    import org.apache.log4j.NDC;
    Example code for log4j to viewed in conjunction with the {@link
    examples.Sort Sort} class.
    <p>SortAlgo uses the bubble sort algorithm to sort an integer
    array. See also its <b>source
    code</b>.
    @author Ceki G&uuml;lc&uuml; */
    public class SortAlgo {
    final static String className = SortAlgo.class.getName();
    final static Category CAT = Category.getInstance(className);
    final static Category OUTER = Category.getInstance(className + ".OUTER");
    final static Category INNER = Category.getInstance(className + ".INNER");
    final static Category DUMP = Category.getInstance(className + ".DUMP");
    final static Category SWAP = Category.getInstance(className + ".SWAP");
    int[] intArray;
    SortAlgo(int[] intArray) {
    this.intArray = intArray;
    void bubbleSort() {
    CAT.info( "Entered the sort method.");
    for(int i = intArray.length -1; i >= 0 ; i--) {
    NDC.push("i=" + i);
    OUTER.debug("in outer loop.");
    for(int j = 0; j < i; j++) {
         NDC.push("j=" + j);
         // It is poor practice to ship code with log staments in tight loops.
         // We do it anyway in this example.
         INNER.debug( "in inner loop.");
    if(intArray[j] > intArray[j+1])
         swap(j, j+1);
         NDC.pop();
    NDC.pop();
    void dump() {   
    if(! (this.intArray instanceof int[])) {
    DUMP.error("Tried to dump an uninitialized array.");
    return;
    DUMP.info("Dump of integer array:");
    for(int i = 0; i < this.intArray.length; i++) {
    DUMP.info("Element [" + i + "]=" + this.intArray);
    void swap(int l, int r) {
    // It is poor practice to ship code with log staments in tight
    // loops or code called potentially millions of times.
    SWAP.debug( "Swapping intArray["+l+"]=" + intArray[l] +
         " and intArray["+r+"]=" + intArray[r]);
    int temp = this.intArray[l];
    this.intArray[l] = this.intArray[r];
    this.intArray[r] = temp;
    This program expects a configuration file name as its first
    argument, and the size of the array to sort as the second and last
    argument. See its <b>source
    code</b> for more details.
    please help me how can write that configuration file
    thanks

    Hi bala,
    check that log4j manual I pointed to in yer previous thread.
    This is a pot-boiler config file... Copy it into some file say "props.conf" and use it.
    # Set root logger level to DEBUG and its only appender to A1.
    log4j.rootLogger=DEBUG, A1
    # A1 is set to be a ConsoleAppender.
    log4j.appender.A1=org.apache.log4j.ConsoleAppender
    # A1 uses PatternLayout.
    log4j.appender.A1.layout=org.apache.log4j.PatternLayout
    log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%nCheers,

Maybe you are looking for

  • Linking two ODS objects using a multiprovider

    Hello Gurus, I need to link two ODS objects and both are having 3 common characteristics and the relationship between the two objects are one to many. My questions would be.... 1)When the relationship is one to many can I set it up in the multiprovid

  • Thinkpad Tablet 2 issues with installing Windows 8.1 Pro

    I have a Thinkpad Tablet 2 and haveput the 32 bit version of Windows 8.1 Pro onto a USB drive. In BIOS, my tablet identifies the drive correctly and I have successfully put given it the highest boot priority. When I start up with the USB drive in, th

  • I can't import my video from panasonic g3 into aperture

    I can't see my video appearing in Aperture from my importing window. I tried importing from a memory card.

  • My history is no longer saving every web page that I visit.

    It seems to save sporadically. It also no longer jumps to only the history of the month (or yesterday's history) that I choose, but simply goes all the way back from the most recent history. *My settings are set so that Firefox should remember all of

  • Show Employee Photo in EP

    Hi Experts, I have uploaded employee photo in PA30 and i am having FM to get the URL, through that URL it's showing the picture in EP. Requirement : I want to show small picture in EP but its showing picture based on the picture size, if we will chec