Skip to content
Snippets Groups Projects

Docker checks: add docker net io

Merged Hahn Axel (hahn) requested to merge docker-checks into master
1 file
+ 6
1
Compare changes
  • Side-by-side
  • Inline
+ 6
1
@@ -320,6 +320,12 @@ function ph.toUnit(){
@@ -320,6 +320,12 @@ function ph.toUnit(){
local _value=$1
local _value=$1
local _unit=$2
local _unit=$2
local _digits=${3:-0}
local _digits=${3:-0}
 
local _dots
 
 
if [ "$_value" -eq "0" ]; then
 
echo "0"
 
return 0
 
fi
local _multiply; _multiply=$( ph._getExp "$_value" )
local _multiply; _multiply=$( ph._getExp "$_value" )
local _divisor; _divisor=$( ph._getExp "$_unit" )
local _divisor; _divisor=$( ph._getExp "$_unit" )
@@ -327,7 +333,6 @@ function ph.toUnit(){
@@ -327,7 +333,6 @@ function ph.toUnit(){
local _bc
local _bc
_bc="bc"
_bc="bc"
local _dots
test $_digits -gt 0 && _dots=$( yes "." 2>/dev/null | head -$_digits | tr -d "\n" )
test $_digits -gt 0 && _dots=$( yes "." 2>/dev/null | head -$_digits | tr -d "\n" )
test $_digits -gt 0 && _bc+=" -l | grep -o '.*\\.${_dots}'"
test $_digits -gt 0 && _bc+=" -l | grep -o '.*\\.${_dots}'"
Loading