facebookarchive / fbkutils Goto Github PK
View Code? Open in Web Editor NEWA variety of utilities built and maintained by Facebook's Linux Kernel Team that we wish to share with the community.
License: Other
A variety of utilities built and maintained by Facebook's Linux Kernel Team that we wish to share with the community.
License: Other
fbkutils: Linux kernel utilities from Facebook NOTE: this repo is no longer updated ================================================================================ ncrx: A library for processing extended netconsole messages from the Linux kernel. See Documentation/networking/netconsole.txt in the kernel source for details about extended netconsole. Moved to https://github.com/facebook/netconsd netconsd: A daemon which uses libncrx to receive and process netconsole messages from a large number of remote hosts. We use this daemon for collecting kernel logs from all the servers at Facebook. Moved to https://github.com/facebook/netconsd netesto: NEtwork TESting TOls, a set of tools for network testing. It allows one machine, the controller, to run network load tests currently consisting of many netperf transfers. The controller is in charge of controlling the clients (which run netperf) and servers (which run netserver) and collecting the results. I've used this framework extensively in the past year to evaluate TCP-NV and compare various TCP variants such as cubic, nv, bbr, etc. ================================================================================ Contributing ============ Contributions to fbkutils are welcome and encouraged! Please read the guidelines in CONTRIBUTING, and make sure you've signed the CLA before sending the pull request. Whitehat ======== Facebook has a bounty program (https://www.facebook.com/whitehat) for the the safe disclosure of security bugs. If you find a vulnerability, please go through the process outlined on that page and do not file a public issue.
When executing schbench
, or other benchmarks as far as I can tell, throws the following error:
AttributeError: 'dict' object has no attribute 'correctness_tests'
After some investigation seems to be that all benchmarks return a dict
object containing the
metrics, and benchpress/cli/commands/run.py
calls a non-existing function on it called correctness_tests()
.
The file fbkutils/netesto/local/processExp.py
has the above code, which closes the file explictly. It can be replace by the following code. Why use with open syntax
with open(field_fn, 'r') as fin:
for iline in fin:
line = iline.strip()
if len(line) == 0:
continue
if line[0] != '#':
field = line.split(':')
fieldList.append(field[0])
fieldOpDict[field[0]] = field[1]
I would like to point out that identifiers like “__LISTENER_H__
” and “__OUTPUT_H__
” do not fit to the expected naming convention of the C language standard.
Would you like to adjust your selection for unique names?
Attempting to run make, making sure I had glibc installed, this is the output of the make logs.
make[1]: Entering directory '/home/xlaits/git/fbkutils/netconsd/modules'
g++ logger.cc -std=c++11 -O2 -D_GNU_SOURCE -fno-strict-aliasing -Wall -Wextra -Wmissing-declarations -Wno-missing-field-initializers -Wno-unused-parameter -fPIC -I../../ncrx -I../include -lpthread -lrt -ldl -c -o logger.o
logger.cc: In constructor 'logtarget::logtarget(in6_addr*)':
logger.cc:78:12: error: 'stderr' was not declared in this scope
78 | fprintf(stderr, "FATAL: open() failed: %m\n");
| ^~~~~~
logger.cc:28:1: note: 'stderr' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
27 | #include <jhash.h>
+++ |+#include <cstdio>
28 |
logger.cc:78:4: error: 'fprintf' was not declared in this scope
78 | fprintf(stderr, "FATAL: open() failed: %m\n");
| ^~~~~~~
logger.cc: In function 'void write_log(logtarget&, msg_buf*, ncrx_msg*)':
logger.cc:119:3: error: 'dprintf' was not declared in this scope
119 | dprintf(tgt.fd, "%s\n", buf->buf);
| ^~~~~~~
logger.cc:121:3: error: 'dprintf' was not declared in this scope
121 | dprintf(tgt.fd, "%06lu %014lu %d %d %s%s%s%s%s\n", msg->seq,
| ^~~~~~~
make[1]: *** [Makefile:20: logger.so] Error 1
make[1]: Leaving directory '/home/xlaits/git/fbkutils/netconsd/modules'
make: *** [Makefile:47: mods] Error 2```
Would you like to add more error handling for return values from functions like the following?
Some places in this file fbkutils/netesto/local/exp/exp.py
has check if a key is in the dictionary and then tries to access it. It may be inefficient and less clean to go through the dictionary twice. Can I raise a PR to change these to
def getFieldIndex(s):
return fieldDict.get(s, -1)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.