All Projects → solganik → procstat

solganik / procstat

Licence: other
Easy way to expose process internal state to filesystem using fuse.

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language
CMake
9771 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to procstat

stats for soil survey
S4SS: Statistics for Soil Survey
Stars: ✭ 21 (+50%)
Mutual labels:  statistics
Expectations.jl
Expectation operators for Distributions.jl objects
Stars: ✭ 50 (+257.14%)
Mutual labels:  statistics
dml
R package for Distance Metric Learning
Stars: ✭ 58 (+314.29%)
Mutual labels:  statistics
gitstats
simple statistical analysis tool for git repositories
Stars: ✭ 16 (+14.29%)
Mutual labels:  statistics
awesome-datascience-python
Awesome list Data Science and Python. 🐍
Stars: ✭ 62 (+342.86%)
Mutual labels:  statistics
Data-Science-and-Machine-Learning-Resources
List of Data Science and Machine Learning Resource that I frequently use
Stars: ✭ 19 (+35.71%)
Mutual labels:  statistics
ratarmount
Random Access Read-Only Tar Mount
Stars: ✭ 217 (+1450%)
Mutual labels:  fuse
rsiena
An R package for Simulation Investigation for Empirical Network Analysis
Stars: ✭ 56 (+300%)
Mutual labels:  statistics
wrapperr
Website and API that collects Plex statistics using Tautulli and displays it. Similar to the Spotify Wrapped concept.
Stars: ✭ 93 (+564.29%)
Mutual labels:  statistics
Algorithmic-Trading
I have been deeply interested in algorithmic trading and systematic trading algorithms. This Repository contains the code of what I have learnt on the way. It starts form some basic simple statistics and will lead up to complex machine learning algorithms.
Stars: ✭ 47 (+235.71%)
Mutual labels:  statistics
FantasyPremierLeague.py
⚽ Statistics for your mini leagues.
Stars: ✭ 123 (+778.57%)
Mutual labels:  statistics
hdfe
No description or website provided.
Stars: ✭ 22 (+57.14%)
Mutual labels:  statistics
scanstatistics
An R package for space-time anomaly detection using scan statistics.
Stars: ✭ 41 (+192.86%)
Mutual labels:  statistics
btsa
Berlin Time Series Analysis Repository
Stars: ✭ 60 (+328.57%)
Mutual labels:  statistics
hmac-timing-attacks
HMAC timing attack's w/ statistical analysis
Stars: ✭ 22 (+57.14%)
Mutual labels:  statistics
roc comparison
The fast version of DeLong's method for computing the covariance of unadjusted AUC.
Stars: ✭ 83 (+492.86%)
Mutual labels:  statistics
tics
🎢 Simple self-hosted analytics ideal for Express / React Native stacks
Stars: ✭ 22 (+57.14%)
Mutual labels:  statistics
vtuber-livechat-dataset
📊 VTuber 1B: Billion-scale Live Chat and Moderation Event Dataset for NLP
Stars: ✭ 30 (+114.29%)
Mutual labels:  statistics
veridical-flow
Making it easier to build stable, trustworthy data-science pipelines.
Stars: ✭ 28 (+100%)
Mutual labels:  statistics
HeroesMatchTracker
Heroes of the Storm match tracker for personal statistics
Stars: ✭ 59 (+321.43%)
Mutual labels:  statistics

Procstat - library to expose userspace process internal state as FUSE filesystem.

Background and motivation

Currently there is no standard way to expose process internal state, counters and statistics for running application. Some applications following the approach of exposing its state via the external interface they provide for normal operation. Example of such can be MYSQL that exposes statistics and metrics via SQL language, memcached server which exposes its status via specialized "stats" keyword, and others. This approach requires specialized client to be written to gather such statistics, and more specialized tools to perform analysis on such statistics.

Procstat library takes advantage of filesystem interface as a mean to expose process statistics and counters. This approach makes rich set of already existing text processing tools such as grep, awk and others available to perform analysis on exposed statistics and counters.

Installation

mkdir build; cd build; cmake ../; make && sudo make install

Getting Started:

In order to use procstat you need to #include "procstat.h" in your executable.

#include <procstat.h>

Inside your application create procstat context:

struct procstat_context *context;
context = procstat_create(<path to mountpoint>);

Next create a dedicated thread for fuse (which is used by procstat to expose statistics as a file system) Then run:

procstat_loop(context); 

Single-value statistics

It is important to understand that counters are part of you application, hence its validity must be provided by the application from the moment statistics is registered till it unregistered. In order to register single value counter

u64 counter = 0;
procstat_create_u64(context, NULL, "my-counter", &counter);

This will expose value of "counter" object as 'my-counter' file under <mount_point> In order to unregister this counter add the following line

procstat_remove_by_name(context, NULL, "my-counter");

Creating directory hierarchy

Directory hierarchy can be created to organize statistics and counters according to application requirements. In order ot create directory do the following:

struct procstat_item *outer_dir, *inner_dir;
outer_dir = procstat_create_directory(context, NULL, "outer-directory");
inner_dir = procstat_create_directory(context, outer_dir, "inner-directory");
procstat_create_u64(context, inner_dir, "my-counter", &counter);

This will expose counter value as file /outer-directory/inner-directory/my-counter

Advanced Usage

FIXME: add advanced usage examples...

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].