java - jboss 7 cpu monitoring -
i want monitor ""jboss 7 as"" cpu usage memory not cpu usage time, can using jmx ? when write function, cpu time, not cpu memory...
public string getcpuusage(){ try { method m=op.getclass().getdeclaredmethod("getprocesscputime"); m.setaccessible(true); object value=null; value=m.invoke(op); return value+""; } catch (securityexception e) { // todo auto-generated catch block e.printstacktrace(); } catch (nosuchmethodexception e) { // todo auto-generated catch block e.printstacktrace(); } catch (illegalargumentexception e) { // todo auto-generated catch block e.printstacktrace(); } catch (illegalaccessexception e) { // todo auto-generated catch block e.printstacktrace(); } catch (invocationtargetexception e) { // todo auto-generated catch block e.printstacktrace(); } return null; }
Comments
Post a Comment