Advertisement
jay1110

cpumonitor

Nov 12th, 2017
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.63 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title><?php echo $SERVER_NAME; ?>-HW Monitor-</title>
  4. <STYLE type=text/css>
  5. BODY { FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: Verdana,arial, helvetica, serif; : 0 0 0 0;}
  6. .style1 {
  7.     color: #999999;
  8.     font-weight: bold;
  9. }
  10. </STYLE>
  11. </head>
  12. <body>
  13.  
  14. <blockquote>
  15. <pre>
  16. <span class="style1">Uptime:</span>
  17. <?php system("uptime"); ?>
  18.  
  19. <span class="style1">Servers CPU and RAM usage:</span>
  20. <?php
  21. `screen  -d -m -S htop_session htop`;
  22. sleep(1);
  23. `screen -p 0 -S htop_session -X hardcopy`;
  24. `screen -p 0 -S htop_session -X quit`;
  25. ?>
  26. <?php print file_get_contents('hardcopy.0'); ?>
  27. </pre>
  28.     </blockquote>
  29.  
  30. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement