|
| 1 | +# NeverIdle |
| 2 | + |
| 3 | +**English** | [**简体中文**](README.md) |
| 4 | + |
| 5 | +*I love you, but do not stop my machine, could you?* |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +**To non-Chinese users:** |
| 10 | + |
| 11 | +Thank you for liking this program! :-P |
| 12 | +I invented this to share among my Chinese friends at first, but I didn't expect it to become popular in the world. |
| 13 | +Also, I'm sorry for the late official English README! Now just enjoy it. :-D |
| 14 | + |
| 15 | +If you need help, Google first, and then go to the issue. |
| 16 | +I speak Chinese and English. For other languages, please translate before asking questions. :) |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +## Usage |
| 21 | + |
| 22 | +Download executable file from Release. Note the distinction between amd64 and arm64. |
| 23 | + |
| 24 | +Start a screen on the server and run it. |
| 25 | +If you want to learn about screen command, just Google. |
| 26 | + |
| 27 | +Command arguments: |
| 28 | + |
| 29 | +```shell |
| 30 | +./NeverIdle -cp 0.15 -m 2 -n 4h |
| 31 | +``` |
| 32 | + |
| 33 | +In which: |
| 34 | + |
| 35 | +-c enables CPU periodic waste, followed by the interval between wastes. |
| 36 | +E.g. waste CPU every 12 hours 23 minutes and 34 seconds, then the argument would be `-c 12h23m34s`. |
| 37 | +Just follow this template. |
| 38 | + |
| 39 | +-cp enables coarse-grained CPU percentage waste, and the waste rate will change in real time with the usage level of the machine. |
| 40 | +If the maximum waste of 20% of the CPU is `-cp 0.2`. The value range of percentage is [0, 1] and be careful not to use it with `-c`. |
| 41 | + |
| 42 | +-m enables memory waste, followed by a number in GiB. |
| 43 | +After startup, the specified amount of memory will be occupied and will not be released until the process is killed. |
| 44 | + |
| 45 | +-n enables network(bandwidth) periodic waste, followed by the interval between wastes. |
| 46 | +Argument format is the same as `-c`. The Ookla Speed Test will be performed periodically (and the results will be output!) |
| 47 | + |
| 48 | +-t specifics the number of concurrent connections of the network periodic waste. |
| 49 | +The default is 10. The larger the value, the more resources will be consumed. For most situations, it does not need to be changed. |
| 50 | + |
| 51 | +-p specifics the process priority, followed by a priority value. If not specified, the lowest priority of the platform will be used by default. |
| 52 | +For UNIX-like systems (such as Linux, FreeBSD, and macOS), the value range is [-20,19], and the higher the number, the lower the priority. |
| 53 | +For Windows, see [the official documentation](https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-setpriorityclass). |
| 54 | +It is recommended not to specify because the default is the lowest priority, making way for all other processes. |
| 55 | + |
| 56 | +*All the functions you configured will be executed once immediately when you start the program, so you can take a look at the effect.* |
0 commit comments