Retrieving RAM/CPU usage with PHP
#1

Hello

I'm creating admin panel for my server with PHP, and I'd like to echo current RAM and CPU usage of server.
Server is running on linux Debian 5 VPS, any help is appreciated.
Reply
#2

Use phpSysInfo library.
Reply
#3

Thank You!
Reply
#4

Sorry on double post, but I'm trying to retrieve samp03svr process RAM/CPU usage, not usage of whole VPS.
Reply
#5

Quote:
Originally Posted by Ironboy500[TW]
Посмотреть сообщение
Sorry on double post, but I'm trying to retrieve samp03svr process RAM/CPU usage, not usage of whole VPS.
You want echo your gamemode CPU/RAM usage?

If yes,i'm with you,i wanna know how to echo too...
Reply
#6

You can retrieve data from a single process with that library I guess. Didn't really check it though so I may be wrong.
Reply
#7

Quote:
Originally Posted by RyDeR`
Посмотреть сообщение
You can retrieve data from a single process with that library I guess. Didn't really check it though so I may be wrong.
I just checked it out. It displays general information on your system together with CPU/RAM usage.
But not for a single process. And I'm also looking for a custom code because I'm willing to include it into my admin panel.
Reply
#8

simple ****** for some linux commands, eg "retrieve linux process memory usage",
http://www.cyberciti.biz/tips/howto-...y-program.html

then use the php send command equillivant and echo it. Simple.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)