![]() |
|
Register | FAQ | The Twelve Commandments | Members List | Calendar | Arcade | Find the Best VPN | Today's Posts | Search |
General Gnutella / Gnutella Network Discussion For general discussion about Gnutella and the Gnutella network. For discussion about a specific Gnutella client program, please post in one of the client forums above. |
![]() |
| LinkBack | Thread Tools | Display Modes |
| |||
![]() Hi, Are there any programs available, preferable for unix, that will log the packets that pass through them into a database. I have actually written a client myself but I wouldn't want to trust that my program was not hurting the network ![]() Any suggestion for a specific program or possibly a program that would be easily modified? I had a look through gnut but couldn't really find my way. Look forward to your replies, John P.S. I imagine that what the gnutellameter.com guy uses might be good but I've not found a link on the site to download software/email them Last edited by mckerrell; January 14th, 2002 at 01:46 PM. |
| |||
![]() I also did some analysis for my thesis: I log everything using the syslog function on a Linux system. it shoul be simple: just send all the packets you receive and send to syslog. BUT you know thats gonna be a lot of data in a short time.... |
| |||
![]() Quote:
Thinking about it it does sound like a good idea. I can leave all the routing functions to someone else's gnutella client and just do a bit of parsing myself. Data storage should be fine, but can you suggest a meg(gig?!)/day throughput I might get? John |
| |||
![]() Actually it is pretty simple: This is my C File called Logging.c It's pretty simple. #include <syslog.h> #include <stdio.h> #include "Logging.h" void initLog() { openlog("qtella logging", LOG_PID, LOG_LOCAL0); } void logEntry(const char* message) { syslog (LOG_NOTICE, message); } void closeLog() { closelog(); } I suggest you read the manpages for: syslog syslog.conf They are very good. So before you log something call openLog() when you are done closeLog(). To log data call logEntry(const char* message). If you want you can add more parameters to the function call eg. the severity level (LOG_NOTICE). To include the file in C++ you have to use extern "C" { #include "Logging.h" } That's it ... for C/C++ To store the data to a file you have to open syslog.conf usually located in /etc/ and add something like: local0.* /var/log/qtella.log if you used LOG_LOCAL0 to open syslog. Then restart syslog or use the SIGHUP signal to reread the conf file. All done now ![]() Quote:
As far as I know syslog creates a new file if the old one gets too big but I don't know at which file size this happens... Last edited by hermaf; January 15th, 2002 at 01:59 PM. |
![]() |
| |
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A gnutella simulator - need statistics | feliz | General Gnutella Development Discussion | 9 | September 11th, 2008 04:18 PM |
Newbie question re: Network statistics | midnight_blue | Download/Upload Problems | 4 | May 8th, 2005 06:52 PM |
statistics - current state of network | ssiemson71 | Download/Upload Problems | 0 | January 27th, 2004 05:43 PM |
Gnutella network size and statistics? | Moak | General Gnutella Development Discussion | 6 | July 21st, 2002 08:22 AM |
logging gnutella searches | Noer | General Gnutella / Gnutella Network Discussion | 0 | April 1st, 2001 05:45 AM |