Posted by joseph on April 29, 2012 ·
Unix time, or POSIX time, is a system for describing instants in time, defined as the number of seconds elapsed since midnight Coordinated Universal Time (UTC) of Thursday, January 1, 1970 (Unix times are defined, but negative before that date), not counting leap seconds. It is used widely in Unix-like [...]
Posted by joseph on March 24, 2012 ·
Have you ever been complained that servers are getting slower and slower, and with the command free, you see that a bit of swap is used and wondering what processes are swapping ?
Posted by joseph on November 25, 2011 ·
How can we dump the HTTP header for a specified URL?
It’s not difficult since linux has such tools to do that, below is an example:
Posted by joseph on November 23, 2011 ·
Has your subversion repository ever been abused by massive commitments?
If not, I should say that you are lucky. Never mind that someday you might be abused as it’s hard to predict what the non-Ops are working on and trying to do.
Posted by joseph on November 22, 2011 ·
Since version 3 which released in 2004, Bash acquired a regular expression operator “=~”, but I never noticed it, probably because grep sed or other commands works alternatively well. The regular expression is the same as egrep, you can find more details from man egrep.
Posted by joseph on November 5, 2011 ·
I just created a script Nagcheck to read services status in Nagios. It reads all the nagios settings, parse them, then create a report based on what you ask for.
With this script, you can do the following things:
List the notification disabled (or enabled) hosts
Posted by joseph on October 16, 2011 ·
I met this issue last week, and finally got a proper way to handle it.
We normally init a list like this “list=“, then how can we initialize a python list with a string variable?
Posted by joseph on June 16, 2011 ·
How can I keep two subversion repositories synchronized on the fly?
As a known issues that system administrators may face, there’re serval ways to achieve that:
svnsync – As part of the official toolset, it would be a good solution. Anyway I will not use it.
SVK – Did not check it [...]
Posted by joseph on April 28, 2011 ·
In one of our former post, we give an example on how to query IP whois info by Python, here is an example on how to query whois information for a domain name.
#encoding = utf8
Posted by joseph on February 25, 2011 ·
RubyGems is a package management framework for Ruby. You need to have an installation of RubyGems before applying the following changes to your system. To make sure whether you have installed RubyGems or not, run this command:
joseph@admon:~$ gem -v
See Gem for information on RubyGems (or ‘ri [...]