Archive : Programming

RSS feed
Convert unix timestamp to readable date

Convert unix timestamp to readable date

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 [...]
Find out which processes are swapping

Find out which processes are swapping

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 ?
Check HTTP header on multiple servers

Check HTTP header on multiple servers

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:
Limit the size of Subversion commitment

Limit the size of Subversion commitment

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.
Regular expressions in Bash 3

Regular expressions in Bash 3

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.
Check services status in Nagios by Nagcheck

Check services status in Nagios by Nagcheck

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
Python: initialize a list

Python: initialize a list

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?
Synchronize subversion repositories with inotify-tools

Synchronize subversion repositories with inotify-tools

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 [...]
Query domain name whois info by Python

Query domain name whois info by Python

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. #!/usr/bin/python #encoding = utf8
Upgrade and downgrade RubyGems

Upgrade and downgrade RubyGems

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 1.5.2 See Gem for information on RubyGems (or ‘ri [...]
© 2006-2012 Admon Home. All rights reserved.
Powered by Linode Japan