Feature #9290
closedNeed a way to suppress status output display in /status.php
100%
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!
Updated by Jim Pingle almost 6 years ago
- 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'
Updated by Vladimir Lind almost 6 years ago
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>
Updated by Jim Pingle almost 6 years ago
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
Updated by Chris Linstruth almost 6 years ago
This all looks great. Tested everything I think. Works.
Updated by Jim Pingle almost 6 years ago
- Status changed from Feedback to Resolved
Updated by Jim Pingle over 5 years ago
- Target version changed from 2.5.0 to 2.4.4-p3
Updated by Chris Linstruth over 5 years ago
2.4.4-p3:
Tested normal, archiveonly, nocleanup and from the shell. All looked good. Thank you so much for this.
Updated by Jim Pingle over 5 years ago
- Status changed from Feedback to Resolved