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

  • Home
  • SEARCH
  • 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 8581871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:09:20+00:00 2026-06-11T21:09:20+00:00

Is there any Mac OS X equivalent header file for sysinfo.h in Linux. I

  • 0

Is there any Mac OS X equivalent header file for sysinfo.h in Linux. I am porting code from Linux to Mac but the structure struct sysinfo is not found.

Edit: ==More info==
In Linux platform I use a Header file <sys/sysinfo.h> which is not found in Mac.
By including the header in Linux I perform following operation:
struct sysinfo s;
sysinfo(&s);

Which in result give me some system related info.
Now as I porting my project from Linux to Mac I want to know is there any similar functionality serve by Mac.

Please help.

Thanks in advance.

  • 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-11T21:09:21+00:00Added an answer on June 11, 2026 at 9:09 pm

    The closest equivalent to sysinfo in Mac OS X is sysctl / MIB. It doesn’t return a sysinfo struct directly, but most of the values in that structure are available as sysctl keys. For instance:

    • uptime is approximated by kern.boottime (although that reflects the actual boot time, not the running time)
    • loads is available as vm.loadavg
    • totalram = hw.memsize (in bytes)
    • freeram, sharedram, and bufferram are complicated, as the XNU memory manager works differently from Linux’s. I’m not sure if the closest equivalent values (“active” and “inactive” memory) are exposed.
    • totalswap and freeswap are reflected in vm.swapusage. (But note that OS X allocates swap space dynamically.)
    • procs doesn’t appear to have any equivalent.
    • totalhigh and freehigh are specific to i386 Linux.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

is there any good equivalent debugger for Mac OS X? Something that allows patching
Is there any equivalent of IO COmpletion ports on Mac OS X for implementing
Is there any code folding support for C++ under Monodevelop (in Mac OS X)?
Is it there any graphical debugger for bash on mac os x or linux?
Is there any API available in Cocoa(not COCOA-Touch) for a MAC OS based app
Are there any free Mac OSX IDEs for SQLite that you would recommend? I've
Are there any tutorials or examples on how to play WAV files on Mac
I want to run Mac OS in my Windows operative system, is there any
Is there any application for UI sketching on Mac OS X? Something like SketchFlow
Is there any way to get the coordinates of the mouse in Mac OS

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.