Wednesday, October 1, 2014

Command to check which service used how much memory on Linux

Many linux users and new on linux users have an issue to know that which processes uses how much memory on his machine or on server, So they cant able to debug the memory issue on server

Here is the command which you can use to know that which services uses how much memory

ps -eo rss,pid,user,command --sort -size | awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' | egrep -v 0.00

One more thing that might helps if you found more memory usage
Here is Command for clear cache
sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"

Hope this helps !!


wkhtmltopdf: error while loading shared libraries: cannot open shared object file: No such file or directory

If you get this error while install wkhtmltopdf on centos/fedora then install below packages

1. yum install libXext  libXrender  fontconfig
2. yum install urw-fonts 

Hope this helps !!


Contact Me for any help regarding rails/nodejs/php/mysql


Email *

Message *