Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons

Reply
 
Thread Tools
Server Info in Admin Control Panel Details »»
Server Info in Admin Control Panel
Version: 1.0, by Dream Dream is offline
Developer Last Online: Sep 2010 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 3.6.8 Rating:
Released: 11-06-2006 Last Update: 03-25-2007 Installs: 173
Re-useable Code Additional Files  
No support by the author.

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 03-26-2007, 01:35 AM
jw00dy's Avatar
jw00dy jw00dy is offline
 
Join Date: Dec 2004
Location: Utah
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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();
    }
Reply With Quote
  #33  
Old 03-26-2007, 01:40 AM
Dream's Avatar
Dream Dream is offline
 
Join Date: Oct 2001
Posts: 2,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, I'll update the mod

great
Reply With Quote
  #34  
Old 03-26-2007, 01:43 AM
jw00dy's Avatar
jw00dy jw00dy is offline
 
Join Date: Dec 2004
Location: Utah
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #35  
Old 03-26-2007, 01:45 AM
jw00dy's Avatar
jw00dy jw00dy is offline
 
Join Date: Dec 2004
Location: Utah
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dream View Post
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
Reply With Quote
  #36  
Old 03-26-2007, 02:31 AM
Dream's Avatar
Dream Dream is offline
 
Join Date: Oct 2001
Posts: 2,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, I'm not a Unix guru myself

Updated, made free be free -m and df be df -h
Reply With Quote
  #37  
Old 03-26-2007, 02:40 AM
Dream's Avatar
Dream Dream is offline
 
Join Date: Oct 2001
Posts: 2,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Doctor Death View Post
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.
Reply With Quote
  #38  
Old 03-26-2007, 11:03 AM
adwade adwade is offline
 
Join Date: Aug 2006
Location: SouthEast, TN
Posts: 323
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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! Anyway, I'm on board now. Nice improvements too, jw00dy. :up:
Reply With Quote
  #39  
Old 03-26-2007, 05:08 PM
mcqwert mcqwert is offline
 
Join Date: Mar 2007
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks.

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

Server Loads: 28.07 26.97 : 29.84
Reply With Quote
  #40  
Old 03-26-2007, 10:38 PM
Dream's Avatar
Dream Dream is offline
 
Join Date: Oct 2001
Posts: 2,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by adwade View Post
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! Anyway, I'm on board now. Nice improvements too, jw00dy. :up:

Here's info on server loads that may help you

http://www.vbulletin.com/forum/showt...&postid=291831
Reply With Quote
  #41  
Old 03-26-2007, 10:46 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mcqwert View Post
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.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:17 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05302 seconds
  • Memory Usage 2,312KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete