Benchmark disk IOs

While reading this interresting article on benchmarking disks, Benjamin Schweizer pointed out a link to a python tool he wrote: benchmark disks IOs. I made a try on different available servers. Server 1 PowerEdge 2950 – Intel(R) Xeon(R) CPU 5160  @ 3.00GHz Dell PowerEdge Expandable RAID controller 5 (LSI Logic SAS based MegaRAID driver, PERC … 

 

Use multiple memcached daemons on FreeBSD

As you may know, when using memcached on 32-bit servers, processes can only address 4GB of virtual memory making the memcached daemon handle only 2 or 3 Gb of memory. If you want to address more memory, you need to launch multiple memcached daemons. I wrote an rc script , mmemcached, for FreeBSD to manage … 

 

About user agent strings

I was surprised when I saw the length of the Chrome user agent string last week: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.X.Y.Z Safari/525.13 And in our logs: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.29 Safari/525.13 a user agent string of 119 characters. It looks … 

 

Using Logcheck

Logcheck is a tool to parse system logs and send summaries by email. It filters out logs with a regular expressions database to suppress common/normal entries. Are you reading / checking your log files? Too many servers? logcheck will help you in this task and eliminates the noise. Installing on Debian # apt-get install logcheck … 

 

The unix touch command

This post is a quick ref on the linux touch command. All the examples have been tested on Linux. This command is used to update the access and modification times of files. touch’s syntax touch [option] file_name(s) touch file1 file2 file3 Here some examples: # touch /tmp/file # ls -l /tmp/file rw-r–r– 1 charlybr charlybr … 

 

sudo: port: command not found

On MacOSX, if you have installed macports with the package installer, you may encounter the sudo: port: command not found problem. Macports binaries are installed in /opt/local/bin, so you just need to add this path to your PATH environment variable. Example with your user, add to your $HOME/.profile : export PATH=$PATH:/opt/local/bin You can source your … 

 

How to know the maximum RAM supported by your server?

The dmidecode command gives you all informations available about your memory. With the special parameter “-t 16”, you can see the maximum (physical) memory that your server can have: $ dmidecode -t 16 # dmidecode 2.8 SMBIOS 2.4 present. Handle 0x1000, DMI type 16, 15 bytes Physical Memory Array Location: System Board Or Motherboard Use: … 

 

Follow your debian server updates by email with apticron

apticron is a shell script that send you an email report when new packages are available on your debian server. Install apticron As root, do: apt-get install apticron apticron configuration via /etc/apticron/apticron.conf To receive reports on your email change the EMAIL variable in the configuration file. By default, reports are sent to the root user. … 

 

Maintenance mode (HTTP 503) with lighttpd and PHP

When you put your website in maintenance mode, it’s a good idea to return a HTTP 503 error code to the client. This code indicates that “the server is currently unable to handle the request due to a temporary overloading or maintenance of the server”. The 503 code is used to avoid crawlers or caching … 

 

Rotate Nginx log files under FreeBSD

To rotate your nginx log files, you can use the log file handler provided by FreeBSD: newsyslog. Configuring /etc/newsyslog.conf /var/log/nginx-access.log               644  7     1024 *     JC /var/run/nginx.pid /var/log/nginx-error.log                644  7     1024 *     JC /var/run/nginx.pid Before log rotation: -rw-r–r–  1 root  wheel    104278002 Jul 16 11:35 nginx-access.log -rw-r–r–  1 root  wheel      1509531 Jul 16 11:17 nginx-error.log After …