Home > Linux And Unix, Useful Linux Command > Some useful Linux Command for DBA

Some useful Linux Command for DBA

ls: List files
cp: Copy files
mv: Move and rename files
mkdir: Make a directory
alias: Define command macros
rm: Remove files and directories
more: Page through output
head: Show beginning of file contents
tail: Show end of file contents
df: Display filesystem space usage
du: Display directory disk space usage
cat: Show and concatenate files
grep: Search for patterns in files
chmod: Change permissions of files
chown: Change owner of files
zip: Compress and package files together
gedit: A WYSIWYG text editor
export: Make environment settings global
ps: List running processes
touch: Change file time stamps
id: Show information about the current user
sudo: Execute commands as another user

Standard Measurement Tools

•    Top Resource Consumers: top
•    System Activity Reporter: sar
•    Virtual Memory Statistics: vmstat
•    I/O Statistics: iostat
•    System Log files: /var/log/messages

Linux Tools

•    X-based tools: xosview
•    The /proc virtual file system
•    Free and used memory: free

Tools for monitoring and tuning CPU include:

•    top
•    pstree and free
•    vmstat
•    Syntax: vmstat <interval> <count>
•    Example : # vmstat 2 5
•    mpstat –p All
•    sar –u
•    Syntax: #sar -B <frequency> <count>
#sar -R <frequency> <count>
•    Example : #sar -B 2 3
#sar -R 2 3
•    xosview
•    xload
•    System Monitor

Measuring Total Memory

•    top
•    free
•    cat /proc/meminfo

Monitoring and Tuning I/O

•    /proc file system
•    sar -d
•    I/O statistics by device [iostat –d]
Syntax : iostat -d <interval> <count>
Eample : #iostat -d 2 2
•    I/O activity by partition
iostat –d -p <interval> <count>
•    vmstat
•    xosview

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: