Sponsored Content
Operating Systems Linux SuSE Difference in file size between "ls -l" and "du -a" Post 302650775 by ygemici on Monday 4th of June 2012 08:27:48 AM
Old 06-04-2012
kcore (kernel core) is a virtual file (on vfs) and is like the mirror of the memory space that kernel can allocate the amount of this memory size (think kernel memory) and it doesnt use the physical disk space and memory.shortly it equals to RAM size.We can may understand from that the kernel read/write and the other mem operations to use the kdebug utilites
Code:
# ls -ltr /proc/kcore|awk '{print $5/1024/1024/1024"GB"}'

and this must give about same values..
Code:
# awk '/MemTotal/{print $2/1024/1024"GB"}' /proc/meminfo

shortly it equals to RAM size,additional some platforms also it corresponds to virtual memory space for kernel..
then could be try (ia64 , im not sure,)
Code:
# awk '/VmallocTotal/{print $2/1024/1024"GB"}' /proc/meminfo

in this kcore representation total allocated virtual address space

for exa (dont try production machine or any !!)
i test it VM machine
its a little dump
Code:
# sed -n 'p' /proc/kcore|strings
CORE
CORE
vmlinux
ro root=/dev/VolGroup01/LogVol00 rhgb quiet ramdisk_size=11000000
CORE

regards
ygemici
This User Gave Thanks to ygemici For This Post:
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

2. Shell Programming and Scripting

"sed" to check file size & echo " " to destination file

Hi, I've modified the syslogd source to include a thread that will keep track of a timer(or a timer thread). My intention is to check the file size of /var/log/messages in every one minute & if the size is more than 128KB, do a echo " " > /var/log/messages, so that the file size will be set... (7 Replies)
Discussion started by: jockey007
7 Replies

3. UNIX for Dummies Questions & Answers

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

4. UNIX for Advanced & Expert Users

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

5. Shell Programming and Scripting

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

6. 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

7. 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

8. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

9. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies
CONTIGMALLOC(9) 					   BSD Kernel Developer's Manual					   CONTIGMALLOC(9)

NAME
contigmalloc, contigfree -- manage contiguous kernel physical memory SYNOPSIS
#include <sys/types.h> #include <sys/malloc.h> void * contigmalloc(unsigned long size, struct malloc_type *type, int flags, vm_paddr_t low, vm_paddr_t high, unsigned long alignment, unsigned long boundary); void contigfree(void *addr, unsigned long size, struct malloc_type *type); DESCRIPTION
The contigmalloc() function allocates size bytes of contiguous physical memory that is aligned to alignment bytes, and which does not cross a boundary of boundary bytes. If successful, the allocation will reside between physical addresses low and high. The returned pointer points to a wired kernel virtual address range of size bytes allocated from the kernel virtual address (KVA) map. The flags parameter modifies contigmalloc()'s behaviour as follows: M_ZERO Causes the allocated physical memory to be zero filled. M_NOWAIT Causes contigmalloc() to return NULL if the request cannot be immediately fulfilled due to resource shortage. Other flags (if present) are ignored. The contigfree() function deallocates memory allocated by a previous call to contigmalloc(). IMPLEMENTATION NOTES
The contigmalloc() function does not sleep waiting for memory resources to be freed up, but instead actively reclaims pages before giving up. However, unless M_NOWAIT is specified, it may select a page for reclamation that must first be written to backing storage, causing it to sleep. RETURN VALUES
The contigmalloc() function returns a kernel virtual address if allocation succeeds, or NULL otherwise. EXAMPLES
void *p; p = contigmalloc(8192, M_DEVBUF, M_ZERO, 0, (1L << 22), 32 * 1024, 1024 * 1024); Ask for 8192 bytes of zero-filled memory residing between physical address 0 and 4194303 inclusive, aligned to a 32K boundary and not cross- ing a 1M address boundary. DIAGNOSTICS
The contigmalloc() function will panic if size is zero, or if alignment or boundary is not a power of two. SEE ALSO
malloc(9), memguard(9) BSD
July 19, 2007 BSD
All times are GMT -4. The time now is 06:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy