rlerdorf / opcache-status Goto Github PK
View Code? Open in Web Editor NEWA one-page opcache status page
A one-page opcache status page
Today I found out about what opcache.interned_strings_buffer
does. Seems there isn't much documentation about this.
It would be great if the status page is able to give the user some warnings about poor/non-optimal configuration parameters. Examples of these warnings could be:
opcache.memory_consumption
is almost out of memory, we suggest to raise it.opcache.interned_strings_buffer
is almost out of memory, we suggest to raise it.opcache.max_accelerated_files
.Maybe this isn't something the status page should do, but would be great if so.
Setting opcache.max_wasted_percentage
to 5 seems to display 0.05
in the script, presumably because that's how PHP stores the value. I think multiplying it by 100 to restore the original meaning would be a good idea.
Warning: asort() expects parameter 1 to be array, null given in /srv/opcache.php on line 109
Warning: Invalid argument supplied for foreach() in /srv/opcache.php on line 122
Could you please submit this package to Packagist? (https://packagist.org/)
Then we would not have to specify a "repositories" entry in our "composer.json".
Please add some notes in the single php file:
/**
* opcache-status
* 1.0
* A one-page opcache status page for the PHP 5.5 opcode cache.
* https://github.com/rlerdorf/opcache-status
*/
Or you can go php-doc.
Currently I use the windows 10 x64 OpenServer and I have a problem with slashes in JSON.parse()
.
VM444:1 Uncaught SyntaxError: Unexpected token D in JSON at position 10
at JSON.parse (<anonymous>)
at (index):477
Page source:
root = JSON.parse('{"name":"\\D:\\OpenServer\\domains\\opcache-status","children":[{"name":"vendor","children":[{"name":"rlerdorf","children":[{"name":"opcache-status","children":[{"name":"opcache.php","size":54152}]}]}]},{"name":"index.php","size":712}]}');
My solution:
root = JSON.parse('<?php echo json_encode(str_replace('\\', '/', $dataModel->getD3Scripts())); ?>');
Result:
root = JSON.parse('{"name":"\/D:\/OpenServer\/domains\/opcache-status","children":[{"name":"vendor","children":[{"name":"rlerdorf","children":[{"name":"opcache-status","children":[{"name":"opcache.php","size":54464}]}]}]},{"name":"index.php","size":712}]}');
Would be great if the scripts tab allowed you to order it by memory or hits.
I have an error with a filter function.
Uncaught TypeError: Cannot read property 'filter' of undefined
at HTMLInputElement.change ((index):412)
at HTMLInputElement.u [as __onchange] (d3.v3.min.js:1)
function change() {
// Filter out any zero values to see if there is anything left
var remove_zero_values = dataset[this.value].filter(function(value) {
return value > 0;
});
...
My solution:
if (dataset[this.value] !== undefined) {
var remove_zero_values = dataset[this.value].filter(function(value) {
return value > 0;
});
} else {
var remove_zero_values = [];
}
Firefox console displays warning:
mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create
...{Yi=r}var Ii=[].proto?function(t,n){t.proto=n}:function(t,n){for(var e i...
in file d3.v3.min.js.
and indead when you click on a tab cpu spikes to 10-16%, just to switch a tab. on a Quad core i7 CPU.
I don't think that much cpu is needed just to hide and show a div, it should be snappy and fast.
Most files on our site are named as .html files but are actually PHP code and parsed as such. The web server is correctly running them through PHP, however, the OpCache status page lists only .php files on its Scripts tab. Is OpCache only listing .php files? Or are .html files not being cached, and if so why not if they are being run through PHP? It's been a long time since I looked but I don't recall APC excluding those on our old server...
simple button what would call opcache_reset()
Can I humbly suggest something like the MIT or BSD license.
Great project!
The following function in the opcache.php
script generates a PHP notice during an OpCache restart:
public function getScriptStatusCount() {
return count($this->_status["scripts"]);
}
The 'scripts' key is not set when an opcache restart is pending after calling opcache_reset().
I copied the file on the root of my magento site, but all i see
Scripts (1)
/home/mystore/public_html/opcache.php
Does it mean opcache is not working? i checked the phpinfo and it shows it's up & running!
php --syntax-check /opcache/data-sample.php
PHP Fatal error: Cannot redeclare opcache_get_status() in /opcache/data-sample.php on line 446
PHP 5.5.22 (cli) (built: Mar 5 2015 23:04:39)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies
Change
src="//cdnjs.cloudflare.com/ajax/libs/d3/3.0.1/d3.v3.min.js"
src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"
for
src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.0.1/d3.v3.min.js"
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"
If all values (Memory, Manual, and Keys on Restarts) are zero, the graph disappears and never comes back even when looking at other values that are non-zero.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.