Permalink
Browse files

Add report option to nems-support

  • Loading branch information...
NEMS Linux
NEMS Linux committed Jan 4, 2019
1 parent 662c36c commit 2fc65300829b71a5e58ae5ae7ab087a0b6f9b00a
Showing with 20 additions and 0 deletions.
  1. +20 −0 support-report.sh
@@ -0,0 +1,20 @@
#!/usr/bin/php
<?php
// Just a quick support report to help figure out issues
echo 'Creating support-report.txt...';
$report = date('r') . PHP_EOL;
$report .= PHP_EOL . 'Disk Free:' . PHP_EOL;
$report .= shell_exec('df -h') . PHP_EOL;
$report .= PHP_EOL . 'Large Files:' . PHP_EOL;
$report .= shell_exec('find / -type f -exec du -Sh {} + 2>&1 | sort -rh 2>&1 | head -n 30') . PHP_EOL;
# file_put_contents('/var/www/html/backup/snapshot/support-report.txt',gzcompress(json_encode($report)));
file_put_contents('/var/www/html/backup/snapshot/support-report.txt',(($report)));
echo ' Done.' . PHP_EOL . 'File created. File will self-destruct in 15 minutes.' . PHP_EOL . PHP_EOL;
echo 'Please find support-report.txt in your NEMS Migrator backup share' . PHP_EOL . 'ie. \\\\nems.local\\backup\\support-report.txt' . PHP_EOL . PHP_EOL . 'Email that file to: nems@category5.tv' . PHP_EOL . PHP_EOL;
?>

0 comments on commit 2fc6530

Please sign in to comment.