Giter VIP home page Giter VIP logo

psdoom-containers's Introduction

psdoom-containers

Why?

psdoom-ng is a "remake" of the classic Doom but as kind of a "task manager". Beside of the possibility to shoot at your own pc's processes it is also possible to add custom commands to load, renice and kill processes.

psdoom-containers is a tiny CLI that creates output in the expected structure of psdoom-ng:

<user> <pid> <processname> <is_daemon=[1|0]>

but based on Docker containers or Kubernetes pods (Podman support is planned).

Installation

go get -u github.com/baez90/psdoom-containers/cmd/psdoom-containers

Usage

Docker

export PSDOOMPSCMD='psdoom-containers docker ps'
export PSDOOMRENICECMD='true'
export PSDOOMKILLCMD='psdoom-containers docker kill'

there's also the script ./scripts/psdoom-docker.sh that is setting the environemnt variables and starting psdoom-ng with some default parameters.

To get some tiny containers running that you can shoot at run the script ./scripts/spawn-containers.sh. It is creating a few Alpine Linux containers that are sleeping for 3600s to keep the load as low as possible.

Kubernetes

psdoom-ng expects the username of the process owner to be in one column of the output. While this is not directly possible for Docker containers (beside of probably something like labels) and therefore every container is "running as the current user" to have some targets, the Kubernetes implementation differs here.

For Kubernetes the username column is mapped to the pod namespace. Therefore if you don't want to add the flag to shoot at all pods, ensure that there's a Kubernetes namespace corresponding to your username:

kubectl create ns $(whoami)

and after that you can deploy some pods to the namespace to have some targets.

export PSDOOMPSCMD="psdoom-containers k8s ps"
export PSDOOMRENICECMD="true"
export PSDOOMKILLCMD="psdoom-containers k8s kill"

there's also the script ./scripts/psdoom-k8s.sh that is setting the environment variables and starting psdoom-ng with some default paramters.

To get a few tiny pods running you can deploy the sleep-deployment.yaml in the ./scripts directory. The deployment is configured to start 10 replicas of the same Alpine Linux container as the corresponding Docker script only running a sleep for 3600s.

psdoom-containers's People

Contributors

prskr avatar renovate-bot avatar

Watchers

 avatar  avatar

psdoom-containers's Issues

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

None detected


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

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.