Project

General

Profile

Feature #9290

Need a way to suppress status output display in /status.php

Added by Chris Linstruth 25 days ago. Updated 21 days ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
Web Interface
Target version:
Start date:
01/23/2019
Due date:
% Done:

100%

Estimated time:

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!

Associated revisions

Revision 6c17da07 (diff)
Added by Jim Pingle 24 days ago

status.php optimizations. Implements #9290

  • 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
  • New parameter: nocleanup
    When present, the individual status output .txt files are not removed from
    /tmp/status_output/ before exiting.

Revision 140655f7 (diff)
Added by Jim Pingle 24 days ago

status.php optimizations. Implements #9290

  • 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
  • New parameter: nocleanup
    When present, the individual status output .txt files are not removed from
    /tmp/status_output/ before exiting.

(cherry picked from commit 6c17da07bf1ce9bfc304c97a5afe3e2e26221319)

History

#1 Updated by Jim Pingle 24 days ago

  • Status changed from New to Feedback
  • Target version set to 2.4.5
  • % 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'

#2 Updated by Vladimir Lind 23 days 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][]/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>

#3 Updated by Jim Pingle 23 days 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

#4 Updated by Chris Linstruth 21 days ago

This all looks great. Tested everything I think. Works.

#5 Updated by Jim Pingle 21 days ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF