1

I am trying to make an app for my phone that will allow me to manage my server remotely. I would like to be able to have this app display stats about the server such as resource usage + system uptime, however I am having difficulty.

My server is running windows server 2008 R2, and all the answers I have found are for UNIX systems. I have tried that many different solutions that I would be here forever if I were to list them.

My server is running on SoYouStart, so I did think about using their Real-Time-Monitoring API, however I find using their API extremely difficult and I run into issues constantly with it.

I need to get System Uptime and Ram usage percentage into a file (preferably JSON) which my mobile app can then access.

If there is a solution baseon on the OVH/SYS API, I'm happy to use that or a PHP script to update a JSON file.

Anthon
  • 69,918
  • 32
  • 186
  • 246
JamesS1
  • 39
  • 1
  • 4

2 Answers2

1

1) See this URL:

How do you get server CPU usage and RAM usage with php?

2) Once you have the system usage, you can save this information in JSON or any other format in a file onto a URL (this file is updated every x seconds ...).

3) Access this JSON file over URL for your mobile app.

Community
  • 1
  • 1
Ayub
  • 510
  • 2
  • 6
  • 21
1

If you only need basic memory / CPU / disk usage information you don't need to complicate things with advanced APIs. You can use the com_dotnet extension on Windows or the sys_getloadavg() function on Linux. The memory_get_usage() function will show the amount of used memory. See more details here

ali
  • 10,927
  • 20
  • 89
  • 138