Giter Club home page Giter Club logo

Comments (13)

jue89 avatar jue89 commented on July 21, 2024 1

Some metrics are already implemented:

  • fork rate
  • cpu
  • memory usage
  • conntrack length
  • cross traffic

I think those can be analysed using bpfcountd:

  • batman originators
  • packet size histogramm

Those are missing and easy to implement:

  • droped packets by fastd
  • log message rate

And those are not that easy to implement (i.e. I don't have a solution that is not a quick'n'dirty one):

  • cpu auslastung der fastd instanz
  • sucessful dhcp replys (maybe via icmp ping 5 sek später)

from node-mqtt-stats.

jue89 avatar jue89 commented on July 21, 2024

Thank you! I would like to "solve" this issue with this information:

from node-mqtt-stats.

lemoer avatar lemoer commented on July 21, 2024

I haven't looked at all the references in deep yet, but it looks good.

Have you noticed the difference between cat /proc/stat | grep processes (which is the number of forks since the system has booted) and the number of running processes?

from node-mqtt-stats.

jue89 avatar jue89 commented on July 21, 2024

Topic design:

/cpu/idle
    /user (=user + nice)
    /system
    /iowait
    /irq
    /softirq
    /steal (= steal + guest + guest_nice)
/mem/used
    /free
    /buffers
    /cached
    /swapused
    /swapfree
/processes/forkrate
          /ctxtrate
          /tasks
          /threads
          /kthreads
          /zombies

(Gonna attach some comments later)

from node-mqtt-stats.

lemoer avatar lemoer commented on July 21, 2024

more work for you:

  • conntrack length
  • batman originators
  • sucessful dhcp replys (maybe via icmp ping 5 sek später)
  • droped packets by fastd
  • log message rate (maybe sorted by daemons and prio?)
  • packet size histogramm?
  • cpu auslastung der fastd instanz?
  • cross traffic (via fastd status socket)

from node-mqtt-stats.

lemoer avatar lemoer commented on July 21, 2024

Very nice. I think the cpu of fastd is very important, but we should yield up trying to count the successful dhcp replies. I think its really too complicated.

from node-mqtt-stats.

jue89 avatar jue89 commented on July 21, 2024

Hmm, if we just publish the stats of each cpu core separately, we should get an quite accurate idea how much cpu is consumed by fastd. Don't you think so?

from node-mqtt-stats.

lemoer avatar lemoer commented on July 21, 2024

I'm not sure, because the fastd instance seems to hop a lot on multi cpu systems.

from node-mqtt-stats.

jue89 avatar jue89 commented on July 21, 2024

I see. Gonna find something better to meter cpu usage.

from node-mqtt-stats.

lemoer avatar lemoer commented on July 21, 2024

Maybe this excerpt from man 5 proc helps:?

              (14) utime  %lu
                        Amount  of  time  that  this process has been
                        scheduled in user  mode,  measured  in  clock
                        ticks (divide by sysconf(_SC_CLK_TCK)).  This
                        includes guest time, guest_time  (time  spent
                        running  a  virtual  CPU, see below), so that
                        applications that are not aware of the  guest
                        time  field  do not lose that time from their
                        calculations.

              (15) stime  %lu
                        Amount of time that  this  process  has  been
                        scheduled  in  kernel mode, measured in clock
                        ticks (divide by sysconf(_SC_CLK_TCK)).

              (16) cutime  %ld
                        Amount of time that this process's waited-for
                        children  have  been  scheduled in user mode,
                        measured   in   clock   ticks   (divide    by
                        sysconf(_SC_CLK_TCK)).   (See also times(2).)
                        This includes guest time,  cguest_time  (time
                        spent running a virtual CPU, see below).

              (17) cstime  %ld
                        Amount of time that this process's waited-for
                        children have been scheduled in kernel  mode,
                        measured    in   clock   ticks   (divide   by
                        sysconf(_SC_CLK_TCK)).

from node-mqtt-stats.

jue89 avatar jue89 commented on July 21, 2024

Yes sure. I'm familiar with that ;)

But I don't know how to project this information in mqtt topics. I would integrate this feature in the processes plugin. The trivial projection would be:

org/example/processes/fastd/cpu
org/example/processes/fastd/mem

But what to do if multiple fastd instances are running? Add the PID?

org/example/processes/fastd/1234/cpu
org/example/processes/fastd/1234/mem

But this would be complicated to put in a graph. Wouldn't it?

You got an idea how to solve this?

from node-mqtt-stats.

lemoer avatar lemoer commented on July 21, 2024

I also think, that the pid is not the right way.

Another idea:

Maybe we could solve this by doing it for the systemd services instead of processes. But since there is no 1:1 mapping between processes and services, i would say that we should aggregate all memory and mem statistics. This would be nice for services, which fork childrens.

This reveals the service name:

cat /proc/$PID/cgroup | grep name=systemd

from node-mqtt-stats.

lemoer avatar lemoer commented on July 21, 2024

Maybe other interesting things:

  • histogram of captured tcp window size
  • count seen tcp retransmissions (not sure, whether this is handable)

from node-mqtt-stats.

Related Issues (3)

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.