Jump to content

Network Status


epalon

Recommended Posts

Hi,

 

In WHMCS on the home page theres a network status area, when i click on "Check Network Status" it doesn't display the Uptime or Server load it just shows "-" in both. So do i need to put any files in a location that i haven't yet?

 

Thanks,

 

Andy Amacher

Link to comment
Share on other sites

  • 2 months later...

the server status link works but the phpinfo link on the server status page creates a 404 error. Do I need to have a php info file there already for this to work? Also, server uptime and server load say none available. Is is supposed to show that?

 

You can see what I see here:

 

kship.com/sys/serverstatus.php

 

Thanks,

Ken

Link to comment
Share on other sites

the server status link works but the phpinfo link on the server status page creates a 404 error. Do I need to have a php info file there already for this to work? Also, server uptime and server load say none available. Is is supposed to show that?

 

You can see what I see here:

 

kship.com/sys/serverstatus.php

 

Thanks,

Ken

 

 

Hey,

 

I get a 404 error, please check the correct URL of the status folder.

 

 

adam@localhost ~]$ wget -S --spider http://www.kship.com/sys/status/index.php?action=phpinfo

--17:23:26-- http://www.kship.com/sys/status/index.php?action=phpinfo

=> `index.php@action=phpinfo'

Resolving http://www.kship.com... 74.53.73.27

Connecting to www.kship.com|74.53.73.27|:80... connected.

HTTP request sent, awaiting response...

HTTP/1.1 404 Not Found

Date: Thu, 31 May 2007 00:21:11 GMT

Server: Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPag

e/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b

Keep-Alive: timeout=15, max=99

Connection: Keep-Alive

Content-Type: text/html

17:23:27 ERROR 404: Not Found.

 

 

adam@localhost ~]$

 

From,

Adam

Link to comment
Share on other sites

  • WHMCS CEO
Hi,

I solved this problem by uploading the status folder to http://www.yourdomain.com/status/ instead of http://www.yourdomain.com/whmcs/status/

 

Seems like it must be in the public_html folder...

No, there's no requirement for that.

Link to comment
Share on other sites

of course it has to be in a public folder (public_html on cpanel servers) or else whmcs wouldnt be able to access it on other servers. It doesnt have to be in any particular folder though and you definitely have to make sure you have the correct path listed to it.

Link to comment
Share on other sites

  • 1 month later...

Hi

 

I am having the same problems my WHM is installed in a folder called support

and the server stats files in is /support/serverstatus.php

 

HTTP FTP POP3 works ok

 

click PHP Info, shows this error /support/serverstatus.phpindex.php?action=phpinfo

Server Load & Uptime are blank how do i fix this?

Link to comment
Share on other sites

  • WHMCS CEO

Hi Kevin,

 

You are confused, so let me explain. The URL you enter, you never see. It's purely used for data collection. The server status link in the client area should and will always go to the serverstatus.php file that is part of WHMCS. Once the url to the status folder is correct, the server load and uptime will show for your server. That's the only difference.

 

Matt

Link to comment
Share on other sites

  • 2 weeks later...

Here is a quick howto for freebsd users, there is probably an easier way but who cares...

 

Create a file called uptime.c

#include <stdio.h>
#include <time.h>
#include <sys/param.h>
#include <sys/sysctl.h>


int
main()
{
       time_t uptime;
       time_t now;
       size_t size;
       int mib[2];

       struct timeval boottime;

       time(&now);
       size = sizeof(boottime);

       mib[0] = CTL_KERN;
       mib[1] = KERN_BOOTTIME;

       if (sysctl(mib, 2, &boottime, &size, NULL, 0) != -1) {
               uptime = now - boottime.tv_sec;
               printf("%d\n", uptime);
       }

       return 0;
}

 

Next compile the file.

gcc -o uptime uptime.c

 

Next edit the /status/index.php file and replace:

$uptime = shell_exec("cut -d. -f1 /proc/uptime");

with:

$uptime = shell_exec("/home/path/public_html/billing/status/uptime");

 

The above assumes you've put the 'uptime' file you compiled into /home/path/public_html/billing/status/uptime

 

Fixed, I now have monitoring for freebsd servers :)[/code]

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 years later...

I was totally stumped on why my uptime said Not Available... if I went straight to the directory URL, it would display the uptime, so I knew the script was working.

 

Turned out, I'm dumb. I didn't have a trailing / at the end of the URL in WHMCS Server config page... Trailing / fixed it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated