Command to check the Processor type in Linux
In order to find whether the processor is 32bit or 64 bit in Linux, use the command
[root@server1 ~]# getconf LONG_BIT
32
Also you can use
[root@server1 ~]# uname -i
i386
In order to find whether the processor is 32bit or 64 bit in Linux, use the command
[root@server1 ~]# getconf LONG_BIT
32
Also you can use
[root@server1 ~]# uname -i
i386
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 in uninterruptible sleep. or Average number of kernel threads in the VMM wait queue per second. This includes threads that are waiting on filesystem I/O or threads that have been suspended due to memory load control.
Memory
swpd: the amount of virtual memory used.
free: the amount of idle memory.
buff: the amount of memory used as buffers.
cache: the amount of memory used as cache.
inact: the amount of inactive memory. (-a option)
active: the amount of active memory. (-a option)
Swap
si: Amount of memory swapped in from disk (/s).
so: Amount of memory swapped to disk (/s).
IO
bi: Blocks received from a block device (blocks/s).
bo: Blocks sent to a block device (blocks/s).
System
in: The number of interrupts per second, including the clock.
cs: The number of context switches per second.
CPU
These are percentages of total CPU time.
us: Time spent running non-kernel code. (user time, including nice time)
sy: Time spent running kernel code. (system time)
id: Time spent idle. Prior to Linux 2.5.41, this includes IO-wait time.
wa: Time spent waiting for IO. Prior to Linux 2.5.41, shown as zero.
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. 2>&1 redirects STDERR to STDOUT. Since in this case, STDOUT is being redirected to /dev/null,
2>&1 causes both STDERR and STDOUT to /dev/null.
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 C library and the standard math library. Without these two libraries, a Linux system will not function.
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 for other predefined accounts. Further UID 100-999 are reserved by system for administrative and system accounts/groups.
4. Group ID (GID): The primary group ID (stored in /etc/group file)
5. User ID Info: The comment field. It allow you to add extra information about the users.
6. Home directory: user’s home directory
7. Command/shell: shell (/bin/bash).
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
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 values.
# /sbin/sysctl -w kernel.sem=250
Add new value in /etc/sysctl.conf file inorder for the change to persist across system reboots.
# sysctl -f => to save values
You should periodically clean up the shared memory you have allocated using the command ipcrm. A fast way to remove every bit of shared memory you have priviledges for is
ipcs -m | awk ‘{print $2}’ | xargs -n1 ipcrm -m
OR
for i in `ipcs -s | grep nobody | awk '{print $2}'`; do ipcrm -s $i; done
grub-md5-crypt - Encrypt a password in MD5 format
Encrypt a password in MD5 format.
Here is an example of the output from grub-md5-crypt
# grub-md5-crypt
Password:
Retype password:
$1$DLnnu$YTAMkz7.eNxy7narRzfwR/
Powered By Wordpress - Theme Provided By Wordpress Themes - Auto Loan Credit