LinuxHelps.com

A blog for Linux Lovers.

Archive for the 'Linux Helps' Category


vmstat - command

Sunday, March 8th, 2009
Linux Helps | No Comments »

vmstat reports information about processes, memory, paging, block IO,
traps, and cpu activity.

FIELD DESCRIPTION FOR VM MODE
Procs
r: The number of processes waiting for run time. or
Average number of kernel threads that are runnable, which includes threads that are running and threads that are waiting for the CPU.
b: The number of processes [...]

Define “/dev/null 2>&1″

Sunday, March 8th, 2009
Linux Helps | No Comments »

some_prog > /dev/null 2>&1
2 = standard error
1 = standard outout
The first part
“> /dev/null” means send standard output to the ‘bit bucket” or in other words, throw it away.
Second part
2> redirects STDERR to the specified file.
& only means to run the process in the background if it appears at the end of the line. [...]

What is glibc ?

Sunday, March 8th, 2009
Linux Helps | No Comments »

The glibc package contains standard libraries which are used by multiple programs on the system. In order to save disk space and memory, as well as to make upgrading easier, common system code is kept in one place and shared between programs. This particular package contains the most important sets of shared libraries: the standard [...]

Fields in /etc/passwd

Tuesday, March 3rd, 2009
Linux Helps | No Comments »

sibu:x:504:532:sibuhomepage:/home/sibu:/bin/bash
1. Username: User’s login name. It should be between 1 and 32 characters in length.
2. Password: An x character indicates that encrypted password is stored in /etc/shadow file.
3. User ID (UID): Each user must be assigned a user ID (UID).
UID 0 (zero) is reserved for root and UIDs 1-99 are reserved [...]

Error: Script Alias for scgi-bin was missing

Tuesday, March 3rd, 2009
Linux Helps | No Comments »

Error:
Script Alias for scgi-bin was missing
FIx:
Add the following Script Alias for the user’s virtual host  /usr/local/apache/conf/httpd.conf
ScriptAlias /scgi-bin/ /home/username/public_html/scgi-bin/Restart apache.

Semaphore

Tuesday, March 3rd, 2009
Linux Helps | No Comments »

Semaphore
When you stop all service, the semaphore and shared memory segments have to be removed. If not, you will be able to them using ‘ipcs’ command.
We can remove the segment ID using ‘ipcrm’ command.
#ipcs -a
#ipcrm -s < sem id>
To increase the semaphore values.
# /sbin/sysctl -a | grep sem => To display the Sem [...]

grub-md5-crypt

Tuesday, March 3rd, 2009
Linux Helps | No Comments »

grub-md5-crypt - Encrypt a password in MD5 format

Description
Encrypt a password in MD5 format.

-h, –help
print this message and exit
-v, –version
print the version information and exit
–grub-shell=FILE
use FILE as the grub shell

Here is an example of the output from grub-md5-crypt
# grub-md5-crypt
Password:
Retype password:
$1$DLnnu$YTAMkz7.eNxy7narRzfwR/