This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

3 Comments

1. Take the base-10 log of (max-min). Truncate it to the nearest integer. Call this integer n.

2. Calculate 10^n. Do an integer division (max-min)/10^n. The result is the most significant decimal digit of max-min. Call it msd.

3. If you want the range to be up to the next most significant digit, then the range you should plot is (msd+1)*10^n. For instance, if max=4610 and min=4233, then you will get a range of 400, which is just slightly bigger than max-min. Call this range r.

4. Calculate 10^((int)log10(r)). Call this number t. It is the same as r but with a 1 as the first digit. In the example it will be 100.

5. Calculate an integer division of min/t and then multiply the result by t. This will give you a "good" value for the minimum. It will be equal in this case to 4200. Call this value xmin.

6. Calculate an integer division of max/t and then multiply the result by t, and add t to this value. Call the final result xmax. This will be a "good" maximum value. In the example it will be 4700.

7. Calculate r+t and store the result in r. This is the actual range of the graph.

8. We now have everything except the tick marks. xmin is the minimum you should plot, xmax is the maximum you should plot. r is equal to xmax-xmin.

9. The tick marks depend on how many tick marks you want to plot. Calculate r/t. This will give you the minimum number of ticks you should place if you want them all on round numbers. It will be between 1 and 9. Call this number tck. Multiply it by some factor so that you get as many tick marks as you want. For instance, if you want the number of tick marks to be between tckmin and tckmax, you could use the following algorithm:

for(atck=tck; atck<=tckmin; atck+=tck);

This will place a value slightly bigger than tckmin in atck. atck will contain the number of ticks to draw, which should then be drawn evenly spaced throughout the graph.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Title | # Comments | Views | Activity |
---|---|---|---|

SQL Statment to match two tables in c# | 6 | 80 | |

How do I install gcc 4.8.4 on a Linux Ubuntu 14.04 machine? | 5 | 1,941 | |

How to creat good software interface ? | 1 | 67 | |

Windows 2012 R2 -- create 3.5TB GPT from unallocated space ? | 1 | 53 |

Join the community of 500,000 technology professionals and ask your questions.