Sunday, September 1, 2013

Unix Timestamp conversion (Convert Unix Time)

Have you ever had the chance to work on logs to investigate on a few items that needs immediate reports and judgement, while you are at it logs shows the standard "unix" convention.  To spare you all this hardship use the following formatting on every known log you have.

perl -p -e 's/^([0-9]*)/"[".localtime($1)."]"/e'

I does all the magic for you.

e.g.  tail -n 20000 /some_path_to_logs | (command above) | less


Server Hardware Memory Alignment

Have you ever had the chance of migrating old memory to a newer hardware, only to find out that its not reading all those modules when they should be?

The reason for this is that, server hardware is channel specific, what I meant by this is that if your board supports more than one processor slot and who have no luxury of reading the setup manual.  Chances are you are putting those memory modules on locations which they are not ought to be in.   The hint is this.  The closer the memory banks to a processor the most likely that that is the correct channel for those banks.

Try it. 

rsync to a different port

There are instances when you are faced with issues on securing your servers and in the process systematically closing all the default ports.  Real hassle if you do "rsync" on a regular basis.  Apparently, there is a simply solution for this.  All you need to do is train it to use a different port.


rsync -av -e 'ssh -p 35500' /home/footloader 
** above will rsync home dir to a certain server

Awesome?  Cheers!!!