Is it possible to execute shell command in kernel module. I know that we can do it in user space C code using system subroutine.
I am debugging a kernel module
Its not possible to run a shell command from inside the kernel. You can instead read the /proc/meminfo file by calling the suitable procfs API to read the /proc/meminfo file. That virtual file has useful memory stats about the system memory.