shark is a complete new system performance management solution based on lua language.
shark changes system performance management in three levels: API, consistent commandline tools, cloud monitoring and analysis.
shark project expect to delieve a unified event API, user can programming the API, we believe that a well designed system tracing and monitoring API is the fundamental base for Consistent commandline tools and Cloud monitoring.
We already developed lua perf event API, more API will be support soon.
local perf = require("perf")
local ffi = require("ffi")
perf.on("sched:sched_switch", function(e)
print(ffi.sting(e.name), e.cpu, e.pid)
print(ffi.string(e.raw.prev_comm), ffi.string(e.raw.next_comm))
end)
Based on powerful API, we can invent many consistent commandline tools which cover different subsystems. We think "consistent" is very important for long term evolution, and it's important for cloud analysis platform.
$shark-
shark-futex shark-profile shark-tcp shark-tcp
shark-bpf shark-http shark-ras shark-timer
shark-cpu shark-io shark-sched
shark-docker shark-kvm shark-scsi
shark-fs shark-mem shark-strace
shark-ftrace shark-nginx shark-syscalls
We believe ultimately all system performance management will goes to intelligent, most likely through cloud. user don't need spend many days to investigate why system become slow, the cloud robot will tell you the reason instantly.
The ultimate goal of shark project is build a cloud robot with special intelligence on system performane management, in open source way.
$ sudo ./shark samples/sharkcloud/flamegraph_in_cloud.lua
^C
Open flamegraph at: http://www.sharkly.io/gist/eeca8ea8e765bec83089e20cbb162af6/flamegraph/3.svg