[ANNOUNCE] shark project: trace and monitor system easily

From: shark linux
Date: Tue May 12 2015 - 18:08:41 EST


Hi,

For any people who interesting on system tracing and monitoring, shark
project might worth a minute to take a look.

https://github.com/sharklinux/shark

Motivation
========

Currently system performance management is painful, shark project is
trying to change system performance management in three levels: API,
Consistent commandline tools, Cloud monitoring and analysis.

API
-----
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 and bpf API, more API will be support soon.


Consistent standalone tools
-------------------------------------
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.


Cloud monitoring and analysis
----------------------------------------
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.

In first step, we already support flamegraph and heatmap viewing in
cloud(see samples/)


Samples
=======

1. tracepoint

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)


2. view flamegraph in cloud

local perf = require "perf"
local sharkcloud = require "sharkcloud"

local profile = {}
setmetatable(profile, {__index = function() return 0 end})

perf.on("cpu-clock", {callchain_k = 1}, function(e)
profile[e.callchain] = profile[e.callchain] + 1
end)

shark.on_end(function()
--Open flamegraph at http://sharkly.io/
sharkcloud.post("flamegraph", profile)
end)

3. bpf

local bpf = require "bpf"

bpf.cdef[[
bpf_map_hash<char[100], int, 1024> mymap;

/* your C code in here*/
]]

shark.on_end(function()
-- access mymap as normal lua table
bpf.print_map(bpf.map.mymap)
end)

All is open sourced, any feedback is welcome.

Thanks.
shark project.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/