mixed cmd(string args) { string *arr; string ret = ""; string dss = replace_string(dump_socket_status(),"-- 0","--\n 0"); foreach(mixed key, mixed val in network_stats()){ val = val+""; ret += sprintf("%:-30s %s",key, val)+"\n"; }
string query_rusage_message() { mapping networkstats = network_stats(); return sprintf("已接收 %d 封包(%.2f/sec),已传送 %d 封包(%.2f/sec)", networkstats["incoming packets total"], to_float(networkstats["incoming packets total"])/uptime(), networkstats["outgoing packets total"], to_float(networkstats["outgoing packets total"])/uptime()); }