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 8245403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:10:02+00:00 2026-06-07T22:10:02+00:00

Total accesses: 296282 – Total Traffic: 1.2 GB CPU Usage: u757.94 s165.33 cu0 cs0

  • 0
Total accesses: 296282 - Total Traffic: 1.2 GB
CPU Usage: u757.94 s165.33 cu0 cs0 - 2.56% CPU load
8.22 requests/sec - 33.5 kB/second - 4175 B/request
22 requests currently being processed, 26 idle workers

Let say we have the above as string and we store that string in a variable.
Problem: I want to get the VALUE of the following:

  1. requests/sec – CURRENT VALUE IS 8.22
  2. requests currently being processed – CURRENT VALUE IS 22
  3. idle workers – CURRENT VALUE IS 26

Done some solution using strpos and substr but i dont think its a good solution at all because those values above are dynamic it could be 2 digits or 4 digits or longer.

sample code:

$rps = substr($data,strpos($data,"requests/sec")-5,4);
echo $rps; //displays 8.22

Is there another way to do this? I will appreciate any response 🙂

  • 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-07T22:10:04+00:00Added an answer on June 7, 2026 at 10:10 pm

    Regular expressions.

    $values = array();
    preg_match("/(?P<rps>[\d.]+) requests\/sec(.*)(?P<requests>[\d]+) requests (.*)(?P<workers>[\d]+) idle workers/", $your_text, $values);
    
    print 
    "requests/sec - CURRENT VALUE IS {$values['rps']}
     requests currently being processed - CURRENT VALUE IS {$values['requests']}
     idle workers - CURRENT VALUE IS {$values['workers']}";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Total noob here with javascript. I'm trying to alter a function. This is the
Total noob here. This is my first c# attempt, its a console application that
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload
Total noobie question here. I'm just learning Java, and studying passing arguments to functions.
Total noob to anything lower-level than Java, diving into iPhone audio, and realing from
Total noob question, but here. CSS .product__specfield_8_arrow { /*background-image:url(../../upload/orng_bg_arrow.png); background-repeat:no-repeat;*/ background-color:#fc0; width:50px !important; height:33px
Total n00b to C# and events although I have been programming for a while.
total nubi here and i'm trying to writ an application that trackes how far
Total newbie question, but I cant figure out what im doing wrong. I want
When total size of the commit log directory exceedes above the 680 Mb it

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.