ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/modules/m_stats.c
(Generate patch)

Comparing ircd-hybrid/trunk/modules/m_stats.c (file contents):
Revision 7313 by michael, Wed Feb 10 11:16:26 2016 UTC vs.
Revision 7330 by michael, Fri Feb 19 17:50:13 2016 UTC

# Line 278 | Line 278 | static void
278   stats_usage(struct Client *source_p, int parc, char *parv[])
279   {
280    struct rusage rus;
281 <  time_t secs;
282 <  time_t rup;
281 >  uintmax_t secs;
282 >  uintmax_t rup;
283   #ifdef  hz
284   # define hzz hz
285   #else
# Line 313 | Line 313 | stats_usage(struct Client *source_p, int
313                       (int)(rus.ru_utime.tv_sec/60), (int)(rus.ru_utime.tv_sec%60),
314                       (int)(rus.ru_stime.tv_sec/60), (int)(rus.ru_stime.tv_sec%60));
315    sendto_one_numeric(source_p, &me, RPL_STATSDEBUG | SND_EXPLICIT,
316 <                     "R :RSS %ld ShMem %ld Data %ld Stack %ld",
316 >                     "R :RSS %ld ShMem %ju Data %ju Stack %ju",
317                       rus.ru_maxrss,
318 <                     (rus.ru_ixrss / rup), (rus.ru_idrss / rup),
319 <                     (rus.ru_isrss / rup));
318 >                     (uintmax_t)(rus.ru_ixrss / rup), (uintmax_t)(rus.ru_idrss / rup),
319 >                     (uintmax_t)(rus.ru_isrss / rup));
320    sendto_one_numeric(source_p, &me, RPL_STATSDEBUG | SND_EXPLICIT,
321                       "R :Swaps %d Reclaims %d Faults %d",
322                       (int)rus.ru_nswap,
# Line 1130 | Line 1130 | stats_tstats(struct Client *source_p, in
1130                       "t :Client Server");
1131    sendto_one_numeric(source_p, &me, RPL_STATSDEBUG | SND_EXPLICIT,
1132                       "t :connected %u %u",
1133 <                     (unsigned int)sp->is_cl,
1134 <                     (unsigned int)sp->is_sv);
1133 >                     sp->is_cl, sp->is_sv);
1134    sendto_one_numeric(source_p, &me, RPL_STATSDEBUG | SND_EXPLICIT,
1135                       "t :bytes sent %ju %ju",
1136                       sp->is_cbs, sp->is_sbs);
# Line 1139 | Line 1138 | stats_tstats(struct Client *source_p, in
1138                       "t :bytes recv %ju %ju",
1139                       sp->is_cbr, sp->is_sbr);
1140    sendto_one_numeric(source_p, &me, RPL_STATSDEBUG | SND_EXPLICIT,
1141 <                     "t :time connected %u %u",
1142 <                     (unsigned int)sp->is_cti,
1144 <                     (unsigned int)sp->is_sti);
1141 >                     "t :time connected %ju %ju",
1142 >                     sp->is_cti, sp->is_sti);
1143   }
1144  
1145   static void
# Line 1224 | Line 1222 | static void
1222   stats_servlinks(struct Client *source_p, int parc, char *parv[])
1223   {
1224    uintmax_t sendB = 0, recvB = 0;
1225 <  time_t uptime = 0;
1225 >  uintmax_t uptime = 0;
1226    dlink_node *node = NULL;
1227  
1228    if (ConfigServerHide.flatten_links && !HasUMode(source_p, UMODE_OPER))
# Line 1519 | Line 1517 | do_stats(struct Client *source_p, int pa
1517   static int
1518   m_stats(struct Client *source_p, int parc, char *parv[])
1519   {
1520 <  static time_t last_used = 0;
1520 >  static uintmax_t last_used = 0;
1521  
1522    /* Check the user is actually allowed to do /stats, and isn't flooding */
1523    if ((last_used + ConfigGeneral.pace_wait) > CurrentTime)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines