Unix Technical Forum

Function to get system information

This is a discussion on Function to get system information within the AIX Operating System forums, part of the Unix Operating Systems category; --> Hello All, I'm trying to find in AIX documentation an analog of Linux or Solaris function long sysinfo(int command, ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 09:50 AM
Olexandr Siroklyn
 
Posts: n/a
Default Function to get system information

Hello All,
I'm trying to find in AIX documentation an analog of Linux or Solaris
function
long sysinfo(int command, char *buf, long count). Without success.
Can someone help me?
Thanks.

P.S.

$ man sysinfo
Reformatting page. Please Wait... done

System Calls sysinfo(2)

NAME
sysinfo - get and set system information strings

SYNOPSIS
#include <sys/systeminfo.h>

long sysinfo(int command, char *buf, long count);

DESCRIPTION
The sysinfo() function copies information relating to the
operating system on which the process is executing into the
buffer pointed to by buf. It can also set certain informa-
tion where appropriate commands are available. The count
parameter indicates the size of the buffer.

The POSIX P1003.1 interface (see standards(5)) sysconf(3C)
provides a similar class of configuration information, but
returns an integer rather than a string.
....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 09:50 AM
Paul Landay
 
Posts: n/a
Default Re: Function to get system information

Olexandr Siroklyn wrote:
> Hello All,
> I'm trying to find in AIX documentation an analog of Linux or Solaris
> function long sysinfo(int command, char *buf, long count).



I don't know what sysinfo provides, but maybe this
aix fragment/example will help:

#include <sys/systemcfg.h>
#include <sys/utsname.h>
#include <sys/id.h>
struct utsname myuname;
uname (&myuname);
printf ("aix version = %s\n", myuname.version);
printf ("__cpu64() = %i\n", __cpu64());
printf ("KERNEL_32 = %i\n", __KERNEL_32());
printf ("KERNEL_64 = %i\n", __KERNEL_64());
printf ("num cpus = %i\n", _system_configuration.ncpus);

Paul Landay
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:15 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com