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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:22:40+00:00 2026-05-16T18:22:40+00:00

I am trying to display currently running process in Ubuntu. Right now I am

  • 0

I am trying to display currently running process in Ubuntu.

Right now I am using system() function to print running process in the terminal. Code:

system("ps -A");

This function displays all running process in the terminal.

But I want to this functionality using a POSIX function. I am not looking for a ready made code.

Can some one point me to the function name or any manual ?

  • 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-16T18:22:40+00:00Added an answer on May 16, 2026 at 6:22 pm

    But I want to this functionality using a POSIX function. I am not looking for a ready made code.

    No POSIX function exists to list running processes. That is OS specific, not portable, rarely needed by applications and thus not part of POSIX.

    But since you need this on Linux, the most POSIXy solution would be to use functions opendir()/readdir()/closedir() to iterate over the content of /proc special file system.

    All numeric entries in the directory are PIDs of running processes. Check the content the man 5 proc for details what information about the running processes can be obtained from there. Then you can use the open()/read()/close() or readlink() calls to retrieve the information about a particular process from the /proc/NNN/* files.

    On Linux, the standard tools like ps and top use the /proc to gather the information about processes. It is official Linux’ interface to the information about running processes.

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

Sidebar

Related Questions

Trying to display current time with PHP (using this ): $date = date('m/d/Y h:i:s
I am trying to fetch and display contents from table.Currently i am running a
trying to display data only after variables have been set. $(document).ready(function () { function
I am currently using wx.CustomTree, to use to display a series of configuration settings.
Currently I'm getting data in jsp using scriptlet but now want to use JSTL
I'm currently using a long running service as a timer that can last up
I am currently trying to generate a heatmap overlay to Google Maps by using
'lo, I am currently trying to code a simple routine for an experiment we
For debug purposes, I'm trying to display the current content inside a foreach loop
I'm trying to display a spanish price. Spanish prices have the currency symbol AFTER

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.