[Plugin] [REL][Linux]Get your servers load average
#1

Well this a quick plugin I just whipped up that allows you to calculate the load average of what ever linux machine your server is running on. (Useful for debugging...) Since this plugin only comes with one function no include will be in the archive.

Install: (So simple a monkey could do it)
Place loadavg.so in your plugins directory then open your server.cfg and add this line twords the top if its not already there
pawn Код:
plugins loadavg.so
Now just go into what ever script you intend on using this for and add this line below your includes
pawn Код:
native Float:loadavg();
Heres an example of how to use this plugin in your gamemode/filterscript
pawn Код:
#include <a_samp>
native Float:loadavg();

main(){
     printf("System load average: %f",loadavg());
     return;
}
Download the attached .zip file for the compiled .so plugin and the plugin source.
Reply
#2

Oh nice work !
Reply
#3

thanks man
Reply
#4

Nice, i've been looking for something like this

(I made one using the HTTP function in PAWN and PHP, though i'm useless at plugins)
Reply
#5

yeah, like linuxthefish already said, it's also possible via PHP etc... but how about an addition for the CPU Usage Value? (Also possible via PHP but more difficult)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)