示例#1
0
文件: netstat.c 项目: Elohim/FGmud
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";
    }
示例#2
0
文件: mudinfo.c 项目: mudchina/nitan3
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());
}