Access server stats outside of CPanel

closet geek

Well-Known Member
Mar 19, 2004
46
0
156
hi!

I'd love to be able to have the full server status report (with the green - I hope ;) - lights) saying which services are running & CPU load on a page on my site, is there anyway I can do this? :)

cg
 

elleryjh

Well-Known Member
Apr 12, 2003
479
0
166
I don't think there's any easy way. I'll do it for you for a couple bucks, but here's how I would do it:

Make a new account. Don't give it much space, make it a demo account.

Add a new file to the theme:

/usr/local/cpanel/base/frontend/xxxxxxxx/status.html

where xxxxxxxxx is your theme.

The file contains 1 line:
<cpanel Serverinfo="servicestatus()">

Then.... on your site, where you want the status table (must be a php file)

PHP:
<?php include("http://user:[email protected]:2082/frontend/xxxxxxxxxx/status.html"); ?>
fopen wrappers must be turned on, and if you're using phpsuexec, make sure the php file is not world readable.