Giter VIP home page Giter VIP logo

Comments (8)

BotoX avatar BotoX commented on June 2, 2024

Could you run these two commands and post the output:

grep ":" /proc/net/dev | grep -v -e "lo" -e "tun" | awk '{a+=$2}{b+=$10}END{print a,b}'

grep ":" /proc/net/dev | grep -v -e "lo" -e "tun" | awk -M '{a+=$2}{b+=$10}END{printf "%s %s", a,b}'

from serverstatus.

jimmyr57000 avatar jimmyr57000 commented on June 2, 2024

Hello,

3.40579e+10 1.52567e+11

awk: not an option: -M

from serverstatus.

BotoX avatar BotoX commented on June 2, 2024

Okay, I guess your awk isn't recent enough for -M (--bignums).
You can try without, should be fine as long as the number doesn't become too big:
grep ":" /proc/net/dev | grep -v -e "lo" -e "tun" | awk '{a+=$2}{b+=$10}END{printf "%s %s", a,b}'

from serverstatus.

jimmyr57000 avatar jimmyr57000 commented on June 2, 2024

3.476e+10 1.55714e+11(

Screen commande ssh : http://prntscr.com/apr2fb

from serverstatus.

BotoX avatar BotoX commented on June 2, 2024

I can't reproduce this on my system actually.
Could you try again but do this before:
export LC_NUMERIC="C"
maybe this one changes the behaviour too?:
export LC_COLLATE="C"

from serverstatus.

jimmyr57000 avatar jimmyr57000 commented on June 2, 2024

I change it to any place?

Sorry, I do not understand English very well I'm french.

from serverstatus.

BotoX avatar BotoX commented on June 2, 2024

Just do:

export LC_NUMERIC="C"
export LC_COLLATE="C"

and try if it works after that.

from serverstatus.

dausruddin avatar dausruddin commented on June 2, 2024

I stumbled upon this same issue.
Seems that this is issue where bash version doesnt support arithmetic calculation. I can confirm about this because I have 2 servers running Debian 7 and Ubuntu 12.04 and both have bash version 4.2.xx as the latest version. While my another debian 8 and ubuntu 14.04 servers have version 4.3.xx

So the solution is to use python, or upgrade bash version to 4.3.xx

from serverstatus.

Related Issues (20)

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.