$ if [ false ]; then echo "That was a true statement"; fi
Compare cert salaries and plan your next career move
ChooseLife wrote: » Same here, I always thought this cache could not be directly purged, only indirectly by starting processes, which in turn take memory away from the cache. But onesaint's question sent me on the search quest - and it turns out there is a tunable kernel parameter /proc/sys/vm/drop_caches that does exactly that: Drop Caches - linux-mm.org Wiki P.S. onesaint, would that constitute a right answer?
# free -m total used free shared buffers cached Mem: 1999 1900 99 0 98 1315 -/+ buffers/cache: 486 1512 Swap: 4095 0 4095 # sync; echo 3 > /proc/sys/vm/drop_caches # free -m total used free shared buffers cached Mem: 1999 418 1580 0 2 77 -/+ buffers/cache: 338 1660 Swap: 4095 0 4095
fiftyo wrote: » I believe this question comes down to message queues/shared memory segments which you can view via ipcs -a then there would probably some segment eating a lot of memory in the queue, which you could destroy via ipcrm -M <key value>.
# ps -e -o pid,vsz,comm= | sort -n -k 2 | less
UnixGuy wrote: » is there a certain advantage in freeing up the memory in this way? Because from what I understand, the kernel tries to fill up the memory to enhance the performance.
ChooseLife wrote: » You're bringing up a good point. In general this is a performance enhancing feature, so there is no need to purge caches just to see "free memory" number go up. However, there may be special cases... E.g. I remember reading something about MySQL query cache vs filesystem cache contention and balancing them... Another scenario that comes to mind is a multi-tenant virtual host where you overcommit virtual RAM, but then VMs' kernels start using up all memory that they think they have for caching, starving the host's physical RAM...
W Stewart wrote: » Maybe cat /proc/mdstat or the mdadm command with some flag. Not sure which flag though.
W Stewart wrote: » That's a tough one. I usually just use omreport at my job to get info on hardware RAID and the drive usually just shows up as /dev/sda.
onesaint wrote: » How do I determine if there is a raid controller on the second system and if possible what type of raid?
ChooseLife wrote: » But your question is actually asking I would snoop around the system's hardware reports as shown by dmesg, lsscsi, lspci, lsmod...
# fdisk -l Disk /dev/sda: 250.9 GB, 250999144448 bytes #lshw output omitted... description: RAID bus controller product: 3ware Inc 3ware 7xxx/8xxx-series PATA/SATA-RAID vendor: 3ware Inc output omitted... *-member:0 description: ATA Disk product: WDC WD2500 vendor: Western Digital physical id: 0 bus info: raid@c0/p0 logical name: c0/p0 ... capacity: 127GiB (137GB) *-member:1 description: ATA Disk product: WDC WD2500 vendor: Western Digital physical id: 1 bus info: raid@c0/p1 logical name: c0/p1 version: 20.06C06 capacity: 127GiB (137GB)
W Stewart wrote: » Here's something I ran into at my job. A customers server keeps running out of memory and killing off processes to the point where we can no longer remotely access it and have to run across the street 3 times a day to hard reboot it. The customer won't do anything to resolve this issue. What can I do to make all of our lives easier?
/proc/sys/vm/drop_caches
ps -e -o pid,vsz,comm= | sort -n -k 2 | less
Compare salaries for top cybersecurity certifications. Free download for TechExams community.