Giter VIP home page Giter VIP logo

edge-monitor's Introduction

Yoda Monitor

License Build Status

Collect and upload system data in real time. Currently supports the following features:

  • Total CPU usage and usage on per CPU.
  • CPU usage on per process.
  • System available memory.
  • System battery info.
  • PSS usage on per process, map PSS to file.
  • Monitor comredump file, compress and upload automatically.

Dependencies

  • libcurl android armeabi-v7a is built-in

Build

$ git clone [email protected]:Rokid/yoda-monitor.git
$ cd yoda-monitor
$ cmake .
$ make

The above builds an executable yoda-sixsix in your CMake build directory.

Command line arguments

options description
-v print version
-conf set configure json path
-b running in the background
-l set log file directory to write log to files
-d set log level, [verbose, info, warn, error, fatal]

Configure json structure

options description
unzipRoot temporary file directory, default value is /tmp/
sysroot set sysroot, default value is /
uploadUrl set coredump file upload server url, coredump will not upload if this value is not set
coredumpDir set coredump file generate directory, default value is data
disableUpload set 1 to disable upload data
smapInterval set smap collect interval, default value is 1000 milliseconds
smapSleep set sleep time after collected smap, defaule value is 300 * 1000 milliseconds
bufferCount set ws message buf count, default count is 100
serverAddress set ws server address
serverPort set ws server port
sn mock a sn, read from host by default
hardware mock a hardware type, read from host by default

Test

$ ./yoda-sixsix -conf ./sample/conf.json

License

Apache 2.0 license

edge-monitor's People

Contributors

feelychau avatar lanfly avatar qile222 avatar yorkie avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

feelychau 7956968

edge-monitor's Issues

Save the log in a file at the same time

sometimes we find that the information of cpu is not uploaded to the cloud, and the sixsix service is still running. so we want to find what happened to the sixsix service.

  • save the log in a file
  • the size of the file maintained at less than 1M

Coredump message needs more info.

Currently the coredump info includes bin name, coredump file and device id, but the parameters and device version info are necessary for debugging.

perf: reduce the cpu usage of collecting smaps and top

At linux, the /proc/{pid}/smaps causes the kernel to do iterations for every process. This looks awful and unneeded in our use case.

Assuming that we have 10 processes to collect, to work on all the 10 processes by the proc file system, the kernel actually does 10+ iterations on the same memory struct.

See torvalds/linux:fs/proc/task_mmu.c for details.

To reduce the current high cpu of collecting smaps, we only do 1 iteration for all process collections.

/cc @lolBig @FeelyChau

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.