LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices


Reply
  Search this Thread
Old 07-20-2004, 12:56 AM   #1
nraddy
LQ Newbie
 
Registered: Jul 2004
Location: Bangalore
Posts: 3

Rep: Reputation: 0
Question Diff. between f_bavail & f_bfree in statfs sys call???


Hi gurus,

I would like to the know the diff between the following two elements
of the statfs structure in AIX...

fsblkcnt_t f_bfree; /* free block in fs */
fsblkcnt_t f_bavail; /* free blocks avail to non-superuser*/

In AIX, both elements have the same value. But in other UNIX versions,
such as Linux, Solaris & HP_UX, they differ by a few megabytes. So that
difference amount gives me the filesystem sapce reserved for the
superuser.

Is there any reason for this behaviour in AIX?

I am in need of calculating the file system space reserved for
superuser in AIX. Is there any other method of getting it?

Any pointers on this topic would be helpful.

TIA!

Cheers
Raj.

PS: attaching statfs structure for a reference!

---------------------------

/*
* file system statistics
*/
struct statfs {
int f_version; /* version/type of statfs, 0 for now*/
int f_type; /* type of info, zero for now */
ulong_t f_bsize; /* optimal file system block size */
fsblkcnt_t f_blocks; /* total data blocks in file system */
fsblkcnt_t f_bfree; /* free block in fs */
fsblkcnt_t f_bavail; /* free blocks avail to non-superuser*/
fsfilcnt_t f_files; /* total file nodes in file system */
fsfilcnt_t f_ffree; /* free file nodes in fs */
#if !defined(_KERNEL) && defined(__64BIT__)
fsid64_t f_fsid; /* file system id */
#else
fsid_t f_fsid; /* file system id */
#endif
int f_vfstype; /* what type of vfs this is */
ulong_t f_fsize; /* fundamental file system block size*/
int f_vfsnumber; /* vfs indentifier number */
int f_vfsoff; /* reserved, for vfs specific data offset */
int f_vfslen; /* reserved, for len of vfs specific data */
int f_vfsvers; /* reserved, for vers of vfs specific data */
char f_fname[32]; /* file system name (usually mount pt.) */
char f_fpack[32]; /* file system pack name */
int f_name_max; /* maximum component name length for posix */
};
 
Old 07-20-2004, 01:51 PM   #2
zorba4
Member
 
Registered: Feb 2004
Location: Paris
Posts: 398

Rep: Reputation: 31
Why do you want some space to be reserved for superuser ? You meen if your standar users expend lack of space, root still has reserved space ? Why ?
 
Old 07-21-2004, 01:02 AM   #3
nraddy
LQ Newbie
 
Registered: Jul 2004
Location: Bangalore
Posts: 3

Original Poster
Rep: Reputation: 0
Exclamation

Some space must always be reserved for the filesystem in order to allocate inodes for the files that are created newly. And some disk space usually reserved by the super-user for administrative purposes.
 
Old 07-21-2004, 03:56 AM   #4
zorba4
Member
 
Registered: Feb 2004
Location: Paris
Posts: 398

Rep: Reputation: 31
I knew the need for space in order to add inodes. I still see no reason to reserve space for root for administrative purposes.
 
Old 07-21-2004, 06:17 AM   #5
nraddy
LQ Newbie
 
Registered: Jul 2004
Location: Bangalore
Posts: 3

Original Poster
Rep: Reputation: 0
Administrative purposes like, installing new tools/packages, etc... This is mostly useful in corporate environments where you will be doing a lot of system administrative changes. I don't have more infor on this. Please excuse me...

I am more interested in finding a way to get the reserved space rather than the discussion on the need for it....
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
question about select sys call xatzipol Programming 1 10-30-2005 09:22 AM
Write sys call failing ppy Programming 1 11-05-2004 08:57 AM
Any sys call to list all users ? dileepkk Linux - General 5 07-06-2004 06:04 PM
Kill sys call eshwar_ind Programming 4 05-07-2004 11:41 AM
any sys call to get ip address of NIC jmdey Linux - General 2 05-30-2002 03:09 PM

LinuxQuestions.org > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 10:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration