Giter Club home page Giter Club logo

neveridle's People

Contributors

ansen avatar deci8belios avatar layou233 avatar r3inbowari avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

neveridle's Issues

一键脚本默认会一直运行吗

请问执行一键脚本后,如果不出错、vps也没有重启,它会一直自动运行下去吗?按照一键脚本固定的规则消耗甲骨文的资源
谢谢

CPU usage inadequate

I'm using a 4 core VM.Standard.A1.Flex, and also your NeverIdle-linux-arm64 script, and noticed that the CPU activity does not reach the 95th Percentile target set by Oracle.
Even if the CPU feature was set to run -c 1m, it would still not reach the 95th Percentile target, as it only runs for less than a minute each time, and then only reached 8% at it's peak, and most times it's much lower.

Here is docker file for anyone who dont want to deal with screens

i use this with caprover so i can run this with docker
NOTE :- change wget url as reuired for amd or arm server

FROM alpine:latest

# Install dependencies
RUN apk update && apk add --no-cache wget

# Download script
RUN wget https://github.com/layou233/NeverIdle/releases/download/0.1/NeverIdle-linux-arm64 -O /usr/local/bin/NeverIdle

# Change file permission
RUN chmod 777 /usr/local/bin/NeverIdle

# Run the script with default arguments
CMD ["/bin/sh", "-c", "/usr/local/bin/NeverIdle -c 2h -m 2 -n 4h"]

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

gomod
go.mod
  • go 1.19
  • github.com/shirou/gopsutil/v3 v3.24.3
  • github.com/showwin/speedtest-go v1.6.10
  • go.einride.tech/pid v0.1.2
  • golang.org/x/crypto v0.22.0
  • golang.org/x/sys v0.19.0

  • Check this box to trigger a request for Renovate to run again on this repository

getting "panic: invalid argument to Int31n" with version 0.2

Hi there,

i'm getting the following error when starting version 0.2

Start:

./NeverIdle -c 1h -n 3h > NeverIdle.log 2>&1 &

Logfile shows:

====================
Starting CPU wasting with interval 1h0m0s
====================
====================
Starting network speed testing with interval 3h0m0s
====================
[CPU] Successfully wasted on 2023-03-04 11:17:16.885686988 +0000 GMT m=+0.009873685
panic: invalid argument to Int31n

goroutine 17 [running]:
math/rand.(*Rand).Int31n(0x0?, 0x0?)
        math/rand/rand.go:138 +0xdb
math/rand.Int31n(...)
        math/rand/rand.go:353
github.com/layou233/neveridle/waste.Network(0x0?)
        github.com/layou233/neveridle/waste/network.go:35 +0x211
created by main.main
        ./main.go:52 +0x69d

Version 0.1 works.

uname -a
Linux 4.14.35-2047.522.3.el7uek.x86_64 #2 SMP Fri Jan 20 16:05:02 PST 2023 x86_64 x86_64 x86_64 GNU/Linux

Image is "Oracle-Linux-7.7-2019.08.28-0"

Thanks

当运行时长一段时间,出错退出

[CPU] Successfully wasted on 2023-02-21 22:57:18.687024367 +0000 UTC m=+1850408.314042512
panic: chacha20: counter overflow

goroutine 52850 [running]:
golang.org/x/crypto/chacha20.(*Cipher).XORKeyStream(0xc000108160?, {0xc000180000?, 0xc000147b80?, 0xc000880b40?}, {0xc000180000?, 0x6ed310?, 0xc0008f8600?})
golang.org/x/[email protected]/chacha20/chacha_generic.go:218 +0x408
main.WasteCPU.func1()
NeverIdle/cpu.go:30 +0x48
created by main.WasteCPU
NeverIdle/cpu.go:28 +0x1e5
Ubuntu 18.04.4 LTS (GNU/Linux 5.4.0-1066-oracle x86_64)

arm机器的测速都是没有显示结果

看了两台arm机器,好像都没有显示,一些数据如下:

[NETWORK] SpeedTest Ping: 152.278863ms , 2.1863757762040916 , Upload: 0.6479155546829458 via [37235] 8331.62km
Shenyang (China) by Unicom

[NETWORK] SpeedTest Ping: 84.991532ms , 34.01522008046169 , Upload: 37.481146947397846 via [37235] 8331.62km
Shenyang (China) by Unicom

[NETWORK] SpeedTest Ping: 124.063885ms , -1 , Upload: -1 via [37235] 8331.62km
Shenyang (China) by Unicom
[NETWORK] SpeedTest Ping: -1ns , -1 , Upload: -1 via [5249] 2.21km
Seoul (South Korea) by Ookla

[NETWORK] SpeedTest Ping: -1ns , -1 , Upload: -1 via [5249] 2.21km
Seoul (South Korea) by Ookla

[NETWORK] SpeedTest Ping: -1ns , -1 , Upload: -1 via [5249] 2.21km
Seoul (South Korea) by Ookla

关于CPU占用

请问这个CPU消耗能指定线程数吗
每次消耗会跑多少时间呢?
如果只是突发的高占用可能被95百分位数忽略?
能考虑弄个限制CPU使用率吗。比如设置常年占用10%就不用指定间隔,一直跑就好了。

每次运行都会多出一个进程

RT,本人ARM A1实例(2ocpu 24G),目前使用宝塔面板的计划任务执行该脚本(因为不懂代码),已将脚本参数设置为 -cp 0.3 -m 2 -n 2h,如下图所示
搜狗截图20231210070557
运行后cpu占用、内存占用都在30左右、网络测速也正常进行。感谢开发者的无私分享。但有些疑问:

  1. 计划任务里已经定义了运行脚本的时间间隔,脚本本身也有个-n两小时的时间间隔,叠加在一起的话会怎么计算的。我看Oracle最新的要求已经变成了内存、CPU、网络使用率最低需要95%时间>20%了,我这里的设置是否能满足需求呢?
  2. 我发现脚本每执行一次,系统就会多出一个相同的NerverIdle-linux进程,如此CPU和内存越越来越大,直到超过80%收到告警,然后为了避免100%我每次都要手动kill一下多出来的重复进程。所以按我的理解这个脚本只要跑起来就已经起到了CPU和内存占用的目的,似乎没必要一直重复去运行它?就是测速是一次性的,可能需要隔段时间去运行一次。如果是这样的话,那我应该怎么去设定这个计划呢(不知道我的理解是否有问题)
    以上,希望有大佬帮忙解答一下,谢谢!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.