[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


Messages In This Thread
[REL][Linux]Get your servers load average - by MaXSpeeD - 07.06.2011, 20:42
Re : [REL][Linux]Get your servers load average - by Hip-hop - 07.06.2011, 21:22
Re: [REL][Linux]Get your servers load average - by MaXSpeeD - 07.06.2011, 21:29
Re: [REL][Linux]Get your servers load average - by linuxthefish - 07.06.2011, 21:56
AW: [REL][Linux]Get your servers load average - by Meta - 16.06.2011, 13:11

Forum Jump:


Users browsing this thread: 1 Guest(s)