Archive for October, 2011

SBDavid

fsck - how much % fsck is completed

fsck - how much % fsck is completed

-C [ "fd" ]
Display completion/progress bars for those filesystem checkers (currently only for ext2 and ext3) which support them. Fsck will manage the filesystem checkers so that only one of them will display a progress bar at a time. GUI front-ends may specify a file descriptor fd, in which case the progress bar information will be sent to that file descriptor.

Note : Make sure that partition is not mounted while running fsck.

Many time due to big partition size ,we have to wait for the long time at that time we think fsck process is stuck at that time we can use the following fsck command because its showing the % for the fsck process, so that we are able to see how much % fsck is completed and remaining.

fsck -y -C0 /dev/sdb1
SBDavid

Traceroute overview

Traceroute overview

Traceroute is a system administrators utility to trace the route IP packets take from a source system to some destination system.

Traceroute uses the IP TTL (Time To Live) parameter to find the route. It sends a packet with a TTL value equal to 1. The first router receives the packet and decreases the TTL. With a TTL equal to 0, the router sends a timeout back to traceroute, with this packet, traceroute knows about the first router. Now, traceroute sends another packet with a TTL equal to 2. The first router decreases the TTL and sends the packet to the second router which decreases it in turn: the TTL is equal to 0

Reference: http://traceroute.sourceforge.net/

SBDavid

Introduction to XCache

Introduction to XCache

XCache is a open-source opcode cacher, which means that it accelerates the performance of PHP on servers. It optimizes performance by removing the compilation time of PHP scripts by caching the compiled state of PHP scripts into the shm (RAM) and uses the compiled version straight from the RAM. This will increase the rate of page generation time by up to 5 times as it also optimizes many other aspects of php scripts and reduce serverload.

XCache is a fast, stable PHP opcode cacher that has been tested and is now running on production servers under high load. It is tested (on linux) and supported on all of the latest PHP.

It overcomes a lot of problems that has been with other competing opcachers such as being able to be used with new PHP versions.

SBDavid

Securing the /etc/services file

Securing the /etc/services file

Secure the /etc/services file to prevent unauthorized editing. If this file is editable, crackers can use it to enable ports on your machine you have otherwise closed. To secure this file, type the following commands as root:

# chown root.root /etc/services
# chmod 0644 /etc/services
# chattr +i /etc/services

This prevents the file from being renamed, deleted or having links made to it.

SBDavid

Customizing apache web logs

Customizing apache web logs

Custom formats for apache web logs, to record more information or to make them easier to read.

LogFormat

%h The remote host
%l The remote logname (usually just “-”)
%u The authenticated user (if any)
%t The time of the access
\”%r\” The first line of the request
%>s The final status of the request
%b The size of the server’s response, in bytes
\”%{Referer}i\” The referrer URL, taken from the request’s headers
\”%{User-Agent}i\” The user agent, taken from the request’s headers

Apache’s “LogFormat” directive is what lets you define your own access log setup. Let’s look at how that directive would be used to define the combined log format (CLF):

LogFormat “%h %l %u %t \”%r\” %>s %b \”%{Referer}i\” \”%{User-Agent}i\”" combined

That first argument, in quotes, is the string that describes the log format. The last argument, “combined”, gives a nickname to the format that can be used by CustomLog later on.

That format string contains a bunch of placeholders that describe the data to be included in the log. That first one, for example, is “%h” and represents the IP address of the visitor (the identifier for their host). A bit further on, “%t” represents the time of the request.

Next »