-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
status_queues, provide 'realtime' statistics #3792
status_queues, provide 'realtime' statistics #3792
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to look/work well, just a couple minor tweaks I've mentioned inline, thanks!
src/usr/local/www/getqueuestats.php
Outdated
// in its current implementation this php function does the job for now.. | ||
$result = array(); | ||
$result['timestamp'] = gettimeofday(true); | ||
$r = exec("pfctl -s queue -v", $output, $ret); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use the full path for /sbin/pfctl
src/usr/local/www/getqueuestats.php
Outdated
//required for convert_real_interface_to_friendly_interface_name() to get altq interface name.. | ||
include_once("interfaces.inc"); | ||
|
||
function get_queue_stats() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this function is used in multiple files, is there any particular reason it needs to be here instead of in a library file like /etc/inc/shaper.inc
?
} | ||
|
||
$(document).ready(function() { | ||
setTimeout(getqueueactivity, 150); | ||
}); | ||
}); | ||
|
||
function formatSpeedBits(speed) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be in /etc/inc/util.inc
next to format_bytes()
and format_number()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems difficult to move.. <?=gettext("Kbps"); ?>
doesnt work in pfSenseHelper.js as thats not parsed through php.. so maybe this is the best spot after all. even though it does duplicate javascript code thats also in graph.php. not sure what would be the proper way do de-duplicate this code..
-retrieve 'current' numbers from pfSense not using qstats provides the following advantages: -no long lag which requires 18 updates to get 90% accurate values on screen -showing queue's in 2 browsers does not show half the value status_queues, altq codel queue does not show queues, and when cbq without options doesn't tell its 'type' on the queue line then still parse its borrows and suspends status_queues, move function get_queue_stats() to shaper.inc
2c4134c
to
0e2bed2
Compare
@jim-p @rbgarga @sbeaver-netgate , i have rebased this PR, can you guy's review and pull it please? thanks. |
In an effort to improve the tracking of changes and bug/feature requests, we have decided to require an entry on the pfSense Redmine issue tracker associated with every pull request, and likewise the Redmine entry should also have a link back to the pull request. If you could, please associate this PR to a Redmine issue either by locating an existing issue at https://redmine.pfsense.org or by creating a new issue. Add a link to the Redmine issue that points to this PR, and also add a link on the PR to the Redmine issue. For more information, see https://doc.pfsense.org/index.php/Submitting_a_Pull_Request_via_Github Thanks! |
Redmine issue: https://redmine.pfsense.org/issues/8185 |
(cherry picked from commit 8d4f79c)
status_queues, provide 'realtime' statistics
-retrieve 'current' numbers from pfSense
not using qstats provides the following advantages:
-no long lag which requires 18 updates to get 90% accurate values on screen
-showing queue's in 2 browsers does not show half the value