diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-06-18 18:54:25 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-06-18 18:54:25 +0000 |
commit | ed6fcd4a50f3a0d84ae07a8a0011b193e00cf088 (patch) | |
tree | 3cafa73e9bf1a0e5a65b73a0ff4ebdcf955f154e /src/commands/cmd_stats.cpp | |
parent | 874c398ad9e185cca26011317a2f7ecf2623d214 (diff) |
Add the rest of the stuff for named pipe comms, including feedback information, and fix a bug in configreader that made it load the core commands every rehash
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9913 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands/cmd_stats.cpp')
-rw-r--r-- | src/commands/cmd_stats.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/commands/cmd_stats.cpp b/src/commands/cmd_stats.cpp index 03c48609f..1296bf08a 100644 --- a/src/commands/cmd_stats.cpp +++ b/src/commands/cmd_stats.cpp @@ -227,6 +227,14 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, User* user, str snprintf(percent, 30, "%03.5f%%", per); results.push_back(sn+" 249 "+user->nick+" :CPU Usage: "+percent); } +#else + PROCESS_MEMORY_COUNTERS MemCounters; + if (GetProcessMemoryInfo(GetCurrentProcess(), &MemCounters, sizeof(MemCounters))) + { + 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)); + } #endif } break; |