Feature #9290
closed
Need a way to suppress status output display in /status.php
Added by Chris Linstruth over 5 years ago.
Updated over 5 years ago.
Description
Many times on a large system a status output cannot be taken because displaying things like a large state table can exhaust the php memory.
It has been suggested to add a flag such as ?archiveonly=true to status.php to suppress the display of the contents and only create the tarball for download.
Thanks!
- Status changed from New to Feedback
- Target version set to 48
- % Done changed from 0 to 100
Implemented this and some other changes.
- Rewrites the command output so it is first written to files, then read through line-by-line to PHP. Should be much more efficient and consume less memory, making the previously "too large" commands viable.
- Increase verboseness of ifconfig output, add supported media
- Add "Listen Queues" output
- Wording fixes
- Script can now be run from the console to create and save an archive only:
php /usr/local/www/status.php
- New parameter:
archiveonly
When present, output is suppressed. Creates tgz which can be downloaded. (This is always the behavior when run at the console)
- New parameter:
nocleanup
When present, the individual status output .txt files are not removed from
/tmp/status_output/
before exiting.
Parameters can also be used from the console, for example: php /usr/local/www/status.php 'nocleanup=true'
On 2.4.5-DEVELOPMENT (arm)
built on Fri Jan 25 05:46:46 EST 2019 - SG3100
When I issue this command I get html code in std out and archive as output.
[2.4.5-DEVELOPMENT][root@pfSense.localdomain]/tmp: php /usr/local/www/status.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/vendor/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="/css/login.css?v=1538653674" type="text/css">
<title>Error</title>
That snapshot was before this commit. The newest snapshot should have it, if you update and try it again, it should work. It works for me here on this snapshot:
2.4.5-DEVELOPMENT (amd64)
built on Fri Jan 25 11:05:58 EST 2019
FreeBSD 11.2-RELEASE-p8
This all looks great. Tested everything I think. Works.
- Status changed from Feedback to Resolved
- Target version changed from 48 to 2.5.0
- Target version changed from 2.5.0 to 2.4.4-p3
- Status changed from Resolved to Feedback
2.4.4-p3:
Tested normal, archiveonly, nocleanup and from the shell. All looked good. Thank you so much for this.
- Status changed from Feedback to Resolved
Also available in: Atom
PDF