clockspeed uses a hardware tick counter to compensate for a persistently
fast or slow system clock. Given a few time measurements from a reliable
source, it computes and then eliminates the clock skew.
sntpclock checks another system's NTP clock, and prints the results in a
format suitable for input to clockspeed. sntpclock is the simplest
available NTP/SNTP client.
taiclock and taiclockd form an even simpler alternative to SNTP. They
are suitable for precise time synchronization over a local area network,
without the hassles and potential security problems of an NTP server.
This version of clockspeed can use the Pentium RDTSC tick counter or the
Solaris gethrtime() nanosecond counter.
A port to non-i386 platforms was done using the clock_gettime(2)
function. Since this is somewhat experimental, there might be some
tiny precision differences from the i386 platform versions. You
have been warned!
"cronolog" is a simple program that reads log messages from its input
and writes them to a set of output files, the names of which are
constructed using template and the current date and time.
"cronolog" is intended to be used in conjunction with a Web server, such
as Apache to split the access log into daily or monthly logs. E.g.:
TransferLog "|/www/sbin/cronolog /www/logs/%Y/%m/%d/access.log"
ErrorLog "|/www/sbin/cronolog /www/logs/%Y/%m/%d/errors.log"
would instruct Apache to pipe its access and error log messages into
separate copies of cronolog, which would create new log files each day
in a directory hierarchy structured by date, i.e. on 31 December 1996
messages would be written to:
/www/logs/1996/12/31/access.log
/www/logs/1996/12/31/errors.log
After midnight the following files would be used:
/www/logs/1997/01/01/access.log
/www/logs/1997/01/01/errors.log
Spinner is a small program that displays a little "spinning" ASCII
character in the top left corner of your terminal. To make this effect
it cycles through punctuation marks like this " - \ | / - \ | / ... "
(try it to see). By default the character is drawn in inverse video
(or your terminal's equivalent). But you can turn this off with the -i
switch. It supports any terminal capable of handling VT100 style escape codes.
Spinner is useful for keeping telnet and ssh links from dropping due to
inactivity. Many firewalls, and some ISPs drop connections when they are
perceived as idle. By having spinner running the server is constantly
sending a tiny amount of data over the link, preserving the connection.
Thus (for search engines) Spinner is an anti-dle, timeout preventing,
background daemon process for Unix variants including Linux.
- Michael L. Hostbaek
mich@FreeBSD.org
The stalepid utility was developed to facilitate the startup of servers
that write their process ID to a file and refuse to start if that file
exists (e.g. when the process was last terminated by an unclean shutdown,
or simply killed without given the chance to clean up the process ID
file). The stalepid utility is used to check for and possibly remove
those stale process ID files. Upon its invocation, stalepid checks for
the following conditions:
- the file specified by the pidfile argument exists;
- it contains a single line, and the line contains a single number;
- there is no process with the process ID specified in the file, or if
there is one, it is not named processname.
If all those conditions are met, the stalepid utility will remove the
file specified by the pidfile argument, thus allowing the next invocation
of the server to proceed normally.
mod_myvhost is Apache module for dynamically configured name based mass virtual
hosting with PHP, virtual host's configurations and PHP settings are stored in
database.
No need to have every vhost in apache's configuration file, no need to restart
apache after configuration changed (vhost added|deleted, vhost rootdir changed,
vhost unblocked/unblocked...).
After all, it is capable to change settings of PHP4/5 dynamically (if php is
loadable module or it is linked with apache) for any vhost. By default, it sets
open_basedir as vhost's rootdir to prevent user from stoling files from other
users and from your server, but you have ability to change almost any parameter
that exists in php.ini, for example, you can turn on safe_mode or
register_globals for particular vhost, if it has old php scripts that use global
variables.
There are two styles of programming with CGI.pm, an object-oriented
style and a function-oriented style. In the object-oriented style you
create one or more CGI objects and then use object methods to create the
various elements of the page. Each CGI object starts out with the list
of named parameters that were passed to your CGI script by the server.
You can modify the objects, save them to a file or database and recreate
them. Because each object corresponds to the "state" of the CGI script,
and because each object's parameter list is independent of the others,
this allows you to save the state of the script and restore it later.
Compress::LeadingBlankSpaces - Perl class to compress leading blank
spaces in (HTML, JavaScript, etc.) web content.
This class provides the functionality for the most simple web content
compression.
Basically, the outgoing web content (HTML, JavaScript, etc.) contains
a lot of leading blank spaces, because of being structured on
development stage. Usually, the client browser ignores leading
blank spaces. Indeed, the amount of those blank spaces is as
significant as 10 to 20 percent of the length of regular web page.
We can reduce this part of web traffic on busy servers with no
visible impact on transferred web content, especially for old
browsers incapable to understand modern content compression.
The main functionality of this class is concentrated within the
"squeeze_string" member function that is supposed to be used inside
the data transfer loop on server side. The rest of the class is
developed in order to serve possible exceptions, like pre-formatted
data within HTML.
MasonX::WebApp works with Mason to let you do processing before Mason is ever
invoked. There are a number of things that one might want to do:
* Argument munging
You might want to make sure all incoming arguments are UTF-8 encoded.
Or you might want to create some objects which Mason will see as
incoming arguments. For example, a "user_id" parameter could be turned
into a user object.
* Handle requests without Mason
If you're not generating output for the browser other than a redirect,
then there's no reason to use Mason. You can use a MasonX::WebApp
subclass to handle all form submissions, for example.
This has the added benefit of making it easier to preload this code
once during server startup.
* And others ...
Do you ever wish you could cut two or more separate pieces of text
at once from a window? Do you ever need to save the output from one
command for reuse in several subsequent tasks? Do you ever find
yourself wanting some easy means of globally exporting data, e.g.
to a parent shell, to another xterm or application, or to another
machine or user? If you answer yes to any of these questions, then
xcb is for you.
Xcb provides access to the cut buffers built into every X server.
It allows the buffers to be manipulated either via the command line,
or with the mouse in a point and click manner. The buffers can be
used as holding pens to store and retrieve arbitrary data fragments,
so any number of different pieces of data can be saved and recalled later.
The program is designed primarily for use with textual data.
这里有一份中文文档 @ http://www.fayland.org/project/Han-PinYin/。
它描述了我为什么和如何编写这个模块的。