Branch: Tag:

2000-08-24

2000-08-24 19:54:18 by Andreas Lange <andreas@lange.cx>

Remove status/html-stuff and place it in the AI where it belongs (statusinfo.pike)

Rev: server/base_server/configuration.pike:1.350
Rev: server/base_server/roxen.pike:1.534

4:   // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.      // ABS and suicide systems contributed freely by Francesco Chemolli - constant cvs_version="$Id: roxen.pike,v 1.533 2000/08/23 16:06:29 per Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.534 2000/08/24 19:54:18 lange Exp $";      // Used when running threaded to find out which thread is the backend thread,   // for debug purposes only.
1911:    return current_user_id_number;   }    - public string full_status() - { -  int tmp; -  string res=""; -  array foo = ({0.0, 0.0, 0.0, 0.0, 0}); -  if(!sizeof(configurations)) -  return "<b>"+LOC_C(1, "No virtual servers enabled")+"</b>\n"; -  -  foreach(configurations, object conf) -  { -  if(!conf->sent -  ||!conf->received -  ||!conf->hsent) -  continue; -  foo[0] += conf->sent/(1024.0*1024.0)/(float)(time(1)-start_time+1); -  foo[1] += conf->sent/(1024.0*1024.0); -  foo[2] += conf->hsent/(1024.0*1024.0); -  foo[3] += conf->received/(1024.0*1024.0); -  foo[4] += conf->requests; -  } -  -  for(tmp = 1; tmp < 4; tmp ++) -  { -  // FIXME: LOCALE? -  if(foo[tmp] < 1024.0) -  foo[tmp] = sprintf("%.2f MB", foo[tmp]); -  else -  foo[tmp] = sprintf("%.2f GB", foo[tmp]/1024.0); -  } -  -  int uptime = time(1)-start_time; -  int days = uptime/(24*60*60); -  int hrs = uptime/(60*60); -  int min = uptime/60 - hrs*60; -  hrs -= days*24; -  -  tmp=(int)((foo[4]*600.0)/(uptime+1)); -  -  return(CALL_C("full_status", "eng")(real_version, -  start_time, days, hrs, min, uptime%60, -  foo[1], foo[0] * 8192.0, foo[2], -  foo[4], (float)tmp/(float)10, foo[3])); - } -  +    #ifndef __NT__   static int abs_started;