Skip to content

Instantly share code, notes, and snippets.

@fliphess
Last active February 1, 2016 12:16
Show Gist options
  • Save fliphess/57a8aabea2c984549649 to your computer and use it in GitHub Desktop.
Save fliphess/57a8aabea2c984549649 to your computer and use it in GitHub Desktop.
Get varnishtop output on byte dedicated servers
<?php
header('Pragma: no-cache');
header('Cache-Control: private, no-cache, no-store, max-age=0, must-revalidate, proxy-revalidate');
$a = shell_exec('varnishstat -1');
echo "<pre>$a</pre>";
?>
<?php
header('Pragma: no-cache');
header('Cache-Control: private, no-cache, no-store, max-age=0, must-revalidate, proxy-revalidate');
$a = shell_exec('varnishtop -b -i TxURL -1');
echo "<pre>$a</pre>";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment