1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
if (allsections || defsections || !strcasecmp(section,"memory")) { char hmem[64]; char peak_hmem[64]; size_t zmalloc_used = zmalloc_used_memory();
if (zmalloc_used > server.stat_peak_memory) server.stat_peak_memory = zmalloc_used;
bytesToHuman(hmem,zmalloc_used); bytesToHuman(peak_hmem,server.stat_peak_memory); if (sections++) info = sdscat(info,"rn"); info = sdscatprintf(info, "# Memoryrn" "used_memory:%zurn" "used_memory_human:%srn" "used_memory_rss:%zurn" "used_memory_peak:%zurn" "used_memory_peak_human:%srn" "used_memory_lua:%lldrn" "mem_fragmentation_ratio:%.2frn" "mem_allocator:%srn", zmalloc_used, hmem, server.resident_set_size, server.stat_peak_memory, peak_hmem, ((long long)lua_gc(server.lua,LUA_GCCOUNT,0))*1024LL, zmalloc_get_fragmentation_ratio(server.resident_set_size), ZMALLOC_LIB ); }
|
近期评论