📄 mstatusmonitor.java
字号:
package net.jumperz.app.MGuardian.plugin;
import java.io.*;
import java.util.*;
import net.jumperz.net.*;
import net.jumperz.util.*;
import net.jumperz.app.MGuardian.*;
public class MStatusMonitor
extends MGuardianPlugin
{
//--------------------------------------------------------------------------------
public Map execute( Map sessionInfo )
throws IOException
{
MHttpResponse response = new MHttpResponse();
StringBuffer strBuf = new StringBuffer( 1024 );
strBuf.append( "<html>" );
strBuf.append( "runningThreadCount: " );
strBuf.append( MGuardianImpl.getInstance().getThreadPool().getRunningThreadCount() );
strBuf.append( "<br>waitingThreadCount: " );
strBuf.append( MGuardianImpl.getInstance().getThreadPool().getWaitingThreadCount() );
strBuf.append( "<br>totalMemory: " );
strBuf.append( Runtime.getRuntime().totalMemory() );
strBuf.append( "<br>freeMemory: " );
strBuf.append( Runtime.getRuntime().freeMemory() );
strBuf.append( "<br>commandCount: " );
strBuf.append( MGuardianImpl.getInstance().getThreadPool().getCommandCount() );
strBuf.append( "</html>" );
response.setBody( strBuf.toString() );
Map pluginResult = new HashMap();
pluginResult.put( "response", response );
return pluginResult;
}
//--------------------------------------------------------------------------------
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -