当我--file-total-size=30G 并且指定3个文件的时候,结果是产生3个10G的文件,然而--max-time=20被忽视了,虽然指定了20s的限制,实际上是在prepare阶段,--max-time参数无效

  1. [root@jiangyi01.sqa.zmf /home/ahao.mah/ALIOS_QA/tools/sysbench]
  2. #sysbench --batch --test=fileio --max-requests=0 --max-time=20 --num-threads=10 --file-num=3 --file-block-size=16384 --file-total-size=30G --file-fsync-all=on --file-test-mode=seqwr --file-fsync-freq=100 --file-fsync-mode=fsync --file-fsync-end=on prepare
  3. sysbench 0.5: multi-threaded system evaluation benchmark
  4. 3 files, 10485760Kb each, 30720Mb total
  5. Creating files for the test...
  6. Extra file open flags: 0
  7. Creating file test_file.0
  8. Creating file test_file.1
  9. Creating file test_file.2
  10. 32212254720 bytes written in 239.40 seconds (128.32 MB/sec).

可见,确实是3个10G的文件

  1. -rw------- 1 root root 10737418240 Jan 20 14:08 test_file.0
  2. -rw------- 1 root root 10737418240 Jan 20 14:10 test_file.1
  3. -rw------- 1 root root 10737418240 Jan 20 14:11 test_file.2
  4. [root@jiangyi01.sqa.zmf /home/ahao.mah/ALIOS_QA/tools/sysbench]
  5. #echo "10737418240/1024/1024/1024" | bc
  6. 10

从iostat -dx 可以看到prepare阶段,写入速度却是是在150MB/s左右

  1. [root@jiangyi01.sqa.zmf /home/ahao.mah]
  2. #iostat -dx 1
  3. Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
  4. sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
  5. sda 0.00 0.00 0.00 299.00 0.00 152576.00 1020.58 144.11 433.07 0.00 433.07 3.34 100.00
  6. sdl 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
  7. sdg 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
  8. sdi 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
  9. sdc 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
  1. [root@jiangyi01.sqa.zmf /home/ahao.mah]
  2. #echo "152576.00/1024" |bc
  3. 149

run阶段 ,可以指定--max-time=10 ,最大运行时间10s,

sysbench --batch --test=fileio --max-requests=0 --max-time=10 --num-threads=10 --file-num=3 --file-block-size=16384 --file-total-size=3G --file-fsync-all=on --file-test-mode=seqwr --file-fsync-freq=100 --file-fsync-mode=fsync --file-fsync-end=on run

  1. [root@jiangyi01.sqa.zmf /home/ahao.mah/ALIOS_QA/tools/sysbench]
  2. #sysbench --batch --test=fileio --max-requests=0 --max-time=10 --num-threads=10 --file-num=3 --file-block-size=16384 --file-total-size=3G --file-fsync-all=on --file-test-mode=seqwr --file-fsync-freq=100 --file-fsync-mode=fsync --file-fsync-end=on run
  3. sysbench 0.5: multi-threaded system evaluation benchmark
  4. Running the test with following options:
  5. Number of threads: 10
  6. Random number generator seed is 0 and will be ignored
  7. Extra file open flags: 0
  8. 3 files, 1Gb each
  9. 3Gb total file size
  10. Block size 16Kb
  11. Calling fsync() after each write operation.
  12. Using synchronous I/O mode
  13. Doing sequential write (creation) test
  14. Threads started!
  15. Operations performed: 0 reads, 3236 writes, 3236 Other = 6472 Total
  16. Read 0b Written 50.562Mb Total transferred 50.562Mb (5.053Mb/sec)
  17. 323.39 Requests/sec executed
  18. General statistics:
  19. total time: 10.0064s
  20. total number of events: 3236
  21. total time taken by event execution: 99.3885s
  22. response time:
  23. min: 25.02ms
  24. avg: 30.71ms
  25. max: 127.37ms
  26. approx. 95 percentile: 41.80ms
  27. Threads fairness:
  28. events (avg/stddev): 323.6000/5.73
  29. execution time (avg/stddev): 9.9388/0.16

  1. [root@jiangyi01.sqa.zmf /home/ahao.mah/ALIOS_QA/tools/sysbench]
  2. #vmstat 1 100
  3. procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
  4. r b swpd free buff cache si so bi bo in cs us sy id wa st
  5. 2 0 118252 88090768 722400 8331964 0 0 0 9 2 0 7 0 93 0 0
  6. 2 0 118252 88090736 722400 8331964 0 0 0 64 3728 3371 8 0 92 0 0
  7. 2 0 118252 88090704 722400 8331964 0 0 0 0 3711 3312 8 0 92 0 0
  8. 3 10 118252 88221872 722400 8199968 0 0 0 1172 5417 6645 8 0 89 2 0
  9. 2 1 118240 88219456 722400 8201592 0 0 0 5028 9756 14749 8 0 85 6 0
  10. 2 10 118240 88216768 722400 8205732 0 0 0 5872 10912 17274 8 0 85 6 0
  11. 2 1 118240 88213424 722400 8210756 0 0 0 5744 10617 16673 8 0 85 6 0
  12. 2 1 118240 88207472 722400 8217140 0 0 0 6080 11200 17877 8 0 85 6 0
  13. 2 1 118240 88199480 722400 8221092 0 0 0 5900 11029 17113 9 0 85 6 0
  14. 2 1 118240 88195040 722400 8226416 0 0 0 6120 10819 17081 8 0 85 6 0
  15. 2 1 118240 88190576 722400 8232228 0 0 0 5896 11299 18021 8 0 85 6 0
  16. 4 7 118240 88185984 722400 8236884 0 0 0 6040 10974 17456 8 0 85 6 0
  17. 2 1 118240 88179416 722400 8243020 0 0 0 6312 11982 19169 8 0 84 7 0
  18. 3 0 118240 88175520 722400 8248028 0 0 0 3536 7896 11291 8 0 88 4 0
  19. 2 0 118240 88173376 722400 8250004 0 0 0 8 3866 3435 8 0 92 0 0
  20. 2 0 118240 88173344 722400 8250036 0 0 0 0 3681 3283 8 0 92 0 0
  21. 2 0 118240 88173344 722400 8250036 0 0 0 0 3706 3308 8 0 92 0 0
  22. 2 0 118240 88173344 722400 8250040 0 0 0 0 3677 3278 8 0 92 0 0
  23. procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
  24. r b swpd free buff cache si so bi bo in cs us sy id wa st
  25. 3 0 118240 88172816 722400 8250040 0 0 0 40 3778 3419 8 0 91 0 0
  26. ^C
  1. [root@jiangyi01.sqa.zmf /home/ahao.mah]
  2. #iostat -dx 1 | grep sda
  3. Linux 3.10.0-327.ali2000.alios7.x86_64 (jiangyi01.sqa.zmf) 01/20/2017 _x86_64_ (24 CPU)
  4. Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
  5. sda 0.07 2.86 0.10 3.44 1.83 204.26 116.29 0.17 47.86 5.16 49.14 3.33 1.18
  6. sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
  7. sda 0.00 42.00 0.00 60.00 0.00 1008.00 33.60 0.49 7.88 0.00 7.88 6.45 38.70
  8. sda 0.00 115.00 0.00 326.00 0.00 5004.00 30.70 1.38 4.27 0.00 4.27 3.06 99.70
  9. sda 0.00 130.00 0.00 384.00 0.00 5896.00 30.71 1.43 3.72 0.00 3.72 2.59 99.60
  10. sda 0.00 128.00 0.00 373.00 0.00 5720.00 30.67 1.41 3.75 0.00 3.75 2.66 99.30
  11. sda 0.00 134.00 0.00 396.00 0.00 6080.00 30.71 1.43 3.62 0.00 3.62 2.51 99.50
  12. sda 0.00 131.00 0.00 384.00 0.00 5900.00 30.73 1.44 3.72 0.00 3.72 2.60 99.80
  13. sda 0.00 139.00 0.00 399.00 0.00 6120.00 30.68 1.49 3.77 0.00 3.77 2.50 99.70
  14. sda 0.00 126.00 0.00 372.00 0.00 5712.00 30.71 1.43 3.80 0.00 3.80 2.68 99.70
  15. sda 0.00 134.00 0.00 396.00 0.00 6080.00 30.71 1.45 3.67 0.00 3.67 2.51 99.50
  16. sda 0.00 140.00 0.00 408.00 0.00 6272.00 30.75 1.50 3.65 0.00 3.65 2.43 99.30
  17. sda 0.00 88.00 0.00 256.00 0.00 3908.00 30.53 0.93 3.72 0.00 3.72 2.43 62.10
  18. sda 0.00 0.00 0.00 2.00 0.00 8.00 8.00 0.00 0.00 0.00 0.00 0.00 0.00
  19. sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
  20. sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
  21. sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
  22. sda 0.00 8.00 0.00 2.00 0.00 40.00 40.00 0.03 16.00 0.00 16.00 16.00 3.20
  23. sda 0.00 0.00 0.00 2.00 0.00 8.00 8.00 0.00 0.00 0.00 0.00 0.00 0.00
  24. sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
  25. ^C
  1. [root@jiangyi01.sqa.zmf /home/ahao.mah]
  2. #pid=`ps axu | grep sysbench | grep -v grep | awk '{print $2}'`;top -Hp $pid
  3. top - 16:13:03 up 7 days, 2:14, 6 users, load average: 6.44, 3.96, 2.92
  4. Threads: 11 total, 0 running, 11 sleeping, 0 stopped, 0 zombie
  5. %Cpu(s): 8.3 us, 0.3 sy, 0.0 ni, 84.5 id, 6.8 wa, 0.0 hi, 0.0 si, 0.0 st
  6. KiB Mem : 98795000 total, 88215232 free, 1637396 used, 8942372 buff/cache
  7. KiB Swap: 2097148 total, 1979208 free, 117940 used. 96616128 avail Mem
  8. PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
  9. 99140 root 20 0 59860 2888 2120 D 2.4 0.0 0:00.03 sysbench
  10. 99141 root 20 0 59860 2888 2120 D 2.4 0.0 0:00.03 sysbench
  11. 99142 root 20 0 59860 2888 2120 D 2.4 0.0 0:00.03 sysbench
  12. 99143 root 20 0 59860 2888 2120 D 2.4 0.0 0:00.03 sysbench
  13. 99145 root 20 0 59860 2888 2120 D 2.4 0.0 0:00.03 sysbench
  14. 99146 root 20 0 59860 2888 2120 D 2.4 0.0 0:00.03 sysbench
  15. 99147 root 20 0 59860 2888 2120 D 2.4 0.0 0:00.03 sysbench
  16. 99148 root 20 0 59860 2888 2120 D 2.4 0.0 0:00.03 sysbench
  17. 99139 root 20 0 59860 2888 2120 S 0.0 0.0 0:00.01 sysbench
  18. 99144 root 20 0 59860 2888 2120 D 0.0 0.0 0:00.03 sysbench
  19. 99149 root 20 0 59860 2888 2120 D 0.0 0.0 0:00.03 sysbench
  1. 04:11:36 PM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
  2. 04:11:37 PM all 8.33 0.00 0.33 6.21 0.00 0.00 0.00 0.00 0.00 85.12
  3. 04:11:37 PM 0 0.00 0.00 0.00 2.00 0.00 0.00 0.00 0.00 0.00 98.00
  4. 04:11:37 PM 1 100.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
  5. 04:11:37 PM 2 100.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
  6. 04:11:37 PM 3 0.00 0.00 0.00 3.00 0.00 0.00 0.00 0.00 0.00 97.00
  7. 04:11:37 PM 4 0.00 0.00 0.00 2.02 0.00 0.00 0.00 0.00 0.00 97.98
  8. 04:11:37 PM 5 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
  9. 04:11:37 PM 6 0.00 0.00 1.00 6.00 0.00 0.00 0.00 0.00 0.00 93.00
  10. 04:11:37 PM 7 0.00 0.00 0.99 13.86 0.00 0.00 0.00 0.00 0.00 85.15
  11. 04:11:37 PM 8 0.00 0.00 0.00 8.08 0.00 0.00 0.00 0.00 0.00 91.92
  12. 04:11:37 PM 9 0.00 0.00 0.99 9.90 0.00 0.00 0.00 0.00 0.00 89.11
  13. 04:11:37 PM 10 0.00 0.00 0.00 13.13 0.00 0.00 0.00 0.00 0.00 86.87
  14. 04:11:37 PM 11 0.00 0.00 1.00 15.00 0.00 0.00 0.00 0.00 0.00 84.00
  15. 04:11:37 PM 12 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
  16. 04:11:37 PM 13 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
  17. 04:11:37 PM 14 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
  18. 04:11:37 PM 15 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
  19. 04:11:37 PM 16 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
  20. 04:11:37 PM 17 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
  21. 04:11:37 PM 18 0.00 0.00 0.00 3.00 0.00 0.00 0.00 0.00 0.00 97.00
  22. 04:11:37 PM 19 0.00 0.00 0.00 3.03 0.00 0.00 0.00 0.00 0.00 96.97
  23. 04:11:37 PM 20 0.00 0.00 0.99 63.37 0.00 0.00 0.00 0.00 0.00 35.64
  24. 04:11:37 PM 21 0.00 0.00 0.00 4.00 0.00 0.00 0.00 0.00 0.00 96.00
  25. 04:11:37 PM 22 0.00 0.00 1.00 2.00 0.00 0.00 0.00 0.00 0.00 97.00
  26. 04:11:37 PM 23 0.00 0.00 0.00 2.00 0.00 0.00 0.00 0.00 0.00 98.00
  27. 04:11:37 PM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
  28. 04:11:38 PM all 8.34 0.00 0.25 6.09 0.00 0.00 0.00 0.00 0.00 85.32
  29. 04:11:38 PM 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
  30. 04:11:38 PM 1 100.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
  31. 04:11:38 PM 2 100.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
  32. 04:11:38 PM 3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
  33. 04:11:38 PM 4 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
  34. 04:11:38 PM 5 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
  35. 04:11:38 PM 6 0.00 0.00 0.00 23.23 0.00 0.00 0.00 0.00 0.00 76.77
  36. 04:11:38 PM 7 0.00 0.00 1.00 36.00 0.00 0.00 0.00 0.00 0.00 63.00
  37. 04:11:38 PM 8 0.00 0.00 1.00 18.00 0.00 0.00 0.00 0.00 0.00 81.00
  38. 04:11:38 PM 9 0.00 0.00 1.00 23.00 0.00 0.00 0.00 0.00 0.00 76.00
  39. 04:11:38 PM 10 0.00 0.00 1.00 9.00 0.00 0.00 0.00 0.00 0.00 90.00
  40. 04:11:38 PM 11 0.00 0.00 0.00 16.16 0.00 0.00 0.00 0.00 0.00 83.84
  41. 04:11:38 PM 12 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
  42. 04:11:38 PM 13 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
  43. 04:11:38 PM 14 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
  44. 04:11:38 PM 15 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
  45. 04:11:38 PM 16 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
  46. 04:11:38 PM 17 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
  47. 04:11:38 PM 18 0.00 0.00 0.00 2.02 0.00 0.00 0.00 0.00 0.00 97.98
  48. 04:11:38 PM 19 0.00 0.00 0.99 2.97 0.00 0.00 0.00 0.00 0.00 96.04
  49. 04:11:38 PM 20 0.00 0.00 0.00 4.00 0.00 0.00 0.00 0.00 0.00 96.00
  50. 04:11:38 PM 21 0.00 0.00 1.00 3.00 0.00 0.00 0.00 0.00 0.00 96.00
  51. 04:11:38 PM 22 0.00 0.00 0.00 4.00 0.00 0.00 0.00 0.00 0.00 96.00
  52. 04:11:38 PM 23 0.00 0.00 0.00 4.00 0.00 0.00 0.00 0.00 0.00 96.00

对比

  1. [root@dnstest08.tbc /home/ahao.mah/muahao01]
  2. #sysbench --batch --test=fileio --max-requests=0 --max-time=10 --num-threads=10 --file-num=3 --file-block-size=16384 --file-total-size=3G --file-fsync-all=on --file-test-mode=seqwr --file-fsync-freq=100 --file-fsync-mode=fsync --file-fsync-end=on prepare
  3. sysbench 0.5: multi-threaded system evaluation benchmark
  4. 3 files, 1048576Kb each, 3072Mb total
  5. Creating files for the test...
  6. Extra file open flags: 0
  7. Creating file test_file.0
  8. Creating file test_file.1
  9. Creating file test_file.2
  10. 3221225472 bytes written in 21.19 seconds (144.99 MB/sec).
  11. [root@dnstest08.tbc /home/ahao.mah/muahao01]
  12. #sysbench --batch --test=fileio --max-requests=0 --max-time=10 --num-threads=10 --file-num=3 --file-block-size=16384 --file-total-size=3G --file-fsync-all=on --file-test-mode=seqwr --file-fsync-freq=100 --file-fsync-mode=fsync --file-fsync-end=on run
  13. sysbench 0.5: multi-threaded system evaluation benchmark
  14. Running the test with following options:
  15. Number of threads: 10
  16. Random number generator seed is 0 and will be ignored
  17. Extra file open flags: 0
  18. 3 files, 1Gb each
  19. 3Gb total file size
  20. Block size 16Kb
  21. Calling fsync() after each write operation.
  22. Using synchronous I/O mode
  23. Doing sequential write (creation) test
  24. Threads started!
  25. Operations performed: 0 reads, 17863 writes, 17863 Other = 35726 Total
  26. Read 0b Written 279.11Mb Total transferred 279.11Mb (27.907Mb/sec)
  27. 1786.02 Requests/sec executed
  28. General statistics:
  29. total time: 10.0016s
  30. total number of events: 17863
  31. total time taken by event execution: 99.9587s
  32. response time:
  33. min: 0.49ms
  34. avg: 5.60ms
  35. max: 44.90ms
  36. approx. 95 percentile: 10.50ms
  37. Threads fairness:
  38. events (avg/stddev): 1786.3000/12.69
  39. execution time (avg/stddev): 9.9959/0.00

  1. [root@jiangyi01.sqa.zmf /home/ahao.mah/ALIOS_QA/tools/sysbench]
  2. #sysbench --batch --test=fileio --max-requests=0 --max-time=10 --num-threads=10 --file-num=3 --file-block-size=16384 --file-total-size=3G --file-fsync-all=on --file-test-mode=seqwr --file-fsync-freq=100 --file-fsync-mode=fsync --file-fsync-end=on prepare
  3. sysbench 0.5: multi-threaded system evaluation benchmark
  4. 3 files, 1048576Kb each, 3072Mb total
  5. Creating files for the test...
  6. Extra file open flags: 0
  7. Creating file test_file.0
  8. Creating file test_file.1
  9. Creating file test_file.2
  10. 3221225472 bytes written in 24.05 seconds (127.76 MB/sec).
  11. [root@jiangyi01.sqa.zmf /home/ahao.mah/ALIOS_QA/tools/sysbench]
  12. #sysbench --batch --test=fileio --max-requests=0 --max-time=10 --num-threads=10 --file-num=3 --file-block-size=16384 --file-total-size=3G --file-fsync-all=on --file-test-mode=seqwr --file-fsync-freq=100 --file-fsync-mode=fsync --file-fsync-end=on run
  13. sysbench 0.5: multi-threaded system evaluation benchmark
  14. Running the test with following options:
  15. Number of threads: 10
  16. Random number generator seed is 0 and will be ignored
  17. Extra file open flags: 0
  18. 3 files, 1Gb each
  19. 3Gb total file size
  20. Block size 16Kb
  21. Calling fsync() after each write operation.
  22. Using synchronous I/O mode
  23. Doing sequential write (creation) test
  24. Threads started!
  25. Operations performed: 0 reads, 3320 writes, 3320 Other = 6640 Total
  26. Read 0b Written 51.875Mb Total transferred 51.875Mb (5.1828Mb/sec)
  27. 331.70 Requests/sec executed
  28. General statistics:
  29. total time: 10.0091s
  30. total number of events: 3320
  31. total time taken by event execution: 99.7836s
  32. response time:
  33. min: 21.76ms
  34. avg: 30.06ms
  35. max: 183.33ms
  36. approx. 95 percentile: 41.78ms
  37. Threads fairness:
  38. events (avg/stddev): 332.0000/3.00
  39. execution time (avg/stddev): 9.9784/0.08

sysbench_fileio.sh的更多相关文章

  1. 数据库备份并分离日志表(按月)sh 脚本

    #!/bin/sh year=`date +%Y` month=`date +%m` day=`date +%d` hour=`date +%H` dir="/data/dbbackup/f ...

  2. Linux下如何查找.sh后缀的文件

    find / -name *.sh或locate *.shfind 与locate的区别:locate 配合数据库查看文件位置 find 实际搜寻硬盘查询文件名称

  3. sh 测试网段在线主机

    yum install nmap nmap -sP  192.168.21.1/24 查看网段在线主机 grep -vwf file1 file2 文件内容比较 #!/bin/bash # day=` ...

  4. Maven打包生成可运行bat/sh脚本文件

    利用Maven的appassembler-maven-plugin插件,就可以实现自动打包可运行的脚本,还可以跨平台.   <plugin>      <groupId>org ...

  5. 记一个简单的保护if 的sh脚本

    真是坑爹,就下面的sh,竟然也写了很久! if [ `pwd` != '/usr/xx/bin/tomcat' ] then echo "rstall is not allowed in c ...

  6. 主机巡检脚本:OSWatcher.sh

    主机巡检脚本:OSWatcher.sh 2016-09-26更新,目前该脚本只支持Linux操作系统,后续有需求可以继续完善. 注意: 经测试,普通用户执行脚本可以顺利执行前9项检查: 第10项,普通 ...

  7. Oracle巡检脚本:ORAWatcher.sh

    Oracle巡检脚本:ORAWatcher.sh #!/usr/bin/ksh echo "" echo "ORAWatcher Version:1.0.1" ...

  8. 解决:/bin/sh: 1: /home/**/custom_app.sh: Permission denied错误

    出现如下错误,一般是执行权限不够. /bin/sh: : /home/custom_app.sh: Permission denied 解决方法是:cd 到此文件目录,对提示的文件赋予可执行权限或读写 ...

  9. SH Script Grammar

    http://linux.about.com/library/cmd/blcmdl1_sh.htm http://pubs.opengroup.org/onlinepubs/9699919799/ut ...

随机推荐

  1. j2se回想

    执行Java程序. Java程序有两种方式一种是jar包.一种是class. 执行jar,Java -jar XXX.jar执行的时候,Java.exe调用GetMainClassName函数,该函数 ...

  2. URAL 1822. Hugo II&#39;s War 树的结构+二分

    1822. Hugo II's War Time limit: 0.5 second Memory limit: 64 MB The glorious King Hugo II has declare ...

  3. tomcat连接mysql的3个问题解决

    转载请标明出处: 本文出自:[ouyida3的博客] 1.BasicDataSourceFactory Caused by: java.lang.ClassNotFoundException: org ...

  4. jQuery 插件开发全解析

    jQuery插件的开发包含两种: 一种是类级别的插件开发,即给jQuery加入新的全局函数,相当于给jQuery类本身加入方法.jQuery 的全局函数就是属于jQuery命名空间的函数,还有一种是对 ...

  5. JAVA不让类实例化的方法

    虽然java是面向对象编程,但也要尽可能避免创建不必要的对象,因为创建过多的对象不仅占用系统资源,而且多了很多不必要的创建销毁对象开销. 那么有哪些避免类创建对象的方法吗? 1,定义私有构造函数.这在 ...

  6. IJ-java-com-util-common:

    ylbtech-IJ-java-com-util-common: 1.返回顶部   2.返回顶部   3.返回顶部   4.返回顶部   5.返回顶部     6.返回顶部   作者:ylbtech出 ...

  7. 网络简要<入门篇>

    OSI七层 网络的含义:两个不在同一地理位置的主机(终端),通过传输介质和通信协议,实现通信和资源共享. 网络四要素:终端,传输介质 ,通信协议,资源 网络分类: 以范围分类:LAN网(局域网,以太网 ...

  8. PKUSC2017 游记 密码:blog密码

    退役之前,写点破事乐呵乐呵 省选滚大粗   报了PKU和THU的SC  果然THU直接审核不通过... 于是就来到了PKU   滚粗狗就又续命几天. Day1 上午考数学 喜闻乐见啥都不会 出来一对题 ...

  9. android GPS 定位,取位置信息

    现在很多app ,需要取位置信息,所以我也做了一个模块用来取位置信息:   加入位置服务所需的权限: <uses-permission android:name="android.pe ...

  10. setjmp和longjmp函数

    关于setjmp函数和longjmp函数有话要说,是UNIX高级环境变成看到了10.10信号那章用到了,研究一下,这里作为补充. setjmp(jmp_buf env_buf) 函数可以将当前的运行环 ...