3
edits
Changes
→Bash script
This script can show the failcount deltas for one or all containers since last reset, and reset the failcounts for one or all containers.
It uses only standard commands and programs that are usually included in all linux distro's:
* bash
* cat
* grep
* awk
* head
* tail
* printf
=== Installation ===
=== Show the beancounters ===
this compares the contents of /proc/user_beancounters and the reference file, and shows you the delta value
if no reference file exists, a copy of the user_beancounters file is used.
to only show you the failcounts for 1 container, just add the ctid or container name to the command
=== Reset failcounters ===
Confirmation will be asked.
=== Show only failcounts > 0 ===
=== Initialize reference file ===
This will check if the app-directory exists (/var/lib/beanc) and create it if necessary
It also creates a reference file (/var/lib/beanc/user_beancounters)
BEWARE, this command will overwrite any existing reference file !