Author Archive

How to catch 500 error from error logs in apache

Catch 500 error

How to find the no of cpu, core and if its under HT technology CPU

count cpus and cores

Performance Tools and Tuning Tips for Java Technology-Based Server Applications on the Solaris OS

Java Linux troubleshooting + Find bottleneck + performance tuning

swap memory utilization help

allocated
The total amount of swap space in bytes currently
allocated for use as backing store.
reserved
The total amount of swap space in bytes not
currently allocated, but claimed by memory mappings
for possible future use.
used
The total amount of swap space in bytes [...]

Linux lethal commands

In this post I will collect all commands which SHOULD NEVER be executed in Linux. Any of them will cause data loss or corruption, can freeze or hang up running system.
NEVER RUN THESE COMMANDS IN LINUX BOX CLI!
Even if somebody advises you in forum/im to do it.
1. Any of these commands will erase [...]

Using RPM and dpkg

The /bin/rpm program on Red Hat and derivitives and the /usr/bin/dpkg on
Debian and derivitives are used to control the management of packages.
• Remove a package
# rpm -e <package-name>
# dpkg -r <package-name>
• List contents of entire package
# rpm -qvl <package-name.rpm>
# dpkg -c <package-name.deb>
• List all installed packages with info about each
# rpm -qvia
# dpkg -l
• List [...]

TCPDUMP

Command Line Options
-A Print frame payload in ASCII
-c <count> Exit after capturing count packets
-D List available interfaces
-e Print link-level headers
-F <file> Use file as the filter expression
-G <n> Rotate the dump file every n seconds
-i <iface> Specifies the capture interface
-K Don’t verify TCP checksums
-L List data link types for the interface
-n Don’t convert addresses to [...]

important mysql command, backup, dump restore

Connest to mysql server
mysql -u USERNAME -h ‘HOST_IP’ -p
enter password – here
mysql> show databases;
mysql> use DATABASE_NAME;
mysql> your query here.
Dumping a mySQL to a sql file
mysqldump -l –opt databasename > /root/file/location/filename.sql -u user –password=whateverthepass

Importing mySQL dump file
mysql databasename < /root/file/location/filename.sql -u user –password=whateverthepass

Copying Entire Folder of Files
cp – Ru /root/file/location/* /where/it/should/go –reply=yes

Making a [...]

Printing linux commands

/etc/rc.d/init.d/lpd start Start the print daemon
/etc/rc.d/init.d/lpd stop Stop the print daemon
/etc/rc.d/init.d/lpd
status
Display status of the print daemon
lpq Display jobs in print queue
lprm Remove jobs from queue
lpr Print a file
lpc Printer control tool
man subject | lpr Print the manual page called subject
as plain text
man -t subject | lpr Print the manual page called subject
as Postscript output
printtool Start [...]

Configuration files and what they do

/etc/profile System wide environment variables for
all users.
/etc/fstab List of devices and their associated mount
points. Edit this file to add cdroms, DOS
partitions and floppy drives at startup.
/etc/motd Message of the day broadcast to all users
at login.
etc/rc.d/rc.local Bash script that is executed at the end of
login process. Similar to autoexec.bat in
DOS.
/etc/HOSTNAME Conatins full hostname including domain.
/etc/cron.* There [...]