Sponsored Content
Top Forums Programming Huge difference between _POSIX_OPEN_MAX and sysconf(_SC_OPEN_MAX). Post 302400238 by gencon on Tuesday 2nd of March 2010 05:27:20 PM
Old 03-02-2010
Thanks Jim and nice hint to use getconf.

The first thing I tried was: getconf _POSIX_OPEN_MAX

and got: 65535

How come in C code when I print the value of _POSIX_OPEN_MAX I get 16 but from bash with getconf I get 65535?

Confused. Smilie
 

9 More Discussions You Might Find Interesting

1. Solaris

Huge PI in vmstat

This is something nowbody around me can explain: vmstat (-S 5) shows a huge number of PI but when I try to monitor it in parallel with iostat - there is no IO activity to be seen that would correspond to this. I have 16G RAM and 32G swap file. I'll really appreciate if somebody can explain it.... (9 Replies)
Discussion started by: dkvent
9 Replies

2. UNIX for Dummies Questions & Answers

Difference between two huge files

Hi, As per my requirement, I need to take difference between two big files(around 6.5 GB) and get the difference to a output file without any line numbers or '<' or '>' in front of each new line. As DIFF command wont work for big files, i tried to use BDIFF instead. I am getting incorrect... (13 Replies)
Discussion started by: pyaranoid
13 Replies

3. Ubuntu

kernel-huge

Hi All, I have a uname -a Linux caws101arop 2.6.9-67.0.20.ELsmp #1 SMP Wed Jun 18 12:35:02 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux And I'm having lots of problem especially when the web server got new two additional website. Before the memory was just 12G but we upgraded it to 65G. Do... (1 Reply)
Discussion started by: itik
1 Replies

4. AIX

Huge difference in reported Disk usage between ls,df and du

IBM RS6000 F50 AIX 4.3.2 i am having trouble in calculating the actual size of a set of directories and reconciling the results with the actual Hard Disk space used I have 33GB disk which is showing 7.8GB used, a byte count of the files in the directory/sub-dirs i`m interested in is 48GB,... (4 Replies)
Discussion started by: cooperuf
4 Replies

5. Shell Programming and Scripting

Three Difference File Huge Data Comparison Problem.

I got three different file: Part of File 1 ARTPHDFGAA . . Part of File 2 ARTGHHYESA . . Part of File 3 ARTPOLYWEA . . (4 Replies)
Discussion started by: patrick87
4 Replies

6. Programming

what is the main difference between difference between using nonatomic lseek and O_APPEND

I think both write at the end of the file ...... but is there a sharp difference between those 2 instruction ..... thank you this is my 3rd question today forgive me :D (1 Reply)
Discussion started by: fwrlfo
1 Replies

7. Shell Programming and Scripting

Difference between two huge .csv files

Hi all, I need help on getting difference between 2 .csv files. I have 2 large . csv files which has equal number of columns. I nned to compare them and get output in new file which will have difference olny. E.g. File1.csv Name, Date, age,number Sakshi, 16-12-2011, 22, 56 Akash,... (10 Replies)
Discussion started by: Dimple
10 Replies

8. UNIX for Dummies Questions & Answers

Shc script size limitation and "_SC_ARG_MAX (see sysconf(2))" parameter

I wish to change the parameter (which I do not understand exactly what it is and I wish to) and be able to use shc with very long bash scripts (2 Replies)
Discussion started by: frad
2 Replies

9. Shell Programming and Scripting

awk to calculate difference of split and sum the difference

In the awk I am trying to subtract the difference $3-$2 of each matching $4 before the first _ (underscore) and print that value in $13. I think the awk will do that, but added comments. What I am not sure off is how to add a line or lines that will add sum each matching $13 value and put it in... (2 Replies)
Discussion started by: cmccabe
2 Replies
GETCONF(1)						    BSD General Commands Manual 						GETCONF(1)

NAME
getconf -- retrieve standard configuration variables SYNOPSIS
getconf [-v environment] path_var file getconf [-v environment] system_var DESCRIPTION
The getconf utility prints the value of a POSIX or X/Open path or system configuration variable to the standard output. If the specified variable is undefined, the string ``undefined'' is output. The first form of the command, with two mandatory arguments, retrieves file- and file system-specific configuration variables using pathconf(2). The second form, with a single argument, retrieves system configuration variables using confstr(3) and sysconf(3), depending on the type of variable. As an extension, the second form can also be used to query static limits from <limits.h>. All sysconf(3) and pathconf(2) variables use the same name as the manifest constants defined in the relevant standard C-language bindings, including any leading underscore or prefix. That is to say, system_var might be ARG_MAX or _POSIX_VERSION, as opposed to the sysconf(3) names _SC_ARG_MAX or _SC_POSIX_VERSION. Variables retrieved from confstr(3) have the leading '_CS_' stripped off; thus, _CS_PATH is queried by a system_var of ``PATH''. Programming Environments The -v environment option specifies a IEEE Std 1003.1-2001 (``POSIX.1'') programming environment under which the values are to be queried. This option currently does nothing, but may in the future be used to select between 32-bit and 64-bit execution environments on platforms which support both. Specifying an environment which is not supported on the current execution platform gives undefined results. The standard programming environments are as follows: POSIX_V6_ILP32_OFF32 Exactly 32-bit integer, long, pointer, and file offset. Supported platforms: None. POSIX_V6_ILP32_OFFBIG Exactly 32-bit integer, long, and pointer; at least 64-bit file offset. Supported platforms: IA32, PowerPC. POSIX_V6_LP64_OFF64 Exactly 32-bit integer; exactly 64-bit long, pointer, and file offset. Supported platforms: Alpha, SPARC64. POSIX_V6_LPBIG_OFFBIG At least 32-bit integer; at least 64-bit long, pointer, and file offset. Supported platforms: None. The command: getconf POSIX_V6_WIDTH_RESTRICTED_ENVS returns a newline-separated list of environments in which the width of certain fundamental types is no greater than the width of the native C type long. At present, all programming environments supported by FreeBSD have this property. Several of the confstr(3) variables provide information on the necessary compiler and linker flags to use the standard programming environments described above. Many of these values are also available through the sysctl(8) mechanism. EXIT STATUS
The getconf utility exits 0 on success, and >0 if an error occurs. EXAMPLES
The command: getconf PATH will display the system default setting for the PATH environment variable. The command: getconf NAME_MAX /tmp will display the maximum length of a filename in the /tmp directory. The command: getconf -v POSIX_V6_LPBIG_OFFBIG LONG_MAX will display the maximum value of the C type long in the POSIX_V6_LPBIG_OFFBIG programming environment, if the system supports that environ- ment. DIAGNOSTICS
Use of a system_var or path_var which is completely unrecognized is considered an error, causing a diagnostic message to be written to stan- dard error. One which is known but merely undefined does not result in an error indication. The getconf utility recognizes all of the vari- ables defined for IEEE Std 1003.1-2001 (``POSIX.1''), including those which are not currently implemented. SEE ALSO
pathconf(2), confstr(3), sysconf(3), sysctl(8) STANDARDS
The getconf utility is expected to be compliant with IEEE Std 1003.1-2001 (``POSIX.1''). HISTORY
The getconf utility first appeared in FreeBSD 5.0. AUTHORS
Garrett A. Wollman <wollman@lcs.mit.edu> BSD
September 18, 2002 BSD
All times are GMT -4. The time now is 02:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy