Feature #414

Add server /uptime cmd

Added by IR4T4 over 4 years ago. Updated over 2 years ago.

Status:New% Done:

50%

Priority:Normal
Assignee:-
Category:Server
Target version:2.77
OS: Arch:

Description

Command should show the uptime of the server

- add the command
- print uptime (and level/map uptime) in server crashlog.txt

There are several known time issues in q3 and in future this command might help us to 'debug’ productive servers. At least we’ve got the info when a crash occures.

uptime.patch Magnifier - Uptime command patch (1.4 KB) Anna, 06.06.2014 23:16

dd hh mm ss.c Magnifier (280 Bytes) Anna, 07.06.2014 20:17


Related issues

Related to ET: Legacy Development - Bug #248: Flame shader bug New 16.03.2013
Related to ET: Legacy Development - Bug #541: sv_protect 1 stops clients from connecting to the server ... Feedback 24.05.2014

Associated revisions

Revision 35b16111
Added by IR4T4 about 4 years ago

server: uptime cmd refs #414 - initial patch by Anna

Revision 6c4c89d2
Added by IR4T4 about 4 years ago

misc: prevent headers from being included more than once refs #414,
unique file header

Revision e8e96c13
Added by IR4T4 about 4 years ago

server: formatted uptime output refs #414 - patch by Anna

History

#1 Updated by IR4T4 over 4 years ago

  • Tracker changed from Bug to Feature

#2 Updated by IR4T4 over 4 years ago

  • Related to Bug #248: Flame shader bug added

#3 Updated by IR4T4 over 4 years ago

  • Description updated (diff)

#4 Updated by IR4T4 over 4 years ago

  • Description updated (diff)

#5 Updated by IR4T4 over 4 years ago

  • Target version changed from 2.71rc4 to 2.77

#6 Updated by IR4T4 about 4 years ago

  • Target version changed from 2.77 to 2.71

#7 Updated by Anna about 4 years ago

Here is a trivial patch that just adds the uptime and uptimeReset commands to the server side (not tested)
Since I have not worked with the codebase it may not be a good implemetation

If still needed I will work on printing the level/map uptime too

#8 Updated by IR4T4 about 4 years ago

  • Related to Bug #541: sv_protect 1 stops clients from connecting to the server after several days of uptime added

#9 Updated by IR4T4 about 4 years ago

  • % Done changed from 0 to 50

#10 Updated by Anna about 4 years ago

  • File dd hh mm ss.c added

Sorry, my git is broken for the moment so I can not generate new patches.
I firstly submit a example of code that prints the days, hours, minutes and seconds of the uptime.
Secondly I think to make it work with the map uptime we just need to add a static time_t mapUptimeSince, a void SV_MapUptimeReset(void){mapUptimeSince = time(NULL);} and call SV_MapUptimeReset from SV_InitGameProgs and SV_RestartGameProgs.

#11 Updated by Anna about 4 years ago

  • File deleted (dd hh mm ss.c)

#12 Updated by Anna about 4 years ago

#13 Updated by Radegast about 4 years ago

  • Priority changed from Normal to High

#14 Updated by IR4T4 almost 4 years ago

  • Target version changed from 2.71 to 2.77

#15 Updated by IR4T4 over 2 years ago

  • Priority changed from High to Normal

#16 Updated by IR4T4 over 2 years ago

  • Target version changed from 2.77 to 2.75

#17 Updated by Spyhawk over 2 years ago

What is missing to mark this feature as 'done’? Is map uptime really necessary?

#18 Updated by IR4T4 over 2 years ago

Spyhawk wrote:

What is missing to mark this feature as 'done’? ...

crashlog doesn’t print the uptime

... Is map uptime really necessary?

Do you know a way to find out the map uptime via rcon? I think that was the reason to add it.

#19 Updated by Spyhawk over 2 years ago

IR4T4 wrote:

crashlog doesn’t print the uptime

Ok, thank. We’ll find a way to add this.

... Is map uptime really necessary?

Do you know a way to find out the map uptime via rcon? I think that was the reason to add it.

I don’t know what "map uptime" means here. The time the map has been currently played? Maps are on rotation, so the uptime would be reset at each game. In what way having the map uptime
would help?

#20 Updated by IR4T4 over 2 years ago

I’m talking about rest of time for the current map.

#21 Updated by Spyhawk over 2 years ago

IR4T4 wrote:

I’m talking about rest of time for the current map.

This still doesn’t make sense to me... How rest of current map time is useful in any way? By definition, real map length is variable. I might totally be missing something here, but I don’t get what map time/rest of map time brings in crashlog information.

#22 Updated by IR4T4 over 2 years ago

  • Target version changed from 2.75 to 2.77

Also available in: Atom PDF