Dump header
This commit is contained in:
parent
f4aa8699b4
commit
d4349d6480
1 changed files with 1 additions and 0 deletions
1
main.cpp
1
main.cpp
|
@ -177,6 +177,7 @@ extern "C" void* ThreadDumper(void*) {
|
||||||
FILE *d = fopen("dnsseed.dump", "w");
|
FILE *d = fopen("dnsseed.dump", "w");
|
||||||
vector<CAddrReport> v = db.GetAll();
|
vector<CAddrReport> v = db.GetAll();
|
||||||
sort(v.begin(), v.end(), StatCompare);
|
sort(v.begin(), v.end(), StatCompare);
|
||||||
|
fprintf(d, "# address \t%%(2h)\t%%(8h)\t%%(1d)\t%%(7d)\t%%(30d)\tversion\n");
|
||||||
for (vector<CAddrReport>::const_iterator it = v.begin(); it < v.end(); it++) {
|
for (vector<CAddrReport>::const_iterator it = v.begin(); it < v.end(); it++) {
|
||||||
CAddrReport rep = *it;
|
CAddrReport rep = *it;
|
||||||
fprintf(d, "%s\t%.2f%%\t%.2f%%\t%.2f%%\t%.2f%%\t%.2f%%\t%i \"%s\"\n", rep.ip.ToString().c_str(), 100.0*rep.uptime[0], 100.0*rep.uptime[1], 100.0*rep.uptime[2], 100.0*rep.uptime[3], 100.0*rep.uptime[4], rep.clientVersion, rep.clientSubVersion.c_str());
|
fprintf(d, "%s\t%.2f%%\t%.2f%%\t%.2f%%\t%.2f%%\t%.2f%%\t%i \"%s\"\n", rep.ip.ToString().c_str(), 100.0*rep.uptime[0], 100.0*rep.uptime[1], 100.0*rep.uptime[2], 100.0*rep.uptime[3], 100.0*rep.uptime[4], rep.clientVersion, rep.clientSubVersion.c_str());
|
||||||
|
|
Loading…
Reference in a new issue