Scripting

Thank you for visiting this site, this site has been moved to Fibrevillage.com, More articles, tips for you !

Using posix_fadvise you can hint the OS that it should drop certain file blocks from the cache, or load file into cache. Together with information from mincore that tells us which blocks are currently cached we can alter applications to work without disturbing the buffer cache. load or unload a file from OS cache

Quite often, in shell environment, you want to run multiple processes to either fully utilize your CPU resources or other purpose. Control and run multiple processes in bash

Perl is a powerful script language, not just do simple stuff, but also can do complex stuff too.
Lots of people have trouble to figure out parent process, child process, socket communication with client and  how to zombie a dead child process, etc..
Here is my example have everything in it. Defunct process free.perl TCP server daemon example (using socket module)

Too many articles on the internet show how to use DBD::mysql, they are all showing how to do with select, delete, update piece by piece. But, when you start to use them in programming, you will have to write a function frame and put them in. Here, I show you each piece in function, which I've been using them in my script for years. And, they've been tested in heavy duty cluster environment, thousands of concurret processes with millions of records in MySQL db. You can feel free to copy and use them in you program directly.Perl DBI examples for DBD::mysql

I have a small example for how to calculate a file's or string md5 checksum. It's also useful if you want save large number of urls into db, their md5sum could be used as a key column.how to calculate md5 of a file/string in perl


Comments