Server load and disk usage

randac56

Member
May 25, 2018
915
0
16
At last a forum!!!! cheesy.gif cheesy.gif cheesy.gif

I was wondering if it was at all possible for you guys to intergrate a server load bar and disk used bar into the webgui.

I have added a link by adding it to the help drop down. All it is a basic php script which shows basic df, du information along with a server load and disk usage bar.

Stubs grin.gif
 

jith45

Member
May 25, 2018
960
0
16
1) Web-server user can't access to such information in common case.
2) You already can see available disk space in tab "General". When you have one selected torrent.
3) Of course, you can integrate to web-ui all, what you want. See file plugins.js, functions attachPageToOptions, attachPageToTabs, addButtonToToolbar (available in last svn only)
 

shwetha17

Member
May 24, 2018
785
0
16
actually on freebsd it's quite simple to access the info, though i'm not sure how they do it in linux.

in freebsd you simply type "uptime"


I will look into how it is done with linux, i'm pretty sure it's pulled from somewhere in /proc
 

shwetha17

Member
May 24, 2018
785
0
16
uptime works in linux as well. So adding this via php should be as simple as
Code:
<?php
$uptime = exec(&#39;uptime&#39;);
echo $uptime;
?>

but i don't know anything about REALLY doing it...i am no programmer
 

peshua19

Member
May 25, 2018
897
0
16
This honestly wouldn't be that hard. By default PHP isn't locked down enough to prevent this type of information from being gathered. Getting the load average and say, the output of `df -h` is trivial, however you would take a rather large performance hit if you wanted an actual 'load bar', e.g. phpsysinfo; they offer a load average bar that can be enabled, and if I'm not mistaken you take approximately a one second time penalty for it. Perhaps just a disk usage bar like wtorrent has, and just the load average?
 

shwetha17

Member
May 24, 2018
785
0
16
i think the best bet, if someone did this, would be to make it refresh every 5 seconds or so.

Ideally, for people who run multiple users, it would be better to have this as a separate page....then it could just be added in a tab. This would prevent having 5 users calling df and uptime every 5 seconds....
anyways, it's not a huge issue for me.
 

randac56

Member
May 25, 2018
915
0
16
Quote
This honestly wouldn't be that hard. By default PHP isn't locked down enough to prevent this type of information from being gathered. Getting the load average and say, the output of `df -h` is trivial, however you would take a rather large performance hit if you wanted an actual 'load bar', e.g. phpsysinfo; they offer a load average bar that can be enabled, and if I'm not mistaken you take approximately a one second time penalty for it. Perhaps just a disk usage bar like wtorrent has, and just the load average?


I installed phpsysinfo and added a link to it from the help drop down and its perfect...thank you:)
 

shwetha17

Member
May 24, 2018
785
0
16
there are a few sections in the forum which would fit the bill.

plugins
plugin development
hacks and mods


and that's just off the top of my head.