Thursday, September 28, 2023

Troubleshooting memory issues in Linux requires various commands and checks. Here are some important Linux commands for memory troubleshooting

1. **Check Memory Usage:** Use `free -m` to check memory usage in megabytes.

2. **Check Process Memory Usage:** Use `top` or `htop` to monitor processes and their memory consumption.

3. **Check Swap Space:** Use `swapon -s` to list swap space usage.

4. **Check Kernel Messages:** Use `dmesg` to check for memory-related kernel messages.

5. **Check Page and Swap I/O:** Use `vmstat` to monitor virtual memory statistics, including page and swap I/O.

6. **Check Memory Allocation:** Use `pmap` to display memory map of a process, e.g., `pmap <pid>`.

7. **Check Huge Pages:** Use `cat /proc/meminfo` to see information about huge pages.

8. **Check Memory Leaks:** Use `valgrind` or `mtrace` for memory leak detection if applicable.

9. **Check Shared Libraries:** Use `ldd` to list shared libraries used by a program.

10. **Check Memory Allocation Failures:** Check for memory allocation failures in application logs.

11. **Check Swappiness:** Use `cat /proc/sys/vm/swappiness` to check and configure swappiness.

12. **Check Dirty Pages:** Use `cat /proc/meminfo` to monitor dirty pages in memory.

13. **Check NUMA Information:** Use `numactl` and `numastat` to check NUMA (Non-Uniform Memory Access) information.

14. **Memory Test:** Use `memtest86` or `memtest86+` for thorough memory testing.

15. **Check HugeTLB Settings:** Use `cat /proc/meminfo` to view HugeTLB settings.

16. **Check Transparent Huge Pages:** Use `cat /sys/kernel/mm/transparent_hugepage/enabled` to inspect Transparent Huge Pages status.

17. **Check Dirty Ratio:** Use `cat /proc/sys/vm/dirty_ratio` to check and configure the dirty ratio.

18. **Check Memory Modules:** Use `dmidecode` to list details about installed memory modules.

19. **Check Process Limits:** Use `ulimit -a` to view process-level memory limits.

20. **Check cgroups Memory Limits:** Use `cgget -n --values-only -g memory:/<cgroup>` to check memory limits set with cgroups.

#MemoryIssues, #MemoryTroubleshooting, #RAMUsage, #SwapSpace, #KernelMessages, #ProcessMemory, #VirtualMemory, #MemoryLeak, #SharedLibraries, #Swappiness, #DirtyPages, #NUMA, #MemoryTest, #HugeTLB, #TransparentHugePages, #DirtyRatio, #MemoryModules, #ProcessLimits, #cgroups, #MemoryAllocation

No comments:

Post a Comment

Thank you for Commenting Will reply soon ......

Featured Posts

list of free science and technology journals available online:

  PLOS  -  Website eScholarships  -  Website Directory of Open Access Journals (DOAJ)  -  Website International Journal for Modern Trends in...