PDA

View Full Version : I need a very specific hack (server load)


irc
12-11-2002, 04:00 PM
I'm on a "semi-dedicated" server and it is experiencing server load issues. Since I have a moderately busy vbulletin, I'm getting blamed for it. I would like to write a hack that records the server load, number of users and time whenever it is called. I plan on putting it in the newthread.php and newreply.php files, so it adds an entry in the database whenever someone posts.

Here is what I need help with:

I need to know what the php function for getting the server load is (I'm having trouble finding it on php.net).
I need to know how to retrieve the number of current users of the board.

I think I can handle the rest of the hack if I can figure out these two things.

Xenon
12-11-2002, 04:13 PM
$loggedins=$DB_site->query_first("SELECT COUNT(*) AS total FROM session WHERE lastactivity>$datecut");

that should save the ammount of online users in $loggedins[total]

Erwin
12-12-2002, 02:51 AM
Looks like it's time to go dedicated. :)