Log in

View Full Version : vB TOP for linux dedicated servers


Erwin
06-03-2004, 10:00 PM
Dr Erwin Loh's TOP for vB3 version 1.0

Dedicated server admins running vBulletins will know the importance of monitoring the TOP stats on your linux machine.

However, telnet or SSH access is not always available - e.g. when you are work or behind a firewall.

I've made a quick php script, that allows you to quickly view total number of users (members + guests) online, total httpd and mysql processes, and your top stats, all via a web page. It's coded so that only Admins (who have access to your Admin CP) can view this page. It uses your forum permissions, so you can change the code to allow only your userid to view it.

I've purposely made it sparse and clean, so that no bandwidth is wasted when viewing this page.

The file is top.php - just upload it to your forums directory, and view it.

Keep refreshing it to view your TOP stats in realtime. I didn't put in an auto-refresh as that can be annoying.

Enjoy! I know it's useful for me when I'm at work!

msimplay
06-04-2004, 01:19 PM
great stuff Erwin , can you add the code to add this as a link in admincp under statistics and logs

jugo
06-04-2004, 02:12 PM
BADASS!!!

Can I say that here??

Cause that is what this is..... Thanks Doc.

/me installs.

mmw
06-04-2004, 05:10 PM
Very nice will save me time as I'm lazy :)
* mmw installs

Reeve of shinra
06-04-2004, 05:25 PM
Can this be broken down by mysql database ? I'd be interested in seeing that too if possible but this is a handy hack to have.

Erwin
06-05-2004, 01:04 AM
Can this be broken down by mysql database ? I'd be interested in seeing that too if possible but this is a handy hack to have.
No, it can't. This looks at the whole server, and gives you a list of the top processes. It's useful for optimizing servers, and monitoring the performance.

The Realist
06-05-2004, 06:28 AM
Works well.

Thanks.

deathemperor
06-05-2004, 08:51 AM
nice hack Doc.
thanks.

mtha
06-05-2004, 07:20 PM
Dr Erwin Loh's TOP for vB3 version 1.0

Dedicated server admins running vBulletins will know the importance of monitoring the TOP stats on your linux machine.

The file is top.php - just upload it to your forums directory, and view it.

is there any requirement for server, or file to read the load?
here's all what I get:
Users online now = 36 (12 members + 24 guests)Http processes currently running = Mysql processes currently running = Dr Erwin Loh's TOP for vB3 version 1.0

Erwin
06-05-2004, 10:42 PM
is there any requirement for server, or file to read the load?
here's all what I get:
Mmm... are you on a dedicated server? What's the OS?

Hialls
06-05-2004, 11:49 PM
Lovely :D
shame about the colors hehehe

Erwin
06-06-2004, 01:37 AM
Lovely :D
shame about the colors hehehe
Color? I should have made it with a black background like in SSH, to make it "authentic". ;)

mtha
06-06-2004, 11:01 AM
Mmm... are you on a dedicated server? What's the OS?
yes, I'm on dedicated ... but what make the site different? because the site is one child on the server, just the same as any other site. I mean how the site permission should be, to be consider dedicated :)

Red Hat Linux 7.3 - Ensim Pro 3.5

Erwin
06-06-2004, 11:51 AM
yes, I'm on dedicated ... but what make the site different? because the site is one child on the server, just the same as any other site. I mean how the site permission should be, to be consider dedicated :)

Red Hat Linux 7.3 - Ensim Pro 3.5
No idea mate. :)

350Chevy
06-07-2004, 12:21 AM
Same thing as mtha, dedicated server running RH Linux

Users online now = 7 (7 members + 0 guests)

Http processes currently running = 0
Mysql processes currently running = 0




Dr Erwin Loh's TOP for vB3 version 1.0


That's all I see..

Erwin
06-07-2004, 12:40 AM
Same thing as mtha, dedicated server running RH Linux



That's all I see..
Mmm... does the owner of your forum files have permission to SSH? There is no jailshell happening?

350Chevy
06-07-2004, 01:13 AM
Mmm... does the owner of your forum files have permission to SSH? There is no jailshell happening?


ahh.. probably it then.. ;) No biggy.. I'll just telnet in like I always do.. hehe

Erwin
06-07-2004, 01:30 AM
I'm about to release a web-based Telnet/ SSH interface for vB3 Admin CP. ;) Wait for it!

PranK
06-07-2004, 04:24 AM
obese!

thanks erwin!

/me clicks install

mtha
06-07-2004, 06:12 PM
Mmm... does the owner of your forum files have permission to SSH? There is no jailshell happening?
:) gotcha.

Having a dedicated server doesnt mean your website can ssh, doesnt mean the forum user have this permisision either.

that's too much security risk for me :) so I disable all site's ssh/telnet permission.

idea, making the file's owner .... root or some user who can ssh, and put it in some secret area that safemod off :D, maybe it'd work, right? :D

the Sandman
06-17-2004, 10:24 PM
Just uploaded top.php, and I'm getting:
Invalid SQL: SELECT COUNT(*) AS count FROM session WHERE userid=0 AND lastactivity>1087512638
mysql error: Table 'vbadmins_vbulletin3.session' doesn't exist
mysql error number: 1146 :nervous:

Dean C
06-17-2004, 10:32 PM
You just can't keep yourself away eh Erwin ;) Good to see you're still around sharing your work with the community!

mtha
06-29-2004, 10:16 AM
Dr Erwin Loh's TOP for vB3 version 1.0

Dedicated server admins running vBulletins will know the importance of monitoring the TOP stats on your linux machine.
Erwin, checkout this one, it's very cool too :D just jump into
http://www.vbulletin.com/forum/showpost.php?p=284051&postcount=78

datainternet
06-29-2004, 04:16 PM
Users online now = 7 (7 members + 0 guests)

Http processes currently running = 0
Mysql processes currently running = 0




Dr Erwin Loh's TOP for vB3 version 1.0

Same here.

MFG datainternet

corn
07-07-2004, 05:05 PM
Nice one Erwin !

Tnx !

mtha
07-07-2004, 05:13 PM
Same here.

MFG datainternet
my post above has solution:


Having a dedicated server doesnt mean your website can ssh, doesnt mean the forum user have this permisision either.

that's too much security risk for me https://vborg.vbsupport.ru/ so I disable all site's ssh/telnet permission.

idea, making the file's owner .... root or some user who can ssh, and put it in some secret area that safemod off https://vborg.vbsupport.ru/, maybe it'd work, right? https://vborg.vbsupport.ru/

heynurse
07-09-2004, 08:03 AM
Love it Erwin!

DavidN
05-07-2005, 10:51 PM
As much as I love SSH, this script does the business for me :D

RMS-Chef
01-13-2007, 05:43 PM
Hope someone will see this...pretty old hack. :)
Just tried this with v3.6.4 and it is not working. Must be some DB variances going this far back. Any chance anyone could take a look at this and adjust it for v3.6.x???