linux unix issues and fixes
How to catch 500 error from error logs in apache
Catch 500 error
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 [...]
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 [...]
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 [...]
Installing software for Linux
rpm -ihv name.rpm Install the rpm package called name
rpm -Uhv name.rpm Upgrade the rpm package called
name
rpm -e package Delete the rpm package called
package
rpm -l package List the files in the package called
package
rpm -ql package List the files and state the installed
version of the package called
package
rpm -i –force package Reinstall the rpm package called
name having deleted [...]
Accessing & mounting file systems
mount -t iso9660 /dev/cdrom
/mnt/cdrom
Mount the device cdrom
and call it cdrom under the
/mnt directory
mount -t msdos /dev/hdd
/mnt/ddrive
Mount hard disk “d” as a
msdos file system and call
it ddrive under the /mnt
directory
mount -t vfat /dev/hda1
/mnt/cdrive
Mount hard disk “a” as a
VFAT file system and call it
cdrive under the /mnt
directory
umount /mnt/cdrom Unmount the cdrom
Linux machine Starting, Stopping and restart
shutdown -h now Shutdown the system now and do not
reboot
halt Stop all processes – same as above
shutdown -r 5 Shutdown the system in 5 minutes and
reboot
shutdown -r now Shutdown the system now and reboot
shutdown -r -F now Force fsck on reboot.
shutdown -r -f now skip fsck on reboot.
reboot Stop all processes and then reboot – [...]
