Sponsored Content
Operating Systems Linux Red Hat Understand output of "free" command Post 302383527 by arumon on Wednesday 30th of December 2009 05:25:51 AM
Old 12-30-2009
Understand output of "free" command

Hi Friends,

I am really confused with the output of "free" command on redhat linux.
I can see caching and buffer output on two different areas on the output.
Please let me know whats the difference of these two different outputs.
Here I am pasting the command output of my server.

Code:
[root@ww-vl-ora06 ~]# free -m
                total       used       free     shared    buffers     cached
Mem:         12011       9825       2186          0        243       5829
-/+ buffers/cache:       3752       8259
Swap:        16378        313      16065

Regards,
arumon :-)

Last edited by pludi; 12-30-2009 at 08:41 AM.. Reason: added code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

i don't understand the "sort" command

i have been trying to understand this chapter titled "Searching for Files and Text" for a few weeks now. unfortunately, this chapter is one of those things, that no matter how hard you try and how long you try for, you are incapable of understanding (at least in my case) this entire chapter,... (2 Replies)
Discussion started by: xyyz
2 Replies

2. Debian

Debian: doubt in "top" %CPU and "sar" output

Hi All, I am running my application on a dual cpu debian linux 3.0 (2.4.19 kernel). For my application: <sar -U ALL> CPU %user %nice %system %idle ... 10:58:04 0 153.10 0.00 38.76 0.00 10:58:04 1 3.88 0.00 4.26 ... (0 Replies)
Discussion started by: jaduks
0 Replies

3. Shell Programming and Scripting

To record screen output using "script" command

I am trying to capture the session of a particular user id, by using the "script" command, by adding the "script" command to the .profile of that user id. Now, when I have to exit the session, I am having to give 2 exits - one for the script command, and the other to log out of the session. Is... (2 Replies)
Discussion started by: ggayathri
2 Replies

4. Shell Programming and Scripting

don't understand a command "."

Hi all, I have a script with those two lines : test -f $PWD/mysetup.txt . $PWD/mysetup.txt I understand the first one, but could anyone explain me the role of the second one? All the thing I find is the usage : Thx in advance (3 Replies)
Discussion started by: Moumou
3 Replies

5. UNIX for Dummies Questions & Answers

Explanation of "total" field in "ls -l" command output

When I do a listing in one particular directory (ls -al) I get: total 43456 drwxrwxrwx 2 root root 4096 drwxrwxrwx 3 root root 4096 -rwxrwxr-x 1 nobody nobody 3701594 -rwxrwxr-x 1 nobody nobody 3108510 -rwxrwxr-x 1 nobody nobody 3070580 -rwxrwxr-x 1 nobody nobody 3099733 -rwxrwxr-x 1... (1 Reply)
Discussion started by: proactiveaditya
1 Replies

6. Shell Programming and Scripting

"Join" or "Merge" more than 2 files into single output based on common key (column)

Hi All, I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations: 1. I am restrained to 2 input files only. 2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Discussion started by: Katabatic
1 Replies

7. Shell Programming and Scripting

Retrieve RAM memory size from "top" command output

Hi, I am trying to get the system RAM size from "top" command's output by the following but it is not working. top | sed "s/^Mem.**\(*\), *//" (10 Replies)
Discussion started by: royalibrahim
10 Replies

8. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

9. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

10. Programming

Redirecting output to new file for command "perldoc perllocal"

Hi, I have to redirect output of the command "perldoc perllocal" to new file which contains all the perl module installed. Currently using perldoc perllocal >> mod_data This does not contain all perl modules installed locally on machine, and each character is doubled. Please... (3 Replies)
Discussion started by: asak
3 Replies
_SYSCALL(2)						     Linux Programmer's Manual						       _SYSCALL(2)

NAME
_syscall - invoking a system call without library support (OBSOLETE) SYNOPSIS
#include <linux/unistd.h> A _syscall macro desired system call DESCRIPTION
The important thing to know about a system call is its prototype. You need to know how many arguments, their types, and the function return type. There are seven macros that make the actual call into the system easier. They have the form: _syscallX(type,name,type1,arg1,type2,arg2,...) where X is 0-6, which are the number of arguments taken by the system call type is the return type of the system call name is the name of the system call typeN is the Nth argument's type argN is the name of the Nth argument These macros create a function called name with the arguments you specify. Once you include the _syscall() in your source file, you call the system call by name. FILES
/usr/include/linux/unistd.h CONFORMING TO
The use of these macros is Linux-specific, and deprecated. NOTES
Starting around kernel 2.6.18, the _syscall macros were removed from header files supplied to user space. Use syscall(2) instead. (Some architectures, notably ia64, never provided the _syscall macros; on those architectures, syscall(2) was always required.) The _syscall() macros do not produce a prototype. You may have to create one, especially for C++ users. System calls are not required to return only positive or negative error codes. You need to read the source to be sure how it will return errors. Usually, it is the negative of a standard error code, for example, -EPERM. The _syscall() macros will return the result r of the system call when r is nonnegative, but will return -1 and set the variable errno to -r when r is negative. For the error codes, see errno(3). When defining a system call, the argument types must be passed by-value or by-pointer (for aggregates like structs). EXAMPLE
#include <stdio.h> #include <stdlib.h> #include <errno.h> #include <linux/unistd.h> /* for _syscallX macros/related stuff */ #include <linux/kernel.h> /* for struct sysinfo */ _syscall1(int, sysinfo, struct sysinfo *, info); /* Note: if you copy directly from the nroff source, remember to REMOVE the extra backslashes in the printf statement. */ int main(void) { struct sysinfo s_info; int error; error = sysinfo(&s_info); printf("code error = %d ", error); printf("Uptime = %lds Load: 1 min %lu / 5 min %lu / 15 min %lu " "RAM: total %lu / free %lu / shared %lu " "Memory in buffers = %lu Swap: total %lu / free %lu " "Number of processes = %d ", s_info.uptime, s_info.loads[0], s_info.loads[1], s_info.loads[2], s_info.totalram, s_info.freeram, s_info.sharedram, s_info.bufferram, s_info.totalswap, s_info.freeswap, s_info.procs); exit(EXIT_SUCCESS); } Sample output code error = 0 uptime = 502034s Load: 1 min 13376 / 5 min 5504 / 15 min 1152 RAM: total 15343616 / free 827392 / shared 8237056 Memory in buffers = 5066752 Swap: total 27881472 / free 24698880 Number of processes = 40 SEE ALSO
intro(2), syscall(2), errno(3) COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2007-12-19 _SYSCALL(2)
All times are GMT -4. The time now is 01:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy