Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2ce8651
added new util to print query response time per second
fipar Jan 22, 2016
016e348
- Set time resolution to one second for mongo-response-time
fipar Jan 25, 2016
c738d84
added prometheus exporter of response time data, and grafana dashboar…
fipar Feb 17, 2016
27a77ac
added Summary for response time
fipar Feb 20, 2016
523f5ba
added max response time every 10 secs as a prometheus Gauge
fipar Feb 24, 2016
a5da6b0
fixed bug by which lastMaxPeriodStart was not reset when the max chan…
fipar Feb 24, 2016
7230ba0
added SIGHUP handler to return max * -1, as a start-of-benchmark signal
fipar Feb 25, 2016
819445c
fixed bug that caused it to swap between max and max * -1
fipar Feb 25, 2016
0e2d07d
linux binary was crashing
fipar Feb 29, 2016
6d97358
added localhost support
fipar Mar 4, 2016
dbfc68c
- fixed a typo in one of the test cases
fipar Mar 26, 2016
ab8a20b
- Removed convertToText as it was not needed after all
fipar Mar 26, 2016
59883ae
rebuilt binaries
fipar Mar 29, 2016
dc6aeb4
rebuilt binaries
fipar Mar 29, 2016
17f1ac5
removed printing of slowlog header for orphaned replies. added suppor…
fipar Apr 4, 2016
bd305ea
proper use of flags now, and working verbose flag
fipar Apr 5, 2016
a018926
added more debugging output. supressed printing of cursor replies for…
fipar Apr 5, 2016
7aac08c
simplified handling of SIGHUP
fipar Apr 7, 2016
cd0731e
added debuging info, removed one memory leak. fixed logic in response…
fipar Apr 7, 2016
8512ee8
fixed a problem with deletes. only maintaining debugInfo if verbose i…
fipar Apr 7, 2016
34961cd
added loopback support
fipar Apr 7, 2016
ceeacf1
reset the response times map upon SIGHUP. increase counters of debugI…
fipar Apr 13, 2016
f34c883
Removed redundant description line
fipar Feb 9, 2017
68edd6b
fixed title to Ognom Toolkit
fipar Feb 9, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
ognom-toolkit is a set of utilities, functions and tests with the goal
of making the life of MongoDB/TokuMX administrators easier.

TokuMX Toolkit is set of utilities, functions and tests which make life of TokuMX administrator easier

# name
ognom stands for mongo spelled backwards, with the following
advantages:
Expand Down
7 changes: 7 additions & 0 deletions mongo-response-time/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This utility generates a csv file with time,response_time fields, in which:
- time is the current time (one second precision)
- response_time is the response time for an operation

The file should contain response time data for all operations seen on the wire.

The Makefile and a required library are located under the ../slowlog-generator/ tree, this symlink is included here only for convenience when browsing the repo.
1 change: 1 addition & 0 deletions mongo-response-time/mongo-response-time.go
103 changes: 51 additions & 52 deletions mongo-summary/generated/mongo-summary-extra.js
Original file line number Diff line number Diff line change
@@ -1,59 +1,58 @@

function getHeader(header, filler, length) {
var result = "\n# " + header + " ";
if (result.length < length) {
for (i=result.length; i<length; i++) {
result += filler
}
}
return result + "\n";
}
function getHeader(header, filler, length) {
var result = "\n# " + header + " ";
if (result.length < length) {
for (i=result.length; i<length; i++) {
result += filler
}
}
return result + "\n";
}
var LENGTH = 62;
var FILLER = "#";
function isMongos() {
return db.runCommand({isMaster: 1})["msg"] == "isdbgrid";
}
function isMongos() {
return db.runCommand({isMaster: 1})["msg"] == "isdbgrid";
}

function printExtraDiagnosticsInfo() {
print(getHeader("Extra info",FILLER,LENGTH));
function printExtraDiagnosticsInfo() {
print(getHeader("Extra info",FILLER,LENGTH));

db.adminCommand('listDatabases')["databases"].forEach(
function (element, array, index) {
var auxdb = db.getSiblingDB(element["name"]);
var cols = auxdb.getCollectionNames();
print(element["name"] + " has " + cols.length + " collections and " + element["sizeOnDisk"] + " bytes on disk");
if (cols.length > 0) {
print("Collections: ");
cols.forEach(
function (element, array, index) {
print(" " + element);
auxdb.getCollectionNames().forEach(function(collection) {
indexes = auxdb[collection].getIndexes();
print("Indexes for " + collection + ":");
printjson(indexes);
});
}
);
}
}
);
db.adminCommand('listDatabases')["databases"].forEach(
function (element, array, index) {
var auxdb = db.getSiblingDB(element["name"]);
var cols = auxdb.getCollectionNames();
print(element["name"] + " has " + cols.length + " collections and " + element["sizeOnDisk"] + " bytes on disk");
if (cols.length > 0) {
print("Collections: ");
cols.forEach(
function (element, array, index) {
print(" " + element);
auxdb.getCollectionNames().forEach(function(collection) {
indexes = auxdb[collection].getIndexes();
print("Indexes for " + collection + ":");
printjson(indexes);
});
}
);
}
}
);

if (isMongos()) {
sh.status();
} else {
printjson(db.adminCommand('replSetGetStatus'));
}
db.isMaster();
print(getHeader("Logs",FILLER,LENGTH));
db.adminCommand({'getLog': '*'})["names"].forEach(
function (element, array, index) {
db.adminCommand({'getLog': element})["log"].forEach(
function (element, array, index) {
print(element);
}
);
}
);
}
if (isMongos()) {
sh.status();
} else {
printjson(db.adminCommand('replSetGetStatus'));
}
db.isMaster();
print(getHeader("Logs",FILLER,LENGTH));
db.adminCommand({'getLog': '*'})["names"].forEach(
function (element, array, index) {
db.adminCommand({'getLog': element})["log"].forEach(
function (element, array, index) {
print(element);
}
);
}
);
}

printExtraDiagnosticsInfo();
29 changes: 14 additions & 15 deletions mongo-summary/generated/mongo-summary-test-replset.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@

var BASE_PORT=2800;
var HOSTNAME="telecaster";
rs.initiate();
var prefix = HOSTNAME+":"+BASE_PORT;
[ prefix+0 ,prefix+1, prefix+2, prefix+3].forEach(
function (element, array, index) {
if (element==HOSTNAME+":"+BASE_PORT+3) {
rs.add(element,true);
} else {
rs.add(element);
}
rs.config();
}
);
var BASE_PORT=2800;
var HOSTNAME="telecaster.local";
rs.initiate();
var prefix = HOSTNAME+":"+BASE_PORT;
[ prefix+0 ,prefix+1, prefix+2, prefix+3].forEach(
function (element, array, index) {
if (element==HOSTNAME+":"+BASE_PORT+3) {
rs.add(element,true);
} else {
rs.add(element);
}
rs.config();
}
);
21 changes: 10 additions & 11 deletions mongo-summary/generated/mongo-summary-test-sharded-rs1.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@

var BASE_PORT=2800;
var HOSTNAME="telecaster";
rs.initiate();
var prefix = HOSTNAME+":"+BASE_PORT;
[ prefix+0 ,prefix+1 ].forEach(
function (element, array, index) {
rs.add(element);
rs.config();
}
);
var BASE_PORT=2800;
var HOSTNAME="telecaster.local";
rs.initiate();
var prefix = HOSTNAME+":"+BASE_PORT;
[ prefix+0 ,prefix+1 ].forEach(
function (element, array, index) {
rs.add(element);
rs.config();
}
);
21 changes: 10 additions & 11 deletions mongo-summary/generated/mongo-summary-test-sharded-rs2.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@

var BASE_PORT=2800;
var HOSTNAME="telecaster";
rs.initiate();
var prefix = HOSTNAME+":"+BASE_PORT;
[ prefix+2, prefix+3 ].forEach(
function (element, array, index) {
rs.add(element);
rs.config();
}
);
var BASE_PORT=2800;
var HOSTNAME="telecaster.local";
rs.initiate();
var prefix = HOSTNAME+":"+BASE_PORT;
[ prefix+2, prefix+3 ].forEach(
function (element, array, index) {
rs.add(element);
rs.config();
}
);
Loading