Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7735979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:38:10+00:00 2026-06-01T07:38:10+00:00

I’m creating an game server list, and I want to measure uptime for certain

  • 0

I’m creating an game server list, and I want to measure uptime for certain server (to be specific, uptime should be displayed in percents).

I have configured a cronjob for my script, which is checking every 5 minutes if server is up or down, so I can easly get the server status.

I need an idea on how can I measure each server uptime basing on the above data. I’d have to save down and up time for each server every one minute the script is executing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T07:38:12+00:00Added an answer on June 1, 2026 at 7:38 am

    If you don’t care about many details and you just want the up and down time. Then you could save 2 numbers in a file, one being the current percentage and the other being the current number of measures the script took.

    For example: ’96 800′.

    Then, whenever the script is executed, use this formula, assuming that the percentage (96) is X, the number of saves is Y (800) and the current measure is Z (0 or 1)

    X=X/100;
    X=(X*Y+Z)/(Y+1);  //You get the new value of the percentage, X. Be careful as they need to be long values.
    Y=Y+1;    //And the current number of interactions.
    X=X*100;
    

    That’s of course just pseudo code and won’t work straight away, it’s just to give you an idea of one way to do it. You must also include a way of reading a file and saving it wherever you want of your page that contains those 2 numbers.

    As Jamie stated, this is assuming that crontime is still working despite of the server is down.

    PS, you could also add a system from other server to check this server uptime, but it would need to be statistically calculated (and error tends to 0 when many other servers are added, but that’d be too difficult) as you’d need to take into account the other server’s uptime also…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to count how many characters a certain string has in PHP, but
I have a French site that I want to parse, but am running into
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have a small JavaScript validation script that validates inputs based on Regex. I
I have this code to decode numeric html entities to the UTF8 equivalent character.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.