mirror of
git://erdgeist.org/opentracker
synced 2025-02-17 06:31:30 +08:00
Use mrtg to do periodical cleanup. Hopefully that wont make too much load for stats.
This commit is contained in:
parent
ade8268970
commit
43b60783a1
@ -1,12 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
request_string="GET /announce?info_hash=0123456789012345678%$(printf %02X $(( $RANDOM & 0xff )) )&\
|
request_string="GET /announce?info_hash=0123456789012345678%$(printf %02X $(( $RANDOM & 0xf )) )&\
|
||||||
ip=10.1.1.$(( $RANDOM & 0xff ))&port=$(( $RANDOM & 0xff )) HTTP/1.0\n"
|
ip=10.1.1.$(( $RANDOM & 0xff ))&port=$(( $RANDOM & 0xff )) HTTP/1.0\n"
|
||||||
|
|
||||||
# echo -e $request_string
|
# echo -e $request_string
|
||||||
# echo
|
# echo
|
||||||
echo -e $request_string | nc 127.0.0.1 6969 >/dev/null &
|
echo -e $request_string | nc 127.0.0.1 6969 >/dev/null
|
||||||
# echo
|
# echo
|
||||||
|
|
||||||
done
|
done
|
||||||
|
@ -321,6 +321,7 @@ size_t return_stats_for_tracker( char *reply ) {
|
|||||||
torrent_count += torrents_list->size;
|
torrent_count += torrents_list->size;
|
||||||
for( j=0; j<torrents_list->size; ++j ) {
|
for( j=0; j<torrents_list->size; ++j ) {
|
||||||
ot_peerlist *peer_list = ( ((ot_torrent*)(torrents_list->data))[j] ).peer_list;
|
ot_peerlist *peer_list = ( ((ot_torrent*)(torrents_list->data))[j] ).peer_list;
|
||||||
|
clean_peerlist( peer_list );
|
||||||
for( k=0; k<OT_POOLS_COUNT; ++k ) {
|
for( k=0; k<OT_POOLS_COUNT; ++k ) {
|
||||||
peer_count += peer_list->peers[k].size;
|
peer_count += peer_list->peers[k].size;
|
||||||
seed_count += peer_list->seed_count[k];
|
seed_count += peer_list->seed_count[k];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user