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.
Regards,
arumon :-)
Last edited by pludi; 12-30-2009 at 08:41 AM..
Reason: added code tags
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)
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT CENTOS
_syscall
_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)