lmdd.1 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. .\" %W% %G%
  2. .TH LMDD 1
  3. .SH NAME
  4. lmdd \- move io for performance and debugging tests
  5. .SH SYNOPSIS
  6. .B lmdd
  7. [
  8. .IB option = value
  9. ] .\|.\|.
  10. .SH DESCRIPTION
  11. .B lmdd
  12. copies a specified input file to a specified output with possible
  13. conversions. This program is primarily useful for timing I/O since it
  14. prints out the timing statistics after completing.
  15. .SH OPTIONS
  16. .TP 15
  17. .BI if= name
  18. Input file is taken from
  19. .IR name ;
  20. .I internal
  21. is the default.
  22. .I internal
  23. is a special file that acts like Sun's
  24. .IR /dev/zero ,
  25. i.e., it provides a buffer of zeros without doing a system call to get them.
  26. .TP
  27. .BI of= name
  28. Output file is taken from
  29. .IR name ;
  30. .I internal
  31. is the default.
  32. .I internal
  33. is a special file that acts like
  34. .IR /dev/null ,
  35. without doing a system call to get rid of the data.
  36. .TP
  37. .BI bs= n
  38. Input and output block size
  39. .I n
  40. bytes (default 8192). Note that this is different from dd(1), it has
  41. a 512 byte default. Also note that the block size can be followed
  42. by 'k' or 'm' to indicate kilo bytes (*1024) or megabytes (*1024*1024),
  43. respectively.
  44. .TP
  45. .BI ipat= n
  46. If
  47. .B n
  48. is non zero, expect a known pattern in the file (see opat). Mismatches
  49. will be displayed as "ERROR: off=%d want=%x got=%x". The pattern is
  50. a sequence of 4 byte integers with the first 0, second 1, and so on.
  51. The default is not to check for the pattern.
  52. .TP
  53. .BI opat= n
  54. If
  55. .B n
  56. is non zero, generate a known pattern on the output stream. Used for
  57. debugging file system correctness.
  58. The default is not to generate the pattern.
  59. .TP
  60. .BI mismatch= n
  61. If
  62. .B n
  63. is non zero, stop at the first mismatched value. Used with ipat.
  64. .TP
  65. .BI skip= n
  66. Skip
  67. .IR n ""
  68. input blocks before starting copy.
  69. .TP
  70. .BI fsync= n
  71. If
  72. .I n
  73. is non-zero, call fsync(2) on the output file before exiting or printing
  74. timing statistics.
  75. .TP
  76. .BI sync= n
  77. If
  78. .I n
  79. is non-zero, call sync(2) before exiting or printing
  80. timing statistics.
  81. .TP
  82. .BI rand= n
  83. This argument, by default off, turns on random behavior. The argument is
  84. not a flag, it is a size, that size is used as the upper bound for the
  85. seeks.
  86. Also note that the block size can be followed
  87. by 'k' or 'm' to indicate kilo bytes (*1024) or megabytes (*1024*1024),
  88. .TP
  89. .BI flush= n
  90. If
  91. .I n
  92. is non-zero and mmap(2) is available, call msync(2) to invalidate the
  93. output file. This flushes the file to disk so that you don't have
  94. unmount/mount. It is not as good as mount/unmount because it just
  95. flushes file pages - it misses the indirect blocks which are still
  96. cached. Not supported on all systems, compile time option.
  97. .TP
  98. .BI rusage= n
  99. If
  100. .I n
  101. is non-zero, print rusage statistics as well as timing statistics.
  102. Not supported on all systems, compile time option.
  103. .TP
  104. .BI count= n
  105. Copy only
  106. .IR n ""
  107. input records.
  108. .SH EXAMPLES
  109. .LP
  110. This is the most common usage, the intent is to measure disk performance.
  111. The disk is a spare partition mounted on /spare.
  112. .sp
  113. .nf
  114. .in +4
  115. # mount /spare
  116. # lmdd if=internal of=/spare/XXX count=1000 fsync=1
  117. 7.81 MB in 3.78 seconds (2.0676 MB/sec)
  118. : Flush cache
  119. # umount /spare
  120. # mount /spare
  121. # lmdd if=/spare/XXX of=internal
  122. 7.81 MB in 2.83 seconds (2.7611 MB/sec)
  123. .in
  124. .sp
  125. .fi
  126. .SH AUTHOR
  127. Larry McVoy, lm@sun.com
  128. .br
  129. Not copyrighted.