سؤال

I would need to display realtime server informations on a webpage such as cpu load and such things. the more i can display the better it is. There is no restriction in the programming Language, but if it could be javascript it would be better. All samples i found use node.js to get the client informations, but none to get the server informations. At a later stage i would needto access the hardware IO of the server (a Raspberry) so this could be taken into account too.

A plus would be to display the realtime mouse position on the server as this would help me out on future implementations too.

Thanks

هل كانت مفيدة؟

المحلول

I'd highly recommend the open-source script phpSysInfo; it's been around for years now.

Here's a demo - enjoy!

نصائح أخرى

 for cpu usage, OperatingSystemMXBean.getSystemLoadAverage() /     
 OperatingSystemMXBean.getAvailableProcessors() (load average per cpu)
 for memory, OperatingSystemMXBean.getTotalPhysicalMemorySize() and     
 OperatingSystemMXBean.getFreePhysicalMemorySize()
 for disk space, File.getTotalSpace() and File.getUsableSpace()
  Limitations:

 The getSystemLoadAverage() and disk space querying methods are only available under Java
  6. Also, some JMX functionality may not be available to all platforms (i.e. it's been   
  reported that getSystemLoadAverage() returns -1 on Windows).

also check this .You can make a server side call via ajax and get the information from server side and can display.This code is in java .

http://docs.oracle.com/javase/7/docs/jre/api/management/extension/com/sun/management/OperatingSystemMXBean.html

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top