vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Administrative and Maintenance Tools - Server Info in Admin Control Panel (https://vborg.vbsupport.ru/showthread.php?t=130960)

Dream 11-06-2006 10:00 PM

Server Info in Admin Control Panel
 
This is a script that shows a lot of server information inside the AdminCP.

- Shows server time with exec(date)
- Shows uptime with exec(uptime)
- Shows server load with file_get_contents("/proc/loadavg")
- Shows memory usage with exec(free -m)
- Shows free disk space with exec(df -h)
- phpinfo() link
- Shows MySQL Stats with mysql_stat()
- Shows MySQL Status with "SHOW STATUS" query
- Shows MySQL Vars with "SHOW VARIABLES" query

Its superadmin only.

Installation
- Upload "server_info.php" to your admincp
- Upload "cpnav_serverinfo.xml" to your includes/xml
- Reload your AdminCP, its under "Server Info"


Info on Server Loads

voteforbird 11-07-2006 04:52 AM

Screenshot?

Feckie (Roger) 11-07-2006 05:09 AM

Installed and working............:)

lighter 11-07-2006 06:40 AM

Would appreciate for a screen shot.

Snake 11-07-2006 09:09 AM

Yep I'd love to see a screenshot, please. :)

redspider 11-07-2006 03:09 PM

here some screenshot

redspider 11-07-2006 03:10 PM

more screenshot

redspider 11-07-2006 03:10 PM

some more

redspider 11-07-2006 03:12 PM

last screenshot

this was Installed in dtv100.com and working good thanks

transitbus 11-07-2006 03:41 PM

Works great except I can not access memory information. This is nothing to do with this mod but instead locking of the server form displaying this info to shmucks like me.

Dream 11-07-2006 08:39 PM

Thanks Redspider :)

TexasDreams 11-07-2006 11:17 PM

Quote:

Originally Posted by transitbus
Works great except I can not access memory information. This is nothing to do with this mod but instead locking of the server form displaying this info to shmucks like me.

I wasn't getting the "Memory Usage" display either, because my server is on FreeBSD instead of Linux.

So, in "server_info.php" I changed lines 58 through 63...

FROM (Linux using 'free')
if ($_REQUEST['show'] == 'memoryusage' || empty($_REQUEST['show'])) {
print_form_header('', '');
print_table_header('Memory Usage &nbsp;<span class="normal">exec(free)</span>');
exec('free', $mem);
print_description_row('<pre>'.implode('<br />', $mem).'</pre>');
print_table_footer();

TO (FreeBSD using 'vmstat')
if ($_REQUEST['show'] == 'memoryusage' || empty($_REQUEST['show'])) {
print_form_header('', '');
print_table_header('Memory Usage &nbsp;<span class="normal">exec(vmstat)</span>');
exec('vmstat', $mem);
print_description_row('<pre>'.implode('<br />', $mem).'</pre>');
print_table_footer();

Works in a pinch to give the same kind of info. :)

Chad F. 11-08-2006 03:21 AM

Is this secure or is there vulnrabilites with it?

Guest210212002 11-12-2006 01:05 PM

Very slick. Can you add the output from plain old uptime as well?

/me clicks install

Dream 11-12-2006 05:26 PM

Sure, whats the unix command for that?

transitbus 11-12-2006 05:45 PM

Quote:

Originally Posted by TexasDreams
I wasn't getting the "Memory Usage" display either, because my server is on FreeBSD instead of Linux.

So, in "server_info.php" I changed lines 58 through 63...

FROM (Linux using 'free')
if ($_REQUEST['show'] == 'memoryusage' || empty($_REQUEST['show'])) {
print_form_header('', '');
print_table_header('Memory Usage &nbsp;<span class="normal">exec(free)</span>');
exec('free', $mem);
print_description_row('<pre>'.implode('<br />', $mem).'</pre>');
print_table_footer();

TO (FreeBSD using 'vmstat')
if ($_REQUEST['show'] == 'memoryusage' || empty($_REQUEST['show'])) {
print_form_header('', '');
print_table_header('Memory Usage &nbsp;<span class="normal">exec(vmstat)</span>');
exec('vmstat', $mem);
print_description_row('<pre>'.implode('<br />', $mem).'</pre>');
print_table_footer();

Works in a pinch to give the same kind of info. :)

LOL didn't even think of this one. Much thanks for it :D

adwade 11-17-2006 12:39 AM

This is a really neat tool, lots of info all in one place.:D One question though, being BRAND NEW to all this I'm still learning the ropes of vB adminstration.

How do others know or track simple things like available disk space, or memory on their server?

Is that just a (daily) manual process wherein you look at it, or are there automated tools to forewarn you of an impending disaster?(i.e. emailed alert to admin, etc)

Does cPanel (or anything else) have those kind of features? Are there other MODs out there that admins typically use to keep an eye out about such things? Or does your HOST warn you when you come to close to the edge? Etc. Thanxx!

da420 11-30-2006 06:49 AM

/me installs

pedroenf 12-05-2006 12:35 AM

Could this mod work in windows 2003 sever? Thanks.

Zia 12-05-2006 08:37 AM

it works with vb3.6.4 and all types of server?

is there any way to show cpu uses stats ?

Cybershaolin 02-13-2007 05:22 AM

Sorry wrong thread. Delte please.

Dream 03-16-2007 02:54 PM

Updated, added uptime

adwade 03-16-2007 03:09 PM

Quote:

Originally Posted by Dream (Post 1204889)
Updated, added uptime

Just went to update after FTP'ing the file to my Admincp directory and during the Import/Overwrite got: "Invalid File Specified" Checked and rechecked using the browse funtion and it show up, but won't IMPORT. Is the xml file ok?

Dream 03-16-2007 03:11 PM

Don't import the xml, upload it to includes/xml

adwade 03-16-2007 03:13 PM

Ah ha! No wonder it wouldn't work. Sorry-so-slow. Thanxx for the help, works fine when you follow the directions! ha, ha

As so clearly stated above:

Installation
- Upload "server_info.php" to your admincp
- Upload "cpnav_serverinfo.xml" to your includes/xml
- Reload your AdminCP, its under "Server Info"

Dream 03-16-2007 03:30 PM

No problem :)

daddygrim 03-18-2007 11:00 PM

looking good!!!

bluechris 03-24-2007 08:40 AM

Nothing works for 2k3 servers and IIS... only mysql info :(

Dream 03-24-2007 02:41 PM

Yes this mod is meant for Unix, sorry.

If anyone wants to use this as a base for a Win version be my guest.

Doctor Death 03-24-2007 06:31 PM

Installed.

Not sure why you need individual menu items when you have the ALL option...

Nice mod... Will be looking forward to next version.

Isn't there the ability to import as a product?

Server Info will not show up as product now and therefore you cannot track versions installed.

Thanks

jw00dy 03-26-2007 01:35 AM

Great mod.

I made some modifications to mine so it would show the free and df information is easier to read formats.

free -m show the memory in MB and not kb.
df -h show the stats in MB, GB, etc.

Both are much easier to read. And feel free to update the mod so it shows them this way, as I think most will prefer it this way.

Lines 66 - 80 in server_info.php changed to this:
Code:

    if ($_REQUEST['show'] == 'memoryusage' || empty($_REQUEST['show'])) {
    print_form_header('', '');
    print_table_header('Memory Usage &nbsp;<span class="normal">exec(free -m)</span>');
    exec('free -m', $mem);
    print_description_row('<pre>'.implode('<br />', $mem).'</pre>');
    print_table_footer();
    }
   
    if ($_REQUEST['show'] == 'freediskspace' || empty($_REQUEST['show'])) {
    print_form_header('', '');
    print_table_header('Free Disk Space &nbsp;<span class="normal">exec(df -h)</span>');
    exec('df -h', $df);
    print_description_row('<pre>'.implode('<br />', $df).'</pre>');
    print_table_footer();
    }


Dream 03-26-2007 01:40 AM

Thanks, I'll update the mod :)

great

jw00dy 03-26-2007 01:43 AM

Guess some screen prints might be nice too:
df -h
Code:

Filesystem            Size  Used Avail Use% Mounted on
/dev/hda6            2.0G  473M  1.4G  26% /
/dev/hda1              99M  36M  59M  38% /boot
/dev/hda2            9.7G  1.9G  7.4G  20% /usr
/dev/hda3            7.7G  797M  6.6G  11% /var
/dev/hda7            989M  17M  922M  2% /tmp
/dev/hda8              52G  5.3G  44G  11% /home
none                1000M    0 1000M  0% /dev/shm
/dev/hdb1              46G  2.7G  41G  7% /home2
/dev/hdb3              26G  7.7G  17G  32% /backup

free -m
Code:

            total      used      free    shared    buffers    cached
Mem:          1999      1882        116          0        213        745
-/+ buffers/cache:        924      1075
Swap:        4000          0      4000


jw00dy 03-26-2007 01:45 AM

Quote:

Originally Posted by Dream (Post 1212350)
Thanks, I'll update the mod :)

great

Cool, just glad to help. I can't code for jack, but in some cases I'm useful :D :D

Dream 03-26-2007 02:31 AM

Well, I'm not a Unix guru myself :)

Updated, made free be free -m and df be df -h

Dream 03-26-2007 02:40 AM

Quote:

Originally Posted by Doctor Death (Post 1211244)
Server Info will not show up as product now and therefore you cannot track versions installed.

I always send an update when I update my mods. Sending an update sends an email to everyone that has the mod marked as Installed. So no need for a useless product xml just to show a version number.

adwade 03-26-2007 11:03 AM

One question, for those of us not in-the-know (yet) what do each of the numbers mean?(i.e. Average for some timeperiod, Instantaneous, Peak, etc??)

Server Loads: average: 2.22, 2.10, 2.30 2.22 : 2.10


Also Thanxx for the tickler stating: Please click Mark as Installed if you use this modification >>>> Somehow I'd overlooked Clicking 'Installed' and it caught my attention this time. And after reading the statement just above, I understand WHY it's important to do so!:eek: Anyway, I'm on board now. :D Nice improvements too, jw00dy. :up:

mcqwert 03-26-2007 05:08 PM

Thanks.

Also, frightening to see how high my server load is:

Server Loads: 28.07 26.97 : 29.84

Dream 03-26-2007 10:38 PM

Quote:

Originally Posted by adwade (Post 1212627)
One question, for those of us not in-the-know (yet) what do each of the numbers mean?(i.e. Average for some timeperiod, Instantaneous, Peak, etc??)

Server Loads: average: 2.22, 2.10, 2.30 2.22 : 2.10


Also Thanxx for the tickler stating: Please click Mark as Installed if you use this modification >>>> Somehow I'd overlooked Clicking 'Installed' and it caught my attention this time. And after reading the statement just above, I understand WHY it's important to do so!:eek: Anyway, I'm on board now. :D Nice improvements too, jw00dy. :up:


Here's info on server loads that may help you

http://www.vbulletin.com/forum/showt...&postid=291831

Paul M 03-26-2007 10:46 PM

Quote:

Originally Posted by mcqwert (Post 1212844)
Thanks.

Also, frightening to see how high my server load is:

Server Loads: 28.07 26.97 : 29.84

That's not just frightening, it's appalling, I honestly don't know how your forum is running - the response times from it must be poor/dire.


All times are GMT. The time now is 01:29 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01439 seconds
  • Memory Usage 1,819KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete