lmdd.8 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. .\" $Id$
  2. .TH LMDD 8 "$Date$" "(c)1994 Larry McVoy" "LMBENCH"
  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. .sp .5
  27. The following file names are taken to mean the standard input:
  28. .IR - ,
  29. .IR 0 ,
  30. or
  31. .IR stdin .
  32. .TP
  33. .BI of= name
  34. Output file is taken from
  35. .IR name ;
  36. .I internal
  37. is the default.
  38. .I internal
  39. is a special file that acts like
  40. .IR /dev/null ,
  41. without doing a system call to get rid of the data.
  42. .sp .5
  43. The following file names are taken to mean the standard output:
  44. .IR - ,
  45. .IR 1 ,
  46. or
  47. .IR stdout .
  48. .sp .5
  49. The following file names are taken to mean the standard error:
  50. .IR 2 ,
  51. or
  52. .IR stderr .
  53. .TP
  54. .BI bs= n
  55. Input and output block size
  56. .I n
  57. bytes (default 8192). Note that this is different from dd(1), it has
  58. a 512 byte default. Also note that the block size can be followed
  59. by 'k' or 'm' to indicate kilo bytes (*1024) or megabytes (*1024*1024),
  60. respectively.
  61. .TP
  62. .BI ipat= n
  63. If
  64. .B n
  65. is non zero, expect a known pattern in the file (see opat). Mismatches
  66. will be displayed as "ERROR: off=%d want=%x got=%x". The pattern is
  67. a sequence of 4 byte integers with the first 0, second 1, and so on.
  68. The default is not to check for the pattern.
  69. .TP
  70. .BI opat= n
  71. If
  72. .B n
  73. is non zero, generate a known pattern on the output stream. Used for
  74. debugging file system correctness.
  75. The default is not to generate the pattern.
  76. .TP
  77. .BI mismatch= n
  78. If
  79. .B n
  80. is non zero, stop at the first mismatched value. Used with ipat.
  81. .TP
  82. .BI skip= n
  83. Skip
  84. .IR n ""
  85. input blocks before starting copy.
  86. .TP
  87. .BI fsync= n
  88. If
  89. .I n
  90. is non-zero, call fsync(2) on the output file before exiting or printing
  91. timing statistics.
  92. .TP
  93. .BI sync= n
  94. If
  95. .I n
  96. is non-zero, call sync(2) before exiting or printing
  97. timing statistics.
  98. .TP
  99. .BI rand= n
  100. This argument, by default off, turns on random behavior. The argument is
  101. not a flag, it is a size, that size is used as the upper bound for the
  102. seeks.
  103. Also note that the block size can be followed
  104. by 'k' or 'm' to indicate kilo bytes (*1024) or megabytes (*1024*1024),
  105. .TP
  106. .BI flush= n
  107. If
  108. .I n
  109. is non-zero and mmap(2) is available, call msync(2) to invalidate the
  110. output file. This flushes the file to disk so that you don't have
  111. unmount/mount. It is not as good as mount/unmount because it just
  112. flushes file pages - it misses the indirect blocks which are still
  113. cached. Not supported on all systems, compile time option.
  114. .TP
  115. .BI rusage= n
  116. If
  117. .I n
  118. is non-zero, print rusage statistics as well as timing statistics.
  119. Not supported on all systems, compile time option.
  120. .TP
  121. .BI count= n
  122. Copy only
  123. .IR n ""
  124. input records.
  125. .SH EXAMPLES
  126. This is the most common usage, the intent is to measure disk performance.
  127. The disk is a spare partition mounted on /spare.
  128. .sp
  129. .nf
  130. .in +4
  131. # mount /spare
  132. # lmdd if=internal of=/spare/XXX count=1000 fsync=1
  133. 7.81 MB in 3.78 seconds (2.0676 MB/sec)
  134. : Flush cache
  135. # umount /spare
  136. # mount /spare
  137. # lmdd if=/spare/XXX of=internal
  138. 7.81 MB in 2.83 seconds (2.7611 MB/sec)
  139. .in
  140. .sp
  141. .fi
  142. .SH AUTHOR
  143. Larry McVoy, lm@sun.com