If something worth to be done, it worth do be done well!

Too many RX dropped packets on CentOS 5.4


Faced today a problem on one CentOS 5.4 server. After update server was dropping connections, sometimes pings were lost.

# cat /etc/redhat-release
CentOS release 5.4 (Final)

# ifconfig
eth0      Link encap:Ethernet  HWaddr
          RX packets:6126021101 errors:0 dropped:51466906 overruns:0 frame:0

# uname -a
Linux dc188.4shared.com 2.6.18-164.9.1.el5 #1 SMP Tue Dec 15 20:57:57 EST 2009 x86_64 x86_64 x86_64 GNU/Linux

(Read more...)

Tomcat appBase and docBase


While deploying JSF/Ajax application faced very strange problem. JSF mapping was working for files only in application root dir and in all other dirs was thrown such exception:

org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsf/core cannot be resolved in either web.xml or the jar files deployed with this application
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)

(Read more...)

Java/Python inverse regex


Very simple but not very obvious inverse java/python regex:

^(.(?!(some text)))*$

So "String with some text inside" will give us:

>>> re.compile("^(.(?!(some text)))*$")
>>> r = regex.search(string)
# No match was found:
>>> r

And "String without":

>>> re.compile("^(.(?!(some text)))*$")
>>> r = regex.search(string)
>>> r
<_sre.SRE_Match object at 0xc70014791f56cff8>
>>> regex.match(string)
<_sre.SRE_Match object at 0xc70014791f56ce00>

Tada :)

http://www.pythonregex.com/ - online python regex test tool

How to boot Xen into the single mode


Many months passed since my last posting. I guess I will no longer use this blog for long postings. I will try to bring back to life posting small tips and tricks just not to forget myself.

First one will be booting xen virtual guest into the single mode. (Read more...)

CentOS announced 5.3 release.


Today CentOS announced 5.3 release. Now we know the delay between RHEL and CentOS releases. RHEL GA 5.3 was released on 20.01.2009. It took more then 2 months for CenOS team to clone new system.

If this is isn't April's fools news :)

How to install ipf filter (IP Filter) on Solaris 9 x86

There was a request for me to install ipf filter package on one Solaris 9 x86 box. Unfortunately there is no precompiled package on http://www.sunfreeware.com/. http://coombs.anu.edu.au/~avalon/ipf-mentat.html says - Install pfil and then to just "make solaris" in the ipf directory, followed by a "cd SunOS5; make install". But it would be too easy. (Read more...)

Damn, I thought floppy drives are already in syncope.

I just faced with situation where it is needed to boot something from floppy.. From MS-DOS :))

I thought they are already forgotten ... damn. Some manufactures just don't want to use modern technologies.

Why pay for RedHat RHEL if there's CentOS?


"Why pay for RedHat RHEL if there's CentOS?" somebody may think.

One of the answers is here. Just check it out - most of the vulnerabilities RedHat fixed during one day. For example, "Non-Browser" applications (e.g. Samba, Sendmail, OpenSSH, Gaim, evolution) had 16 issues, with average fixing time 14 hours, and 94% of issues were fixed during one day. (Read more...)

Ext3 file system overhead disclosed (Part 2)


In the previous part we have realized that we have disk actually smaller, then we thought, when we were buying it. Now we will investigate what is the overhead of the ext3 file system itself, where and why the space is used. (Read more...)

Ext3 file system overhead disclosed (Part 1)


In the following 3 articles (Part 2, Part 3) I will show where is free space of your freshly installed disk gone, what is the overhead of the ext3 file system, how exactly this overhead is used and how we can reduce it to maximise effective usage of the ext3 filesystem. (Read more...)