Code Monkey home page Code Monkey logo

lookbusy-docker's Introduction

lookbusy-docker

用于使你的服务器看起来很忙碌,简单易用!懒得看部署方法可以直接跳到最后用懒人方法 原项目为 https://github.com/flow2000/lookbusy 本项目将其封装为docker进行部署,应要求,也提供二进制程序直接运行的方法

使用方法

构建镜像

克隆本仓库后

docker build . t lookbusy

修改运行参数

修改 start.sh中的各项参数,参考如下

lookbusy -c 50 # 占用所有 CPU 核心各 50%
lookbusy -c 50 -n 2 # 占用两个 CPU 核心各 50%
lookbusy -c 50-80 -r curve # 占用所有 CPU 核心在 50%-80% 左右浮动
lookbusy -c 0 -m 128MB -M 1000 # 每 1000 毫秒,循环释放并分配 128MB 内存
lookbusy -c 0 -d 1GB -b 1MB -D 10 # 每 10 毫秒,循环进行 1MB 磁盘写入,临时文件不超过 1GB

此处参考博客 https://51.ruyo.net/18289.html

运行

docker run -d --name lookbusy --restart=always -v /PATH/TO/start.sh:/app/start.sh lookbusy

其中 /PATH/TO/start.sh 指到达克隆下来的lookbusy仓库的start.sh脚本的绝对路径

懒人方法

二进制文件启动

wget https://raw.githubusercontent.com/velor2012/lookbusy-docker/main/lookbusy${-arm} -O lookbusy && chmod +x lookbusy
./lookbusy -c 50-60 -r curve -n 2 # 运行参数请根据实际情况修改

注意如果是arm架构,需要在lookbusy后加上-arm

docker启动

wget https://raw.githubusercontent.com/velor2012/lookbusy-docker/main/start.sh

修改start.sh配置后

docker run -d --name lookbusy --restart=always -v /PATH/TO/start.sh:/app/start.sh velor2012/lookbusy${-arm}

注意如果是arm架构,需要在lookbusy后加上-arm,即镜像名为velor2012/lookbusy-arm

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.