FORUM
MANUAL
GET TREMULOUS
Tremulous forum
June 20, 2013, 05:06:36 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: Come Chat with us live! Learn how
HERE!
Home
Help
Search
Login
Register
T R E M U L O U S
>
Community
>
Servers
>
TremSnaps 1.0
Pages: [
1
]
2
3
All
Go Down
Print
Author
Topic: TremSnaps 1.0 (Read 7305 times)
Syntac
Turrets: +118/-104
Posts: 841
Void Website Developer
TremSnaps 1.0
«
on:
October 18, 2008, 04:50:08 AM »
TremSnaps is a web app that captures the state of the entire Tremulous network. The state of each server, and each player, is written to a snapshot that can then be viewed by visitors. One snapshot is about 150 KB.
Installation
Just unzip it into whatever directory you like. Make sure PHP has full read/write access to the entire directory, or weird things can happen.
Automatic Snapshots
TremSnaps doesn't take snapshots on its own. You'll have to set up a
cron
job or something equivalent.
Code:
0 * * * * tremsnaps/snapshot.php
This would generate a snapshot every hour.
Configuring
The configuration file is
common/config.php
.
Downloads
Browse
Screenshots
Viewing a snapshot:
Viewing DretchStorm:
«
Last Edit: October 28, 2008, 07:33:05 PM by Syntac
»
Logged
TremRP
1
::
Mirror
Erore coods! Nead hep!
Bissig
Turrets: +103/-131
Posts: 1309
Re: TremSnaps 1.0
«
Reply #1 on:
October 18, 2008, 08:03:16 PM »
One Megabyte? Can't you compress it or use another method for data storage?
Looks promising. I'll have a look at it later today.
Logged
sstcentral
sst wiki
tremcentral
trumorz(tm)
David
Spam Killer
Turrets: +249/-273
Posts: 3543
David
Re: TremSnaps 1.0
«
Reply #2 on:
October 18, 2008, 08:29:31 PM »
What the hell are you storing?
qstat -R -P only comes out to 141k, 24k gzipped.
Logged
Any maps not in the MG repo? Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone. I can't speak for anyone else, and there is no one who can speak for me. If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev. Nothing I say counts for anything.
Syntac
Turrets: +118/-104
Posts: 841
Void Website Developer
Re: TremSnaps 1.0
«
Reply #3 on:
October 18, 2008, 08:50:59 PM »
Crap, I was
way
off. It's about 150 KB. Turns out Mac OS X uses screwy estimation and you have to look at the number of bytes in order to find the real size.
Logged
TremRP
1
::
Mirror
Erore coods! Nead hep!
Ellohir
Turrets: +14/-13
Posts: 190
Re: TremSnaps 1.0
«
Reply #4 on:
October 18, 2008, 11:37:41 PM »
What does "server with stupid names" mean?
Logged
Syntac
Turrets: +118/-104
Posts: 841
Void Website Developer
Re: TremSnaps 1.0
«
Reply #5 on:
October 18, 2008, 11:51:18 PM »
Heh, I was hoping someone would ask that. You know how some server owners put black "A"s in front of the title? Well, TremSnaps detects that.
It also removes boxes and deals with nonstandard color escapes.
Logged
TremRP
1
::
Mirror
Erore coods! Nead hep!
Colynn'
Turrets: +28/-35
Posts: 308
<°))))<
Re: TremSnaps 1.0
«
Reply #6 on:
October 31, 2008, 11:59:22 PM »
Hello,
Excuse-me of my newbieness, but does it works on Linux/Windows ?
PS : And for the necro too.
«
Last Edit: November 01, 2008, 12:10:23 AM by Colynn'
»
Logged
Currently working on: REAL LIFE STUDIES BULLSHIT
Bissig
Turrets: +103/-131
Posts: 1309
Re: TremSnaps 1.0
«
Reply #7 on:
November 01, 2008, 12:26:20 AM »
Quote from: Colynn' on October 31, 2008, 11:59:22 PM
Hello,
Excuse-me of my newbieness, but does it works on Linux/Windows ?
PS : And for the necro too.
It's a php script - it works on almost any OS (well, at least on those where Tremulous runs on)
Logged
sstcentral
sst wiki
tremcentral
trumorz(tm)
Syntac
Turrets: +118/-104
Posts: 841
Void Website Developer
Re: TremSnaps 1.0
«
Reply #8 on:
November 01, 2008, 12:33:54 AM »
It works on all platforms that support the Apache (2?) web server and PHP 5.
Logged
TremRP
1
::
Mirror
Erore coods! Nead hep!
Colynn'
Turrets: +28/-35
Posts: 308
<°))))<
Re: TremSnaps 1.0
«
Reply #9 on:
November 01, 2008, 01:49:17 AM »
Works!
Logged
Currently working on: REAL LIFE STUDIES BULLSHIT
Syntac
Turrets: +118/-104
Posts: 841
Void Website Developer
Re: TremSnaps 1.0
«
Reply #10 on:
November 01, 2008, 01:50:46 AM »
Did you set up a
cron
job?
[EDIT] Rawr, typo.
«
Last Edit: November 01, 2008, 01:54:31 AM by Syntac
»
Logged
TremRP
1
::
Mirror
Erore coods! Nead hep!
Colynn'
Turrets: +28/-35
Posts: 308
<°))))<
Re: TremSnaps 1.0
«
Reply #11 on:
November 01, 2008, 03:21:47 AM »
Nop, sorry. Actually, I'm on windows (I have Ubuntu too, but I need to fix some things before) and I don't know how to set up a
Code:
cron
on it.
And it's not my own server, it's the one of Symphony/Haptism, a french (??), who hosts me.
Logged
Currently working on: REAL LIFE STUDIES BULLSHIT
Syntac
Turrets: +118/-104
Posts: 841
Void Website Developer
Re: TremSnaps 1.0
«
Reply #12 on:
November 01, 2008, 03:27:55 AM »
Ohhh... Well, I'm just glad someone was able to get TremSnaps working.
Logged
TremRP
1
::
Mirror
Erore coods! Nead hep!
Archangel
Guest
Re: TremSnaps 1.0
«
Reply #13 on:
November 01, 2008, 06:16:00 AM »
Code:
[intellekt@oceanlab.ezbake.org ~/public_html/tremsnaps/] % unzip TremSnaps-R001.zip
Archive: TremSnaps-R001.zip
creating: tremsnaps/
inflating: tremsnaps/.DS_Store
creating: __MACOSX/
creating: __MACOSX/tremsnaps/
inflating: __MACOSX/tremsnaps/._.DS_Store
creating: tremsnaps/common/
inflating: tremsnaps/common/.DS_Store
creating: __MACOSX/tremsnaps/common/
inflating: __MACOSX/tremsnaps/common/._.DS_Store
inflating: tremsnaps/common/config.php
inflating: __MACOSX/tremsnaps/common/._config.php
creating: tremsnaps/common/css/
inflating: tremsnaps/common/css/default.css
creating: __MACOSX/tremsnaps/common/css/
inflating: __MACOSX/tremsnaps/common/css/._default.css
creating: tremsnaps/common/img/
inflating: tremsnaps/common/img/favicon.png
inflating: tremsnaps/common/tremsnaps.php
inflating: __MACOSX/tremsnaps/common/._tremsnaps.php
inflating: tremsnaps/common/zendb.php
inflating: __MACOSX/tremsnaps/common/._zendb.php
inflating: tremsnaps/index.php
inflating: __MACOSX/tremsnaps/._index.php
inflating: tremsnaps/snapshot.php
inflating: __MACOSX/tremsnaps/._snapshot.php
creating: tremsnaps/snapshots/
inflating: tremsnaps/snapshots/.DS_Store
creating: __MACOSX/tremsnaps/snapshots/
inflating: __MACOSX/tremsnaps/snapshots/._.DS_Store
[oceanlab.ezbake.org - 06:13:57 #22]
[intellekt@oceanlab.ezbake.org ~/public_html/tremsnaps/] % ls
total 22
drwxr-xr-x 4 intellekt operator 512 Nov 1 06:13 .
drwxr-xr-x 10 intellekt operator 1024 Nov 1 06:13 ..
-rw-r--r-- 1 intellekt operator 12794 Oct 18 09:03 TremSnaps-R001.zip
drwxrwxr-x 3 intellekt operator 512 Oct 18 00:03 __MACOSX
drwxrwxrwx 4 intellekt operator 512 Oct 18 00:00 tremsnaps
Wow, no need for the __MACOSX folder. Please fix permissions out of the box too!
http://oceanlab.ezbake.org/~intellekt/tremsnaps/
«
Last Edit: November 01, 2008, 06:28:04 AM by Archangel
»
Logged
Colynn'
Turrets: +28/-35
Posts: 308
<°))))<
I'm on it! o/
«
Reply #14 on:
November 01, 2008, 01:30:52 PM »
I'm on it!
o/
EDIT : Btw, you should remove the stupid/not correct server's name system. Because some servers who have a correct name are not listed...
«
Last Edit: November 01, 2008, 01:41:50 PM by Colynn'
»
Logged
Currently working on: REAL LIFE STUDIES BULLSHIT
Syntac
Turrets: +118/-104
Posts: 841
Void Website Developer
Re: TremSnaps 1.0
«
Reply #15 on:
November 01, 2008, 03:41:53 PM »
Aargh, there's more wrong with Mac OS X's zip program than I thought! I'll repackage it as a
gzip
less defective archive.
Quote from: Colynn' on November 01, 2008, 01:30:52 PM
Btw, you should remove the stupid/not correct server's name system. Because some servers who have a correct name are not listed...
What do you mean?
«
Last Edit: November 01, 2008, 03:45:48 PM by Syntac
»
Logged
TremRP
1
::
Mirror
Erore coods! Nead hep!
Amanieu
Turrets: +135/-83
Posts: 647
Re: TremSnaps 1.0
«
Reply #16 on:
November 01, 2008, 03:46:59 PM »
Why is the Tremfusion Test Server not on the list
Logged
Quote
< kevlarman> zakk is getting his patches from shady frenchmen on irc
< kevlarman> this can't be a good sign
Syntac
Turrets: +118/-104
Posts: 841
Void Website Developer
Re: TremSnaps 1.0
«
Reply #17 on:
November 01, 2008, 03:48:43 PM »
Not sure. Could be due to packet loss.
Logged
TremRP
1
::
Mirror
Erore coods! Nead hep!
Archangel
Guest
Re: TremSnaps 1.0
«
Reply #18 on:
November 01, 2008, 07:50:54 PM »
Yeah. there are a lot of servers that are fairly good that use boxes. I'd say just strip out the boxes, but still print the servers.
Logged
Syntac
Turrets: +118/-104
Posts: 841
Void Website Developer
Re: TremSnaps 1.0
«
Reply #19 on:
November 01, 2008, 07:59:41 PM »
It does. Boxes are stripped out when the list is retrieved.
Logged
TremRP
1
::
Mirror
Erore coods! Nead hep!
Archangel
Guest
Re: TremSnaps 1.0
«
Reply #20 on:
November 01, 2008, 09:08:21 PM »
I see none of my servers, and they're all local to the machine.
Logged
Syntac
Turrets: +118/-104
Posts: 841
Void Website Developer
Re: TremSnaps 1.0
«
Reply #21 on:
November 01, 2008, 09:11:43 PM »
TremSnaps retrieves the list from the master server.
Logged
TremRP
1
::
Mirror
Erore coods! Nead hep!
Archangel
Guest
Re: TremSnaps 1.0
«
Reply #22 on:
November 01, 2008, 09:50:25 PM »
I'm well aware. What I am saying is, none of my servers are showing up, and they can't possibly be timing out.
Logged
Sap
Turrets: +2/-8
Posts: 42
bite me
Re: TremSnaps 1.0
«
Reply #23 on:
November 01, 2008, 10:06:30 PM »
hehe ... my name is on top of that DretchStorm snapshot. Good timing Syntac
.
Logged
"The views & opinions expressed above are solely of a Dretch and not endorsed by a Dragoon or a Rant. However, ocassional Mara zaps might have had some influence in it. "
Syntac
Turrets: +118/-104
Posts: 841
Void Website Developer
Re: TremSnaps 1.0
«
Reply #24 on:
November 01, 2008, 11:13:48 PM »
Quote from: Archangel on November 01, 2008, 09:50:25 PM
I'm well aware. What I am saying is, none of my servers are showing up, and they can't possibly be timing out.
There could be packet loss that corrupts the list entry (and causes it to be removed), or something that prevents TremSnaps from connecting. Then there's the possibility of your servers
not being public
.
Logged
TremRP
1
::
Mirror
Erore coods! Nead hep!
Archangel
Guest
Re: TremSnaps 1.0
«
Reply #25 on:
November 02, 2008, 12:54:21 AM »
The fact that they're on a 100mbit line, with a 20ms ping to the master server, and they haven't gone down for over 70 days, leads me to believe there is a bug in your code.
Logged
Syntac
Turrets: +118/-104
Posts: 841
Void Website Developer
Re: TremSnaps 1.0
«
Reply #26 on:
November 02, 2008, 01:05:43 AM »
There is very little possibility of there being a bug. This is all my code does:
• Fetches a list from the master server (stripping out corrupted entries).
• For each server on that list, connects to it and retrieves information.
• Writes the accumulated data to a collection of files.
If you tell me what your servers' names are, I'll be happy to troubleshoot this myself.
[EDIT] Double negative...
«
Last Edit: November 02, 2008, 03:44:27 PM by Syntac
»
Logged
TremRP
1
::
Mirror
Erore coods! Nead hep!
Undeference
Tremulous Developers
Turrets: +122/-45
Posts: 1207
Ingar and carry on.
Re: TremSnaps 1.0
«
Reply #27 on:
November 02, 2008, 01:10:33 AM »
try
Code:
--- common/tremsnaps.php.orig
2008-11-01 21:08:44.000000000 -0400
+++ common/tremsnaps.php
2008-11-01 21:09:39.000000000 -0400
@@ -205,7 +205,9 @@
$out = "\xFF\xFF\xFF\xFFgetservers 69 empty full";
@fwrite( $fp, $out );
-
$data_string = @fread( $fp, 100000 );
+
$data_string = '';
+
while( ( $read = fread( $fp, 100000 ) ) !== FALSE )
+
$data_string .= $read;
$meta = @stream_get_meta_data( $fp );
@fclose( $fp );
or some such
By the way, all the files in your current zip are gz'ed. Might want to fix that.
«
Last Edit: November 02, 2008, 01:12:55 AM by Undeference
»
Logged
Need help?
Ask intelligently.
If you find a solution on your own, please share it so others can benefit.
Quote from: tuple on February 15, 2008, 11:54:10 PM
Thats what we need, helpful players, not more powerful admins.
Looking for more
Tremulous maps
?
Syntac
Turrets: +118/-104
Posts: 841
Void Website Developer
Re: TremSnaps 1.0
«
Reply #28 on:
November 02, 2008, 01:11:46 AM »
Dammit, I know I'm in trouble when someone makes a diff of my code...
All that aside, thanks Undeference. Will give it a try.
Logged
TremRP
1
::
Mirror
Erore coods! Nead hep!
Syntac
Turrets: +118/-104
Posts: 841
Void Website Developer
Oh noes! A double post!
«
Reply #29 on:
November 02, 2008, 01:38:58 AM »
I will shortly be remaking TremSnaps into a command-line tool. Projected features include:
• Scope options
• Flat-file dumps
• Rcon console
• Dump readback
• And probably more...
Logged
TremRP
1
::
Mirror
Erore coods! Nead hep!
Pages: [
1
]
2
3
All
Go Up
Print
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> Announcements
=> General Discussion
=> Troubleshooting
=> Feedback
=> Official Servers
-----------------------------
Community
-----------------------------
=> Servers
===> Server Admin Contacts
=> Clans
===> Individual Clan Threads
=> Strategies and Tactics
=> Mod Ideas and Desires
=> Off Topic
-----------------------------
Media
-----------------------------
=> Mapping Center
=> Map Releases
=> Modeling Center
=> Other Tremulous Media
-----------------------------
Mods
-----------------------------
=> Modding Center
=> Mod Releases
===> HUDs
===> Gameplay Changing
===> Non-Gameplay Changing
===> Tools and Utilities
Loading...