Project

General

Profile

Actions

Feature #9290

closed

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

Added by Chris Linstruth almost 6 years ago. Updated over 5 years ago.

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

100%

Estimated time:
Plus Target Version:
Release Notes:

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!

Actions #1

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'

Actions #2

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][]/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>

Actions #3

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

Actions #4

Updated by Chris Linstruth almost 6 years ago

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

Actions #5

Updated by Jim Pingle almost 6 years ago

  • Status changed from Feedback to Resolved
Actions #6

Updated by Jim Pingle over 5 years ago

  • Target version changed from 48 to 2.5.0
Actions #7

Updated by Jim Pingle over 5 years ago

  • Target version changed from 2.5.0 to 2.4.4-p3
Actions #8

Updated by Jim Pingle over 5 years ago

  • Status changed from Resolved to Feedback
Actions #9

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.

Actions #10

Updated by Jim Pingle over 5 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF