Monday, November 17, 2014

Puppet - install and configuration

https://docs.puppetlabs.com/
https://www.digitalocean.com/community/tutorials/how-to-install-puppet-to-manage-your-server-infrastructure


Foreman to manage Puppet Nodes

How to optimize php

http://www.radinks.com/upload/config.php

http://www.cyberciti.biz/faq/apache-limiting-upload-size/

sed command

http://www.grymoire.com/unix/sed.html

Tuesday, October 7, 2014

Tuesday, July 15, 2014

Linux process management

It is always a good practice to find out/categorize processes running on a server based on their cpu and memory (RAM) usage. We can terminate/kill the unwanted processes causing high cpu load or memory consumption.

Here I use the process management application 'ps':

To view all running processes on the system we use
[root@server ~]# ps -aux

These options tell ps to show processes owned by all users (regardless of their terminal association) in a user-friendly format.

a - All processes except both session leaders and processes not associated with a terminal

u - Select by effective user ID (EUID) or name

x - also show processes not attached to a terminal

0 - User defined format

Top 10 cpu consuming processes


 [root@server ~]# ps axo stat,ruser,%cpu,comm,pid,euser | sort -nr | head -n 10


stat - status of the process

ruser - real user

%cpu - percentage of cpu utilized by process.

comm - command


Top 10 memory consuming processes

[root@server ~]# ps axo stat,ruser,%mem,comm,pid,euser | sort -nr | head -n 10

Useful Links -

http://www.cyberciti.biz/faq/show-all-running-processes-in-linux/

http://www.binarytides.com/linux-ps-command/

https://www.digitalocean.com/community/tutorials/how-to-use-ps-kill-and-nice-to-manage-processes-in-linux







Thursday, June 19, 2014

PhpMyAdmin and Memcache

I have come across this issue several times on a cpanel server.
Cannot start session without errors in phpMyAdmin

I found that we could only temporarily fixed this issue. Phpmyadmin has to work with sessions in files and it is not developed to work with memcache. So to avoid problems edit the file: libraries/session.inc.php


1. Include this line at the top of the file:

ini_set(‘session.save_path’, “/tmp/”);

2. Uncomment line (line around 74)

ini_set(‘session.save_handler’, ‘files’);