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 !!

Cheers

wkhtmltopdf: error while loading shared libraries: libXrender.so.1: 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  libfontconfig.so.1
2. yum install urw-fonts 

Hope this helps !!

cheers

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

Name

Email *

Message *