Tag Info

Hot answers tagged

4

cat doesn't use any significant CPU time (unless maybe on-disk decryption or decompression is involved and accounted to the cat process which is the one reading from disk) or memory. It just reads the content of the files and writes it to the pipe in small chunks in a loop. However, here, you don't need it. You can just do: gzip -c file1 file2 file3 file4 ...


4

I don't know of any place where the kernel exposes the filenames associated with the blocks that it has cached. According to this answer http://stackoverflow.com/a/4941371 The best you could probably do even with a custom kernel module would be to get a list of inodes and devices. From there you would still likely need to walk the filesystem looking for ...


2

I'll cite something I wrote in the man page for an application that does analysis similar to top and drawing information from the same sources as pmap (e.g. /proc/[N]/maps): VIRTUAL ADDRESS SPACE VS. PHYSICAL MEMORY It is important to understand the difference between virtual address space and physical memory in interpreting some of the above ...


2

There is no command that gives the “actual memory usage of a process” because there is no such thing as the actual memory usage of a process. Each memory page of a process could be (among other distinctions): Transient storage used by that process alone. Shared with other processes using a variety of mechanisms. Backed up by a disk file. In physical ...


1

If you want to stretch the process out without using too much resource then try modifying the scheduling priority by changing the nice value.: nice -n 19 cat file1 file2 file3 file4 | gzip > compress.gz man nice -n, --adjustment=N add integer N to the niceness (default 10) You can also regulate the gzip speed which may be worth ...


1

Virtual memory is like speed dial numbers, except there are around 3 billion or them (for 32 bit system, 4 billion for 32 bit app on 64bit kernel, much more for 64 bit application), and you can not dial numbers direct, they have to be mapped to speed dial. Several processes can have different mappings (speed dial numbers) for the same address (phone ...


1

Looking through the /proc documentation, I see that huge page usage is recorded in /proc/PID/smaps with the ht flag in VmFlags and (other than file-backed pages) with the AnonHugePages field. grep '^VmFlags:.* ht' /proc/[0-9]*/smaps


1

Apparently the test I was running before asking the question did not show a clear behavior. Tried again with gdb -- it appears that a root program can attach to a partition created by another user even if that partition's permissions allow access only to its creator.


1

if you have sysstat installed you can use sar command e.g sar -q runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15 blocked 16:49:01 0 173 0.00 0.01 0.05 1 16:50:01 0 173 0.00 0.01 0.05 0 from sar 's man page -q Report queue length and load ...


1

I think that vmstat does what you need. From the man page: vmstat reports information about processes, memory, paging, block IO, traps, disks and cpu activity. The first report produced gives averages since the last reboot. Additional reports give information on a sampling period of length delay.


1

This is a nice utility, part of linux-ftools. You have to give the file name as input, and it will stats for the files that are in the cache now. # fincore --pages=false --summarize --only-cached <file_name> fincore [options] files... --pages=false Do not print pages --summarize When comparing multiple files, print a summary report ...


1

"Does this mean the swap partition that I created during installation is not enabled?": If you look at the stats on swap in top, it gives not only the amount in current use, but also the total amount available on the system, and the amount remaining. If all three of these numbers are 0, then yes, your swap partition is probably not enabled. "What do I ...


1

this will identify the top memory consuming processes ps -A --sort --rss -o pid ,pmem:40,cmd:500 | head -n 6 | tr -s" " ";"



Only top voted, non community-wiki answers of a minimum length are eligible