GithubHelp home page GithubHelp logo

xyproto / easy Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 1.71 MB

:shaved_ice: nice and ionice combined to a single utility, written in pure Go

License: GNU General Public License v2.0

Roff 31.95% Go 46.37% Shell 21.68%
ionice cli utility drop-in-replacement linux nice priority go

easy's Introduction

Easy

Easy implements the functionality of both nice and ionice without using C.

It's also a drop-in replacement for ionice (from util-linux).

  • Easy started out as a port of ionice to Go, but more functionality has been added since then.
  • Easy can also be used to give applications increased I/O priority or niceness.
  • Easy may be useful for running ie. Zoom or Chromium on desktop Linux, with a lower I/O priority.

Example use

Run chromium in a very relaxed way (nice both in terms of CPU usage and in terms of I/O usage):

easy -c3 -N chromium

The same as above, but with the easier to remember --both or -b flag:

easy -b chromium

Differences from ionice

These flags are for adjusting the process niceness (from nice not ionice):

  • -N or --nice can be used to also set the process niceness to 10 (same as nice COMMAND).
  • -s or --setnice can be used to set the process niceness.
  • -a or --adjustment can be used to adjust the process niceness by the given offset.

Related projects

  • ionice from util-linux.
  • nice from coreutils.
  • tinyionice is a fork of ionice, in only 300 lines of C.
  • gionice is a Go module where the core functionality of the ionice utility has been ported to Go.

Why

This port exists mainly because I wanted to have a Go module for changing the I/O priority of servers written in Go. It was relatively easy to add a port of the ionice utility as well, once that was done.

Requirements

  • A recent Go compiler.
  • Linux.

Build

go build -mod=vendor

Install

install -Dm755 easy /usr/bin/easy
gzip easy.1
install -Dm644 easy.1.gz /usr/share/man/man1/easy.1.gz

Dev install with Go 1.17 or later

go install github.com/xyproto/easy@latest

General info

  • Version: 1.5.0
  • Licence: GPL2

easy's People

Contributors

xyproto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

easy's Issues

Rename project to spoon

Just like a process can be forked, it would be nice if a process could be spooned and take it easy.

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.