Archive for July, 2009

Sendmail configuration links

Posted on July 13, 2009. Filed under: Linux, Services |

Sendmail: How To Queue Mails based Server Load Average

http://techgurulive.com/2008/09/15/sendmail-how-to-queue-mails-based-server-load-average/?92febc20

 

Sendmail Config

http://www.acme.com/mail_filtering/sendmail_config.html

 

Quick-Tip: Configuring Sendmail with m4 and the sendmail.mc file

http://www.revsys.com/writings/quicktips/sendmail-mc.html

Advertisements
Read Full Post | Make a Comment ( None so far )

Useful Linux command: script, last, ulimit

Posted on July 9, 2009. Filed under: Linux |

Usage:

[root /root]$ script abcdef.log

Script started on Thu 09 Jul 2009 12:26:14 PM PDT

then input what command(and output) you want to record in the log

[root /root]$ exit

Script done on Thu 09 Jul 2009 12:26:26 PM PDT

You can read/view this log file by command vim/more/less (maybe there are some character can not shown in the terminal)

Following is the manual of this command “script”

SCRIPT(1)                 BSD General Commands Manual                SCRIPT(1)

NAME
script – make typescript of terminal session

SYNOPSIS
script [-a] [-c COMMAND] [-f] [-q] [-t] [file]

DESCRIPTION
Script makes a typescript of everything printed on your terminal.  It is useful for students who need a hardcopy record of an interactive session as proof of an assignment, as the typescript file can be printed out later with lpr(1).

If the argument file is given, script saves all dialogue in file.  If no file name is given, the typescript is saved in the file
typescript.

Options:

-a      Append the output to file or typescript, retaining the prior contents.

-c COMMAND
Run the COMMAND rather than an interactive shell.  This makes it easy for a script to capture the output
of a program that  behaves differently when its stdout is not a tty.

-f      Flush output after each write. This is nice for telecooperation: One person does ‘mkfifo foo; script -f foo’ and another can  supervise real-time what is being done using ‘cat foo’.

-q      Be quiet.

-t      Output timing data to standard error. This data contains two fields, separated by a space. The first field indicates how much  time elapsed since the previous output. The second field indicates how many characters were output this
time. This information  can be used to replay typescripts with realistic typing and output delays.

The script ends when the forked shell exits (a control-D to exit the Bourne shell (sh(1)), and exit, logout or control-d (if ignoreeof    is not set) for the C-shell, csh(1)).

Certain interactive commands, such as vi(1), create garbage in the typescript file.  Script works best with commands that do not manipulate the screen, the results are meant to emulate a hardcopy terminal.

ENVIRONMENT
The following environment variable is utilized by script:

SHELL  If the variable SHELL exists, the shell forked by script will be that shell. If SHELL is not set, the Bourne shell is assumed.            (Most shells set this variable automatically).

SEE ALSO

csh(1) (for the history mechanism), scriptreplay(1).

HISTORY
The script command appeared in 3.0BSD.

BUGS
Script places everything in the log file, including linefeeds and backspaces.  This is not what the
naive user expects.

last — Show listing of last logged in users.

Summary:

Last searches back through the file, by default, /var/log/wtmp (or -f
file) and displays a list of all users logged in and out, since that
file was created. It shows User Name, Terminal No, Host IP, Login
Date & Time, Logout Time and Total Time.

Examples:

$ last — List all entries.

$ last tty6 — List, who are all logged thru tty6.

$ last pts/6 — List, who are all logged thru pts/6.

$ last bharathi — List all entries of bharathi (user).

$ last -6 — List only last 6 entries.

$ last -R — Don’t show the Host Name field in output.

$ last -a — Show Host Name field in last column.

$ last -i — Show IP Number for Remote host.

$ last -t 20050818120000 — List all entries upto Aug 18 12:00:00 2005.

ulimit

Provides  control  over the resources available to the shell and
to processes started by it, on systems that allow such  control.
The -H and -S options specify that the hard or soft limit is set
for the given resource.  A hard limit cannot be  increased  once
it  is set; a soft limit may be increased up to the value of the
hard limit.  If neither -H nor -S is specified,  both  the  soft
and  hard limits are set.  The value of limit can be a number in
the unit specified for the resource or one of the special values
hard,  soft,  or  unlimited,  which  stand  for the current hard
limit, the current soft limit, and no limit,  respectively.   If
limit  is  omitted,  the  current value of the soft limit of the
resource is printed, unless the -H option is given.   When  more
than  one  resource  is  specified,  the limit name and unit are
printed before the value.  Other options are interpreted as fol-
lows:
-a     All current limits are reported
-c     The maximum size of core files created
-d     The maximum size of a process’s data segment
-e     The maximum scheduling priority (“nice”)
-f     The  maximum  size  of files written by the shell and its
children
-i     The maximum number of pending signals
-l     The maximum size that may be locked into memory
-m     The maximum resident set size (has no effect on Linux)
-n     The maximum number of open file descriptors (most systems
do not allow this value to be set)
-p     The pipe size in 512-byte blocks (this may not be set)
-q     The maximum number of bytes in POSIX message queues
-r     The maximum real-time scheduling priority
-s     The maximum stack size
-t     The maximum amount of cpu time in seconds
-u     The  maximum  number  of  processes available to a single
user
-v     The maximum amount of virtual  memory  available  to  the
shell
-x     The maximum number of file locks

If limit is given, it is the new value of the specified resource
(the -a option is display only).  If no option is given, then -f
is  assumed.  Values are in 1024-byte increments, except for -t,
which is in seconds, -p, which is in units of  512-byte  blocks,
and  -n and -u, which are unscaled values.  The return status is
0 unless an invalid option or argument is supplied, or an  error
occurs while setting a new limit.

Pay Attention:

Keep in mind that /etc/security/limits.conf is only applied to logins. If you’re
running the apps from init scripts, modify them to include the following
lines prior to launching the apps:

ulimit -Sc unlimited
ulimit -Hc unlimited

ulimit -n   12345

The examples for the limits.conf are:

<user> soft core unlimited
<user> hard core unlimited

*      hard   xxxxx   unlimited

*      –            yyyyy  unlimited

Reference:

http://forums.fedoraforum.org/showthread.php?t=108026

Read Full Post | Make a Comment ( 1 so far )

W3C Geolocation API standard, according to Google

Posted on July 9, 2009. Filed under: Programming |

http://www.w3.org/TR/geolocation-API/

Read Full Post | Make a Comment ( None so far )

Liked it here?
Why not try sites on the blogroll...