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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:51:34+00:00 2026-05-26T09:51:34+00:00

I have a question relates to PHP and Java programming. I am going to

  • 0

I have a question relates to PHP and Java programming.
I am going to develop a web application to do a unit testing.
PHP is the language that I’ll use for the web and will executes the exec() function.
as I read, the function returns the output of execution, ok I do need it.
but it’s not enough, I also think if I can get how much memory are used during the execution.
the web will run in an Apache web server in a Linux native operating system (orefered in Ubuntu).

This is the second case:
if there is a Java source which contains a program in which requires the user input during the execution, how can I execute it via a web server with also pass all the lines which may act as the user input?

the next problem is, the exec() function only accepts parameters in line.
How if I want

so, if there is any idea how to do that things?

  • 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-05-26T09:51:35+00:00Added an answer on May 26, 2026 at 9:51 am

    The /usr/bin/time program (documented in time(1)) can return the amount of memory used during execution:

    $ /usr/bin/time echo hello
    hello
    0.00user 0.00system 0:00.00elapsed ?%CPU (0avgtext+0avgdata 2512maxresident)k
    0inputs+0outputs (0major+205minor)pagefaults 0swaps
    

    You can see that the echo(1) program required 2.5 megabytes of memory and ran very quickly. Larger programs will be more impressive:

    $ /usr/bin/time jacksum --help
    Unknown argument. Use -h for help. Exit.
    Command exited with non-zero status 2
    0.08user 0.03system 0:00.87elapsed 12%CPU (0avgtext+0avgdata 57456maxresident)k
    25608inputs+64outputs (92major+4072minor)pagefaults 0swaps
    

    jacksum is a Java-based program, so it took 57 megabytes to tell me I screwed up the command line arguments. That’s more like it.

    You might also find the BSD process account system worthwhile. See lastcomm(1), sa(8), and dump-acct(8) for more information.

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

Sidebar

Related Questions

A quick question about best practice with PHP classes. I have seen people use
I have a time related php question! I have html input boxes that asks
I have question related to what is done in SMS application is if i'm
I have a simple question related to one-line programming. First an example: function test(a)
Another question related to this one . I have a List<SortableObjects> that is the
I have a question regarding php and opening files PHP has more than one
question relates to PHP and Javascript for now every table has a form with
I have two tables that are related, which, for the purpose of this question,
I have a PHP script vieworder.php that includes other scripts at the top. <?php
I have a question regarding the proper workflow of git in a PHP/MySQL workflow.

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.