Tikejhya: Ashish Nepal

Knowledgebase

Month: October 2011 (Page 1 of 2)

passwd: Authentication token lock busy

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

Error:

passwd: Authentication token lock busy

Solution would be: mount -o remount,rw /

Second Level Error:

block device /dev/VolGroup00/LogVol00 is write-protected, mounting read-only

Solution would be: fsck (yes simply type fsck)

How to Test “write speed” of your disk

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

dd if=/dev/zero of=ashish.img bs=1M count=100

Testing write speed of your server,
eg. bs=1M -> 1M block size
count=100 -> 100 MB total size
/dev/zero -> writing blank
ashish.img -> output as ashish.img of that 100MB file.

yum install sar

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

yum install sysstat

for sar you have to install sysstat

seeker (performance benchmark)

yum install seeker

seeker /dev/sda

Another benchmarking tool.
Output
Benchmarking /dev/sda [83886080 blocks, 42949672960 bytes, 40 GB, 40960 MB, 42 GiB, 42949 MiB]
[512 logical sector size, 512 physical sector size]
[1 threads]
Wait 30 seconds…………………………
Results: 679 seeks/second, 1.473 ms random access time (4756640 < offsets < 42946385220) We can get the average number of seeks per second, and calculated random access time of the disk Now, the utility reads only 512 bytes of data per one read operation, but internal kernel readahead mechanisms translate that to 4096 byte I/O operations. Multiplying 167 with 4096, we can estimate that disk is reading only 668 KB/sec. (Considering worste case senario).

hdparm (Performance test & analysis) “Linux Server”

hdparm -t /dev/sda

Output

/dev/sda:
Timing buffered disk reads: 56 MB in 3.65 seconds = 15.34 MB/sec

MAN
Perform timings of device reads for benchmark and comparison purposes. For meaningful results, this operation should be repeated 2-3 times on an otherwise inactive system (no other active processes) with at least a couple of megabytes of free memory. This displays the speed of reading through the buffer cache to the disk without any prior caching of data. This measurement is an indication of how fast the drive can sustain sequential data reads under Linux, without any filesystem overhead. To ensure accurate measurements, the buffer cache is flushed during the processing of -t using the BLKFLSBUF ioctl. If the -T flag is also specified, then a correction factor based on the outcome of -T will be incorporated into the result reported for the -t operation.

Creating swapfile

To Create a 2GB swap file ( 1024 * 2048M = 2097152)

or this works as well bs = 1M count = 2048

Type this
dd if=/dev/zero of=/swapfile bs=2048 count=2097152

mkswap /swapfile

swapon /swapfile

vi /etc/fstab

/swapfile swap swap defaults 0 0

Create turbo storage using tmpfs

Create turbo storage using tmpfs

Please be aware of what is /dev/shm

mkdir /turbo

mount -t tmpfs -o size=4G,mode=0755 tmpfs /turbo

mount

vi /etc/fstab
tmpfs /turbo tmpfs size=4G,mode=0755 0 0

MySQL: Starting MySQL….. ERROR! The server quit without updating PID file

Backup your MySQL configuration first.

cp /etc/my.cnf /etc/my.cnf.backup

And restart the MySQL server again:

/usr/local/share/mysql/mysql.server start

Hopefully you will see the following message:

Starting MySQL. SUCCESS!

database: mysql_error: Table ‘snort.sensor’ doesn’t exist

Solution:

mysql snort < /usr/local/src/barnyard2-1.9/schemas/create_mysql

Read More

undefined reference to ‘pthread_’

compiler error: undefined reference to ‘pthread_’

undefined reference to ‘pthread_%’
undefined reference to ‘dl%’

./configure –with-mysql –with-mysql-libraries=/usr/lib64/ LIBS=”-lpthread -ldl”

Page 1 of 2

Powered by WordPress & Theme by Anders Norén