Masa Depan

Masa depan adalah apa yang anda pikirkan dan lakukan sekarang – Somesay

Advertisements

Be Kind …

Jika kamu benci/dibenci oleh seseorang, lakukanlah kebaikan pada orang tersebut dan lihat apa yang akan terjadi – Somesay.

[ClearOS] Increase Content Filter Performance Using E2Guardian

ClearOS 6 using dansguardian version 2.10 as it’s web content filter service, i’ve been faced dansguardian performance issue in large client usage event though Performance Level has been set to Extra Large, then i’d like to upgrade dansguardian version but it’s seem there is no development activities since 2012. My finding resulted another alternative to dansguardian that has almost exactly has same configuration file, that is e2guardian. most knows as dansguardian’s fork.

e2guardian can be installed by compiling from it’s source code and for increasing performance File Descriptor will be increased until 8192 (1024 * 8) due i will pull up e2guardian’s maxchildren.

Continue reading “[ClearOS] Increase Content Filter Performance Using E2Guardian”

List of dnsmasq’s DHCP options

There are a lot of dhcp options that available on dnsmasq based on RFC2132, unfortunately the option list are not available on documentation but in other hand we can use this command to show it all.

 
$ dnsmasq --help dhcp

Here the example for command above

Known DHCP options:
1 netmask
2 time-offset
3 router
6 dns-server
7 log-server
9 lpr-server
13 boot-file-size
15 domain-name
16 swap-server
17 root-path
18 extension-path
19 ip-forward-enable

……

As you can see first column is indicated as configuration code number and in other right column is alias name, as human i prefer the alias name because it’s more convince to remember and understandable 😀 . Here’s the comparation

Alias name

dhcp-option=option:netbios-ns,192.168.40.2
dhcp-option=option:netbios-dd,192.168.40.2
dhcp-option=option:netbios-nodetype,8
dhcp-option=option:dns-server,0.0.0.0,8.8.8.8

Configuration Code

dhcp-option=44,192.168.40.2
dhcp-option=45,192.168.40.2
dhcp-option=46,8
dhcp-option=6,0.0.0.0,8.8.8.8

You decide …..

Create 7zip Archive File With High Compression On Centos

Install 7zip on Centos if it not installed (requiring EPEL repo).


[ root@ centos ~ ]# yum install p7zip

Here’s the command for create high compression 7zip file.


[ root@centos ~ ]# 7za a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on zimbralog.7z /var/log/zimbra.log

Argument explanation:

  • -t7z   7z archive
  • -m0=lzma lzma method
  • -mx=9 level of compression = 9 (Ultra)
  • -mfb=64 number of fast bytes for LZMA = 64
  • -md=32m dictionary size = 32 megabytes
  • -ms=on solid archive = on

Cleaning Python Bytecode

When you creating a python module all python files that included will be compiled into pyc (byte code file) that will be executing by python’s virtual machine, but those files sometime causing some problem when you deal with migrating python version (from 2.6 to 2.7in my case).

 Bad magic forms.pyc

Some of the solution that i’ve done is by cleaning all *.pyc files in working directory by using find command as shown below


find . -name "*.pyc" -exec rm -rf {} \;