From: brain Date: Wed, 20 Aug 2008 10:31:56 +0000 (+0000) Subject: We can finally have percent cpu in the stats z on windows now, same as it is on linux... X-Git-Tag: v2.0.23~2807 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=a10ae79f0ff7e8396c37141726c0925573ec0aa9;p=user%2Fhenk%2Fcode%2Finspircd.git We can finally have percent cpu in the stats z on windows now, same as it is on linux. The windows one surprisingly enough is more accurate than the linux one as posix gives no standard way of obtaining this. :-) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10181 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/src/commands/cmd_stats.cpp b/src/commands/cmd_stats.cpp index d270a5864..d952350ea 100644 --- a/src/commands/cmd_stats.cpp +++ b/src/commands/cmd_stats.cpp @@ -254,6 +254,7 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, User* user, str results.push_back(sn+" 249 "+user->nick+" :Total allocation: "+ConvToStr((MemCounters.WorkingSetSize + MemCounters.PagefileUsage) / 1024)+"K"); results.push_back(sn+" 249 "+user->nick+" :Pagefile usage: "+ConvToStr(MemCounters.PagefileUsage / 1024)+"K"); results.push_back(sn+" 249 "+user->nick+" :Page faults: "+ConvToStr(MemCounters.PageFaultCount)); + results.push_back(sn+" 249 "+user->nick+" :CPU Usage: " + ConvToStr(getcpu()) + "%"); } #endif }