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)

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 10:37 PM.

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.01084 seconds
  • Memory Usage 1,745KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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