This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Copied script from https://wiki.eddyn.net/CloudAtCost_Custom_OS | |
| # Usage: | |
| # curl -sL https://git.io/JqSg7 2>&1 | bash | |
| cdr2mask () | |
| { | |
| # Number of args to shift, 255..255, first non-255 byte, zeroes | |
| set -- $(( 5 - ($1 / 8) )) 255 255 255 255 $(( (255 << (8 - ($1 % 8))) & 255 )) 0 0 0 | |
| [[ $1 -gt 1 ]] && shift ${1} || shift |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Author: Chihyun Lim | |
| # Email: [email protected] | |
| # Description: sh script that grabs system stats | |
| # Output Order: | |
| # users, cpus, load 1m, load 5m, load 15m, | |
| # total tasks, running tasks, sleeping tasks, stopped tasks, zombie tasks, | |
| # un-niced user cpu usage, kernel cpu usage, niced user cpu usage, | |
| # I/O wait cpu usage, HW interrupt cpu usage, SW interrupt cpu usage, | |
| # stolen cpu usage, total memory, used memory, free memory, buffers, |