dd command: Finding read/write throughput of a flash/SD?












1















I am running petalinux from sd card. And trying to find data copying rate from Sd card and from QSPI flash that is there on the Xilinx Zynq board.



As suggested here , I am doing like this:



root@Xilinx-ZC702-14_7:/dev# echo 1 > /proc/sys/vm/drop_caches
root@Xilinx-ZC702-14_7:/dev# dd if=/dev/mtd2 of=/dev/null bs=128k count=200
84+0 records in
84+0 records out


But as per the above link it should also print the following lines:



26214400 bytes (25.0MB) copied, 5.971374 seconds, 4.2MB/s


That gives an idea of rate at which flash working.



Why is this line missing in my case?
Is there any alterantive to know this rate ?










share|improve this question




















  • 2





    Haven't used petalinux before, but it looks like the type of distro that would use the BusyBox toolchain, which is really stripped down and might actually not do the progress notification.

    – Bratchley
    Mar 7 '14 at 20:31
















1















I am running petalinux from sd card. And trying to find data copying rate from Sd card and from QSPI flash that is there on the Xilinx Zynq board.



As suggested here , I am doing like this:



root@Xilinx-ZC702-14_7:/dev# echo 1 > /proc/sys/vm/drop_caches
root@Xilinx-ZC702-14_7:/dev# dd if=/dev/mtd2 of=/dev/null bs=128k count=200
84+0 records in
84+0 records out


But as per the above link it should also print the following lines:



26214400 bytes (25.0MB) copied, 5.971374 seconds, 4.2MB/s


That gives an idea of rate at which flash working.



Why is this line missing in my case?
Is there any alterantive to know this rate ?










share|improve this question




















  • 2





    Haven't used petalinux before, but it looks like the type of distro that would use the BusyBox toolchain, which is really stripped down and might actually not do the progress notification.

    – Bratchley
    Mar 7 '14 at 20:31














1












1








1








I am running petalinux from sd card. And trying to find data copying rate from Sd card and from QSPI flash that is there on the Xilinx Zynq board.



As suggested here , I am doing like this:



root@Xilinx-ZC702-14_7:/dev# echo 1 > /proc/sys/vm/drop_caches
root@Xilinx-ZC702-14_7:/dev# dd if=/dev/mtd2 of=/dev/null bs=128k count=200
84+0 records in
84+0 records out


But as per the above link it should also print the following lines:



26214400 bytes (25.0MB) copied, 5.971374 seconds, 4.2MB/s


That gives an idea of rate at which flash working.



Why is this line missing in my case?
Is there any alterantive to know this rate ?










share|improve this question
















I am running petalinux from sd card. And trying to find data copying rate from Sd card and from QSPI flash that is there on the Xilinx Zynq board.



As suggested here , I am doing like this:



root@Xilinx-ZC702-14_7:/dev# echo 1 > /proc/sys/vm/drop_caches
root@Xilinx-ZC702-14_7:/dev# dd if=/dev/mtd2 of=/dev/null bs=128k count=200
84+0 records in
84+0 records out


But as per the above link it should also print the following lines:



26214400 bytes (25.0MB) copied, 5.971374 seconds, 4.2MB/s


That gives an idea of rate at which flash working.



Why is this line missing in my case?
Is there any alterantive to know this rate ?







io dd benchmark






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 7 '14 at 23:33









Gilles

539k12810901606




539k12810901606










asked Mar 7 '14 at 9:21









mszmsz

56229




56229








  • 2





    Haven't used petalinux before, but it looks like the type of distro that would use the BusyBox toolchain, which is really stripped down and might actually not do the progress notification.

    – Bratchley
    Mar 7 '14 at 20:31














  • 2





    Haven't used petalinux before, but it looks like the type of distro that would use the BusyBox toolchain, which is really stripped down and might actually not do the progress notification.

    – Bratchley
    Mar 7 '14 at 20:31








2




2





Haven't used petalinux before, but it looks like the type of distro that would use the BusyBox toolchain, which is really stripped down and might actually not do the progress notification.

– Bratchley
Mar 7 '14 at 20:31





Haven't used petalinux before, but it looks like the type of distro that would use the BusyBox toolchain, which is really stripped down and might actually not do the progress notification.

– Bratchley
Mar 7 '14 at 20:31










2 Answers
2






active

oldest

votes


















1














Showing the throughput rate is a feature of the version of dd from GNU coreutils which is found on non-embedded Linux. PetaLinux uses the BusyBox utility suite, and its dd does not have this feature.



You can use the time utility to measure the total time, and divide the amount of data by that figure. Unfortunately BusyBox's time utility is cumbersome to parse.



bytes=$((128*200*1024))
time head -c $bytes 2>&1 |
awk -F '[^.0-9]+' -v bytes=$bytes '
/^syst[0-9]*m [0-9.]*s$/ {
sys_time = $1 * 60 + $2;
}
{print}
END {printf "Throughput: %f MB/sn", bytes / 1048576.0 / sys_time}'





share|improve this answer































    0














    I'm not sure hdparm -T / hdparm -t would work correctly on an SD card but it's worth trying.






    share|improve this answer
























    • it did not work in my case: root@Xilinx-ZC702-14_7:/dev# hdparm -T -sh: hdparm: not found root@Xilinx-ZC702-14_7:/dev# hdparm -t -sh: hdparm: not found

      – msz
      Mar 7 '14 at 9:28











    • Well install it first. It's quite standard, but usually not pre-installed.

      – orion
      Mar 7 '14 at 9:33











    • this is not implemented for petalinux.

      – msz
      Mar 7 '14 at 9:50











    • Embedded implementations are usually very limited. It's possible that this extra line of verbosity from dd isn't even implemented. gnu versions of core utilities are very extended compared to the bare standard. Do you have time available to directly measure the duration and then calculate it by yourself.

      – orion
      Mar 7 '14 at 11:44











    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f118554%2fdd-command-finding-read-write-throughput-of-a-flash-sd%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Showing the throughput rate is a feature of the version of dd from GNU coreutils which is found on non-embedded Linux. PetaLinux uses the BusyBox utility suite, and its dd does not have this feature.



    You can use the time utility to measure the total time, and divide the amount of data by that figure. Unfortunately BusyBox's time utility is cumbersome to parse.



    bytes=$((128*200*1024))
    time head -c $bytes 2>&1 |
    awk -F '[^.0-9]+' -v bytes=$bytes '
    /^syst[0-9]*m [0-9.]*s$/ {
    sys_time = $1 * 60 + $2;
    }
    {print}
    END {printf "Throughput: %f MB/sn", bytes / 1048576.0 / sys_time}'





    share|improve this answer




























      1














      Showing the throughput rate is a feature of the version of dd from GNU coreutils which is found on non-embedded Linux. PetaLinux uses the BusyBox utility suite, and its dd does not have this feature.



      You can use the time utility to measure the total time, and divide the amount of data by that figure. Unfortunately BusyBox's time utility is cumbersome to parse.



      bytes=$((128*200*1024))
      time head -c $bytes 2>&1 |
      awk -F '[^.0-9]+' -v bytes=$bytes '
      /^syst[0-9]*m [0-9.]*s$/ {
      sys_time = $1 * 60 + $2;
      }
      {print}
      END {printf "Throughput: %f MB/sn", bytes / 1048576.0 / sys_time}'





      share|improve this answer


























        1












        1








        1







        Showing the throughput rate is a feature of the version of dd from GNU coreutils which is found on non-embedded Linux. PetaLinux uses the BusyBox utility suite, and its dd does not have this feature.



        You can use the time utility to measure the total time, and divide the amount of data by that figure. Unfortunately BusyBox's time utility is cumbersome to parse.



        bytes=$((128*200*1024))
        time head -c $bytes 2>&1 |
        awk -F '[^.0-9]+' -v bytes=$bytes '
        /^syst[0-9]*m [0-9.]*s$/ {
        sys_time = $1 * 60 + $2;
        }
        {print}
        END {printf "Throughput: %f MB/sn", bytes / 1048576.0 / sys_time}'





        share|improve this answer













        Showing the throughput rate is a feature of the version of dd from GNU coreutils which is found on non-embedded Linux. PetaLinux uses the BusyBox utility suite, and its dd does not have this feature.



        You can use the time utility to measure the total time, and divide the amount of data by that figure. Unfortunately BusyBox's time utility is cumbersome to parse.



        bytes=$((128*200*1024))
        time head -c $bytes 2>&1 |
        awk -F '[^.0-9]+' -v bytes=$bytes '
        /^syst[0-9]*m [0-9.]*s$/ {
        sys_time = $1 * 60 + $2;
        }
        {print}
        END {printf "Throughput: %f MB/sn", bytes / 1048576.0 / sys_time}'






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 8 '14 at 1:08









        GillesGilles

        539k12810901606




        539k12810901606

























            0














            I'm not sure hdparm -T / hdparm -t would work correctly on an SD card but it's worth trying.






            share|improve this answer
























            • it did not work in my case: root@Xilinx-ZC702-14_7:/dev# hdparm -T -sh: hdparm: not found root@Xilinx-ZC702-14_7:/dev# hdparm -t -sh: hdparm: not found

              – msz
              Mar 7 '14 at 9:28











            • Well install it first. It's quite standard, but usually not pre-installed.

              – orion
              Mar 7 '14 at 9:33











            • this is not implemented for petalinux.

              – msz
              Mar 7 '14 at 9:50











            • Embedded implementations are usually very limited. It's possible that this extra line of verbosity from dd isn't even implemented. gnu versions of core utilities are very extended compared to the bare standard. Do you have time available to directly measure the duration and then calculate it by yourself.

              – orion
              Mar 7 '14 at 11:44
















            0














            I'm not sure hdparm -T / hdparm -t would work correctly on an SD card but it's worth trying.






            share|improve this answer
























            • it did not work in my case: root@Xilinx-ZC702-14_7:/dev# hdparm -T -sh: hdparm: not found root@Xilinx-ZC702-14_7:/dev# hdparm -t -sh: hdparm: not found

              – msz
              Mar 7 '14 at 9:28











            • Well install it first. It's quite standard, but usually not pre-installed.

              – orion
              Mar 7 '14 at 9:33











            • this is not implemented for petalinux.

              – msz
              Mar 7 '14 at 9:50











            • Embedded implementations are usually very limited. It's possible that this extra line of verbosity from dd isn't even implemented. gnu versions of core utilities are very extended compared to the bare standard. Do you have time available to directly measure the duration and then calculate it by yourself.

              – orion
              Mar 7 '14 at 11:44














            0












            0








            0







            I'm not sure hdparm -T / hdparm -t would work correctly on an SD card but it's worth trying.






            share|improve this answer













            I'm not sure hdparm -T / hdparm -t would work correctly on an SD card but it's worth trying.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 7 '14 at 9:25









            orionorion

            9,1731833




            9,1731833













            • it did not work in my case: root@Xilinx-ZC702-14_7:/dev# hdparm -T -sh: hdparm: not found root@Xilinx-ZC702-14_7:/dev# hdparm -t -sh: hdparm: not found

              – msz
              Mar 7 '14 at 9:28











            • Well install it first. It's quite standard, but usually not pre-installed.

              – orion
              Mar 7 '14 at 9:33











            • this is not implemented for petalinux.

              – msz
              Mar 7 '14 at 9:50











            • Embedded implementations are usually very limited. It's possible that this extra line of verbosity from dd isn't even implemented. gnu versions of core utilities are very extended compared to the bare standard. Do you have time available to directly measure the duration and then calculate it by yourself.

              – orion
              Mar 7 '14 at 11:44



















            • it did not work in my case: root@Xilinx-ZC702-14_7:/dev# hdparm -T -sh: hdparm: not found root@Xilinx-ZC702-14_7:/dev# hdparm -t -sh: hdparm: not found

              – msz
              Mar 7 '14 at 9:28











            • Well install it first. It's quite standard, but usually not pre-installed.

              – orion
              Mar 7 '14 at 9:33











            • this is not implemented for petalinux.

              – msz
              Mar 7 '14 at 9:50











            • Embedded implementations are usually very limited. It's possible that this extra line of verbosity from dd isn't even implemented. gnu versions of core utilities are very extended compared to the bare standard. Do you have time available to directly measure the duration and then calculate it by yourself.

              – orion
              Mar 7 '14 at 11:44

















            it did not work in my case: root@Xilinx-ZC702-14_7:/dev# hdparm -T -sh: hdparm: not found root@Xilinx-ZC702-14_7:/dev# hdparm -t -sh: hdparm: not found

            – msz
            Mar 7 '14 at 9:28





            it did not work in my case: root@Xilinx-ZC702-14_7:/dev# hdparm -T -sh: hdparm: not found root@Xilinx-ZC702-14_7:/dev# hdparm -t -sh: hdparm: not found

            – msz
            Mar 7 '14 at 9:28













            Well install it first. It's quite standard, but usually not pre-installed.

            – orion
            Mar 7 '14 at 9:33





            Well install it first. It's quite standard, but usually not pre-installed.

            – orion
            Mar 7 '14 at 9:33













            this is not implemented for petalinux.

            – msz
            Mar 7 '14 at 9:50





            this is not implemented for petalinux.

            – msz
            Mar 7 '14 at 9:50













            Embedded implementations are usually very limited. It's possible that this extra line of verbosity from dd isn't even implemented. gnu versions of core utilities are very extended compared to the bare standard. Do you have time available to directly measure the duration and then calculate it by yourself.

            – orion
            Mar 7 '14 at 11:44





            Embedded implementations are usually very limited. It's possible that this extra line of verbosity from dd isn't even implemented. gnu versions of core utilities are very extended compared to the bare standard. Do you have time available to directly measure the duration and then calculate it by yourself.

            – orion
            Mar 7 '14 at 11:44


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f118554%2fdd-command-finding-read-write-throughput-of-a-flash-sd%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

            is 'sed' thread safe

            How to make a Squid Proxy server?