SlideShare a Scribd company logo
1 of 68
Download to read offline
Presenting Sponsors
Essential Linux for the DBA
Kellyn Pot'Vin-Gorman, Technical Intelligence Manager, Delphix, Inc.
Moderated By: Andy Yun
If you require assistance
during the session, type
your inquiry into the
question pane on the right
side.
Maximize your screen with
the zoom button on the
top of the presentation
window.
Please fill in the short
evaluation following the
session. It will appear in
your web browser.
Technical Assistance
Thank You to Our Presenting Sponsors
Supporting Sponsor
Quest helps IT Professionals simplify administration
tasks so they can focus on the evolving needs of their
businesses. Combined with its commitment to help
companies protect today’s investment while planning
for the future, Quest continues to deliver the most
comprehensive solutions to monitor, manage, protect
and replicate database environments
Empower users with new insights through familiar tools
while balancing the need for IT to monitor and
manage user created content. Deliver access to all data
types across structured and unstructured sources.
IDERA designs powerful software with one
goal in mind – to solve customers’ most complex
challenges with easy-to-use solutions. IDERA’s award-
winning SQL Server database solutions and multi-
platform database, application and cloud monitoring
tools ensure your business never slows down.
SentryOne empowers Microsoft data professionals to
achieve breakthrough performance across physical,
virtual and cloud environments. We develop solutions
to monitor, diagnose, and optimize SQL Server
performance, including Plan Explorer, the query-tuning
tool with more than 100,000 downloads.
Attend PASS Summit to Grow Your Career
The Community
PASS Summit is the largest conference for technical professionals who
leverage the Microsoft Data Platform.
November 6-9 | Seattle, WA
PASSsummit.com
Connect with a global network of 250,000+ data professionals
B Speaker
Speaker numerous technical conferences for Oracle, Big Data, DevOps
Testing and SQL Server
Kellyn Pot’vin-Gorman
Member of the Oak Table Network
dbakevlar.com
@DBAKevlar
linkedin.com/in/kellynpotvin
Oracle ACE Director alumnus
Technical Intelligence Manager at Delphix
Presenting Sponsors
Essential Linux for the DBA
Kellyn Pot'Vin-Gorman, Technical Intelligence Manager, Delphix, Inc.
So SQL Server Has Come to the World of Linux
There’s a lot to learn about Linux…
Learning how to:
• Navigate
• Manage
• Gather information
• Monitor
But You Need to Learn to Walk Before You Run..
8
History Lesson
• 1991 project by Linus Torvalds from Finland to create free operating
system kernel.
• Based on C programming
• Almost was named Freax
• Now all part of the GNU Project
• Debian, Redhat, Oracle Linux, Ubuntu, Suse are all flavors of Linux.
• Microsoft introduces SQL Server on Linux in version 2017 beta
9
Accessing a Linux Host
• Most Common Tools
• Putty, (free download)
• Terminal, (MAC)
• Docker or VM image with terminal via Linux console.
• SSH, (Secure Shell)
ssh OSUsername@<hostname or IP address>
10
User, Groups and Penguins, Oh My!
• Don’t do everything as ROOT, (aka super user)
• Perform administrator tasks by using SUDO, (switch user domain
owner)
• Log in as with your own user ID and su, (switch user) to the
application owner.
• There is a UID, (User ID) for every user name.
• Each user is assigned a group(s) for role hierarchy
• A home directory will contain the following:
• Profile, (RC) with environment variables, alias’ and other necessary
configurations for the user environment.
11
RC and Profiles
• RC file stands for Run Commands
• Profile is similar, but set up as a secondary set of profile settings,
including:
• Shell to be used
• Alias’
• Environment variables
• Path information
• File name begins with a “.”
• View with command ls -la
.bashrc
.bash_rc
.profile
.profile_xx
12
Example of a profile
#/! /usr/bin/sh
EDITOR=nano
# EDITOR=vi
sudo visudo
export PATH = $PATH:.
# export ORACLE_HOME=/u01/app/oracle/dbhome_1/db12c
export SQL_HOME=/u01/app/mssql/140
export LANG=en.UTF-8
export JAVA_HOME=/usr/bin/java
# alias info
alias reload=’source ~/.bash_profile’
alias pre-‘open -a Preview’
alias cd.. =’cd ..’
13
Creating Users
• Useradd has different results than adduser, but both work.
• Useradd will require you to:
• Manually update the password with passwd <username>
• Manually assign a group with usermod after creating a manual group with
groupadd command
• If you wish to add any pertinent information about the user, that must be
added manually.
A user should be created for every user logging in. Don’t share logins.
Avoid non-audited, such as direct ROOT access.
Grant SUDO with great care.
Grant SU to only those that require it.
14
SU and SUDO
• To switch to from existing user to become jsmith:
$ su – jsmith
• To execute a command as ROOT after being granted SUDO
privileges
$ sudo setsys.sh –y
15
Understanding File Permissions
Where this can be confusing for some, is that we visibly identify the
grants by their values, either as separate values or as totals.
• Read,(r)= 4
• Write,(w)= 2
• Execute, (x)=1
• owner has 4+2+1=7
• group has 4+2+1=7
• other has 4+2+1=7
16
Changing Permissions
• CHMOD= change modify
$ chmod <filename> XXX
$ chmod test.txt 764
• Owner- read, write, execute
• Group- read, write
• Other- read
You must have permissions to update the permissions or must SU/SUDO
to perform them:
$ sudo chmod test.txt 764
17
Changing File Owner
• CHOWN = change owner
$ chown <newuser>:<group> <filename>
$ chown jsmith:dba test.sh
• You must have privileges or own the file to begin with to change
the ownership.
18
Basics
What Command Common
Change Diretory cd cd, cd .. ,cd /directory path
List or Directory information ls ls, ls –lf, ls –la
Locate program find <program name> find java, find sql
Locate which installation used which <program name> which mssql
Current Directory pwd pwd
Create Directory mkdir mkdir scripts mkdir
/u01/apps/scripts
Create File touch <filename>, vim <filename> touch test.sh
Edit File vim <filename>, vi <filename> vim touch.sh
Remove rm <filename> rm touch.sh ** rmdir
19
Processes
• Ps command
$ ps
$ ps –ef
To Kill a process, (BECAREFUL!)
$ kill <PID>
20
Editors
• VI/VIM makes you cool- old school
• Nano
• eMacs
• Create a file easily by issuing the touch command
$ touch <filename>
21
VI(M)
Command line editor
$ vi <filename>
• Go down a line: j
• Go up a line: k
• Go to the right: l
• Go to the left: h
• Insert: i
• Append: a
• Append to the end of a line: a
• Add a line and insert below your
cursor: o
22
Add a line and insert ABOVE your
cursor: <shft> o
Undo: u
Quit without saving: :q
Quit without saving to a read only file:
:q!
Write to a file: :w
Write to a read only file, (override): :w!
Write to a file and quit: :wq
Write to a read only file, (override) and
quit: :wq!
Redirecting Data Output to a File
• $ <command> > <filename>
$ ls > filelist.txt
$ ls >> filelist.txt
• If run again with the “>>”, the results will be appended to the first
file’s contents.
23
Running an Update on Linux
• Updates and Installations are done most often via Yum, APT-GET or
Zypper
• Using APT-GET
• Update from repository, (stored in
$ apt-get update
• Install updates, (may require SUDO)
$ apt-get install
24
Adding Utilities is Done via Packages
• Common Installers for Linux
• YUM
• APT-GET
• ZYPPER
Installing a package with APT-GET
$ sudo apt-get install –y <pkgname>
Viewing package information:
$apt-cache pkgname <pkgname>
Display package information:
$apt-cache show <pkgname>
25
Cheat Sheets for Common Installers
• Yum: https://access.redhat.com/articles/yum-cheat-sheet
• Apt-Get https://blog.packagecloud.io/eng/2015/03/30/apt-cheat-
sheet/
• Zypper: https://en.opensuse.org/images/1/17/Zypper-cheat-sheet-
1.pdf
26
Mission Impossible
• Initial Powershell for Linux:
https://github.com/PowerShell/PowerShell
• BASH, (Born again shell)
• KSHELL, (Korn Shell)
• CSHELL, (based off C)
• Shell scripting is very similar in each of these languages and very
different from Powershell.
27
Linux system-level diagnostics
• CPU and Memory
• Process
• Network
• Other useful Linux diagnostic utilities
• Support recommended diagnostic tools
• A great source of living technical information
Utilities to View
Resource Usage
• SAR
• SADC/SADF
• MPSTAT
• VMSTAT
• TOP
29
Common Arguments and Values
• Some of the utilities aren’t standard and may need to be installed.
• Yum and apt-get are your friend
• You may require sudo, (super user) privileges to install
• <command> -x(xx)
• Arguments are cap sensitive, (as is everything in Unix world.)
• <command> -x 5 5
• First how many second sleep, Second value is how many results to return
• <command> -h
• Provides help information about the utility or command
30
What is SAR?
• System Activity Report
• Provides information about
• CPU
• Memory and virtual memory
• I/O
• Network
• Provided by the SYSSTAT package
• What if it’s missing?
• Install it as root:
$yum -y install sysstat
$apt-get install sysstat
31
sar Utility
• CPU utilization: sar -u
• %usr, %sys, %idle
• %nice
• Intervals of CPU: sar 1 3
• 3 times, every 1 second
• CPU run queue report: sar -q
• Runq-sz
• plist-sz and load averages
• Context switching activity: sar -w
• cswch/s
• Virtual memory swapping: sar -W
• swpin/s, swpot/s
• Virtual memory paging: sar -B
• pgpgin/s, pgpgot/s
sar Utility
$ sar -u 5 5
Linux 2.6.32-573.22.1.el6.x86_64 (linuxsource.delphix.local) 11/28/2017 _x86_64_
(2 CPU)
06:15:31 PM CPU %user %nice %system %iowait %steal %idle
06:15:36 PM all 0.20 0.00 0.20 48.58 0.00 51.01
06:15:41 PM all 0.30 0.00 0.20 47.98 0.10 51.41
06:15:46 PM all 0.30 0.00 0.20 46.92 0.00 52.58
06:15:51 PM all 0.20 0.00 0.20 47.77 0.00 51.82
06:15:56 PM all 0.20 0.00 0.20 47.78 0.10 51.72
Average: all 0.24 0.00 0.20 47.81 0.04 51.71
sar Utility
$ sar -q 5 5
Linux 2.6.32-573.22.1.el6.x86_64 (linuxsource.delphix.local)
11/28/2017 _x86_64_ (2 CPU)
06:16:45 PM runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15
06:16:50 PM 0 190 1.37 1.28 1.30
06:16:55 PM 0 190 1.34 1.28 1.29
06:17:00 PM 0 190 1.31 1.27 1.29
06:17:05 PM 0 190 1.36 1.29 1.30
06:17:10 PM 0 190 1.34 1.28 1.30
Average: 0 190 1.34 1.28 1.30
What is SADC/SADF?
• sadc: back-end system activity data collector utility behind sar
• Collects specified system data at configured intervals
• Saves data to specified binary files
• sadf: system activity data formatter
• report on data collected by sadc/sar
• output to be consumed by other programs like awk, MS-Excel, etc
• Options for translating and displaying dates, numbers, text
• Output to plain text or XML
What is MPSTAT?
• Reports processor level statistics
36
mpstat utility
Processor Level Statisitcs
$ mpstat –P ALL
Linux 2.6.32-573.22.1.el6.x86_64 (linuxsource.delphix.local) 11/28/2017 _x86_64_
(2 CPU)
06:18:10 PM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
06:18:10 PM all 1.42 0.00 0.19 8.01 0.00 0.00 0.02 0.00 90.36
06:18:10 PM 0 1.38 0.00 0.21 15.10 0.00 0.00 0.02 0.00 83.29
06:18:10 PM 1 1.45 0.00 0.17 0.94 0.00 0.00 0.02 0.00 97.42
What is VMSTAT?
• Virtual memory statistics
38
vmstat Utility
Virtual Memory Statistics
vmstat 5 5
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 2 28612 131668 255192 6766272 0 0 0 148 1 3 1 0 90 8 0
0 1 28612 234736 255204 6766424 0 0 24 1480 1485 2737 2 1 48 49 0
0 2 28612 234752 255208 6766536 0 0 0 1511 1365 2632 0 0 50 50 0
1 1 28612 234752 255208 6766664 0 0 0 1399 1353 2626 0 0 50 50 0
0 2 28612 218164 255216 6766784 0 0 18 1310 1337 2591 0 0 49 51 0
top Utility
Tasks: 165 total, 1 running, 164 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.3%us, 0.2%sy, 0.0%ni, 53.5%id, 46.0%wa, 0.0%hi, 0.0%si,
0.0%st
Mem: 8057984k total, 7827928k used, 230056k free, 255324k buffers
Swap: 311292k total, 28612k used, 282680k free, 6771660k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
9888 delphix 20 0 636m 43m 16m S 0.7 0.5 51:40.68 mssql
9892 delphix 20 0 636m 43m 16m D 0.7 0.5 51:18.86 mssql
9886 delphix 20 0 652m 43m 16m S 0.3 0.6 51:19.84 mssql
1 root 20 0 19232 976 820 S 0.0 0.0 0:26.11 delcli
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root RT 0 0 0 0 S 0.0 0.0 0:09.92 migration/0
What is UPTIME?
• uptime displays current time and up-time
• Also displays the average number of processes in run-queue over the past 1 minute, 5 minutes, and
15 minutes (a.k.a. load average)
41
uptime and w Utilities
$ uptime
18:20:41 up 41 days, 17 min, 1 user, load average: 1.17, 1.28, 1.30
• w displays same info plus info about logged-in UNIX users
$ w
18:21:05 up 41 days, 17 min, 1 user, load average: 1.25, 1.29, 1.30
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
delphix pts/0 c-67-164-182-219 18:05 0.00s 0.02s 0.02s sshd: delphix
[priv]
Process Diagnostics
• ps
• Process status
• pmap
• Process mapping
• http://dbakevlar.com/2017/12/sql-server-2017-linux-processes/
• dstat
• Disk, cpu and network monitoring
• nmon
• Color coded display of cpu, disk and memory statistics
Process Diagnostics
• top
• Display “top” resource-consuming processes and totals
• Ctrl + C to exit ongoing refresh
• ps
• Process status
• pmap
• Process mapping
• dstat
• Disk, cpu and network monitoring
top Utility
Tasks: 165 total, 1 running, 164 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.3%us, 0.2%sy, 0.0%ni, 53.5%id, 46.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 8057984k total, 7827928k used, 230056k free, 255324k buffers
Swap: 311292k total, 28612k used, 282680k free, 6771660k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
9888 delphix 20 0 636m 43m 16m S 0.7 0.5 51:40.68 mssql
9892 delphix 20 0 636m 43m 16m D 0.7 0.5 51:18.86 mssql
9886 delphix 20 0 652m 43m 16m S 0.3 0.6 51:19.84 mssql
1 root 20 0 19232 976 820 S 0.0 0.0 0:26.11 delcli
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root RT 0 0 0 0 S 0.0 0.0 0:09.92 migration/0
ps Utility
• SysV version with many versions and variations:
$ ps -eaf
% ps -aux
# ps –eo opt[,opt…]
• Provides info about individual processes
• Status, PID, PPID, user, command text and parameters
• Cumulative and recent CPU usage
• Memory (virtual, resident)
ps Utility
• An easy home-grown “top” command
$ ps –eaf | sort –n | tail
root 689 2 0 Oct18 ? 00:00:00 [ext4-dio-unwrit]
root 7 2 0 Oct18 ? 00:00:12 [migration/1]
root 723 2 0 Oct18 ? 00:01:34 [kauditd]
root 781 2 0 Oct18 ? 00:00:18 [flush-253:0]
root 8 2 0 Oct18 ? 00:00:00 [stopper/1]
root 9 2 0 Oct18 ? 00:00:06 [ksoftirqd/1]
root 99 2 0 Oct18 ? 00:00:00 [kdmremove]
rpc 1101 1 0 Oct18 ? 00:00:01 rpcbind
ps Utility
• Another home-grown “top” command
• Also displays memory consumption in Kbytes
$ ps -eo user,pid,pcpu,vsz,rss,comm | sort -n | tail
root 689 0.0 0 0 ext4-dio-unwrit
root 7 0.0 0 0 migration/1
root 723 0.0 0 0 kauditd
root 781 0.0 0 0 flush-253:0
root 8 0.0 0 0 stopper/1
root 9 0.0 0 0 ksoftirqd/1
root 99 0.0 0 0 kdmremove
rpc 1101 0.0 18980 588 rpcbind
ps Utility
• Displaying environment variable values within a process
$ ps -eaf | grep jar
delphix 11313 1 0 Oct18 ? 00:23:10 /usr/java/jdk1.7.0_51/bin/java -
Djava.util.logging.config.file=/u02/app/apache-tomcat-7.0.42/conf/logging.properties -
Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -
Djava.endorsed.dirs=/u02/app/apache-tomcat-7.0.42/endorsed -classpath /u02/app/apache-
tomcat-7.0.42/bin/bootstrap.jar:/u02/app/apache-tomcat-7.0.42/bin/tomcat-juli.jar -
Dcatalina.base=/u02/app/apache-tomcat-7.0.42 -Dcatalina.home=/u02/app/apache-tomcat-7.0.42 -
Djava.io.tmpdir=/u02/app/apache-tomcat-7.0.42/temp org.apache.catalina.startup.Bootstrap
start
$ ps eww 11313
PID TTY STAT TIME COMMAND
11313 ? Sl 23:10 /usr/java/jdk1.7.0_51/bin/java -
Djava.util.logging.config.file=/u02/app/apache-tomcat-7.0.42/conf/logging.properties -
Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -
Djava.endorsed.dirs=/u02/app/apache-tomcat-7.0.42/endorsed -classpath /u02/app/apache-
tomcat-7.0.42/bin/bootstrap.jar:/u02/app/apache-tomcat-7.0.42/bin/tomcat-juli.jar -
Dcatalina.base=/u02/app/apache-tomcat-7.0.42 -Dcatalina.home=/u02/app/apache-tomcat-7.0.42 -
Djava.io.tmpdir=/u02/app/apache-tomcat-7.0.42/temp org.apache.catalina.startup.Bootstrap
start SHELL=/bin/bash TERM=xterm USER=delphix PATH=/sbin:/usr/sbin:/bin:/usr/bin PWD=/
HOME=/home/delphix SHLVL=3 LOGNAME=delphix _=/usr/java/jdk1.7.0_51/bin/java
CPU/Memory Diagnostics
• Use top and/or ps to identify process activity in Linux
• By current CPU activity
• By total CPU time consumed
• By time started
• By process name
• By UNIX account
• By process hierarchy
• parent processes, child processes, etc.
pmap Utilities Example
$ pmap -x 11313
11313: /usr/java/jdk1.7.0_51/bin/java -Djava.util.logging.config.file=/u02/app/apache-tomcat-
7.0.42/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -
Djava.endorsed.dirs=/u02/app/apache-tomcat-7.0.42/endorsed -classpath /u02/app/apache-tomcat-
7.0.42/bin/bootstrap.jar:/u02/app/apache-tomcat-7.0.42/bin/tomcat-juli.jar -Dcatalina.base=/u02/app/apache-tomcat-
7.0.42 -Dcatalina.home=/u02/app/apache-tomcat-7.0.42 -Djava.io.tmpdir=/u02/app/apache-tomcat-7.0.42/temp
org.apache.cata
Address Kbytes RSS Dirty Mode Mapping
0000000000400000 4 0 0 r-x-- java
0000000000600000 4 4 4 rw--- java
…
00007f09de9a6000 4 0 0 r--s- commons-daemon.jar
00007f09de9a7000 4 0 0 r--s- bootstrap.jar
00007f09de9a8000 32 16 12 rw-s- 11313
00007f09de9b3000 4 4 4 r---- ld-2.12.so
00007f09de9b4000 4 4 4 rw--- ld-2.12.so
00007f09de9b5000 4 4 4 rw--- [ anon ]
00007fff04ccb000 84 32 32 rw--- [ stack ]
00007fff04df6000 4 4 0 r-x-- [ anon ]
ffffffffff600000 4 0 0 r-x-- [ anon ]
---------------- ------ ------ ------
total kB 3294068 188964 186976
fuser/lsof Utilities
• Displays list of UNIX processes using file-system
$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg_linuxsource-lv_root
14600800 3135856 10720092 23% /
tmpfs 4028992 0 4028992 0% /dev/shm
/dev/xvda1 487652 132589 329463 29% /boot
/dev/xvdf 30832636 28133056 1126716 97% /u01
/dev/xvdg 20511356 4213904 15248876 22% /u02
$ fuser /dev/xvdf
/dev/xvdf: 727ctm 725ctm 723ctm 722tm 720ctom 633tom
623tom 462o 458o 456o 454o 452o 450o 448o 446o 444o
What is DSTAT?
• Monitoring tool for CPU, disk and network activity
• Displays ongoing values in interval until q(uit)
• To Install:
$ yum install dstat –y
Or
$ sudo apt-get install dstat
53
ps Utility
• SysV version with many versions and variations:
$ ps -eaf
% ps -aux
# ps –eo opt[,opt…]
• Provides info about individual processes
• Status, PID, PPID, user, command text and parameters
• Cumulative and recent CPU usage
• Memory (virtual, resident)
ps Utility
• An easy home-grown “top” command
$ ps –eaf | sort –n | tail
root 689 2 0 Oct18 ? 00:00:00 [ext4-dio-unwrit]
root 7 2 0 Oct18 ? 00:00:12 [migration/1]
root 723 2 0 Oct18 ? 00:01:34 [kauditd]
root 781 2 0 Oct18 ? 00:00:18 [flush-253:0]
root 8 2 0 Oct18 ? 00:00:00 [stopper/1]
root 9 2 0 Oct18 ? 00:00:06 [ksoftirqd/1]
root 99 2 0 Oct18 ? 00:00:00 [kdmremove]
rpc 1101 1 0 Oct18 ? 00:00:01 rpcbind
ps Utility
• Another home-grown “top” command
• Also displays memory consumption in Kbytes
$ ps -eo user,pid,pcpu,vsz,rss,comm | sort -n | tail
root 689 0.0 0 0 ext4-dio-unwrit
root 7 0.0 0 0 migration/1
root 723 0.0 0 0 kauditd
root 781 0.0 0 0 flush-253:0
root 8 0.0 0 0 stopper/1
root 9 0.0 0 0 ksoftirqd/1
root 99 0.0 0 0 kdmremove
rpc 1101 0.0 18980 588 rpcbind
ps Utility
• Displaying environment variable values within a process
$ ps -eaf | grep jar
delphix 11313 1 0 Oct18 ? 00:23:10 /usr/java/jdk1.7.0_51/bin/java -
Djava.util.logging.config.file=/u02/app/apache-tomcat-7.0.42/conf/logging.properties -
Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -
Djava.endorsed.dirs=/u02/app/apache-tomcat-7.0.42/endorsed -classpath /u02/app/apache-
tomcat-7.0.42/bin/bootstrap.jar:/u02/app/apache-tomcat-7.0.42/bin/tomcat-juli.jar -
Dcatalina.base=/u02/app/apache-tomcat-7.0.42 -Dcatalina.home=/u02/app/apache-tomcat-7.0.42 -
Djava.io.tmpdir=/u02/app/apache-tomcat-7.0.42/temp org.apache.catalina.startup.Bootstrap
start
$ ps eww 11313
PID TTY STAT TIME COMMAND
11313 ? Sl 23:10 /usr/java/jdk1.7.0_51/bin/java -
Djava.util.logging.config.file=/u02/app/apache-tomcat-7.0.42/conf/logging.properties -
Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -
Djava.endorsed.dirs=/u02/app/apache-tomcat-7.0.42/endorsed -classpath /u02/app/apache-
tomcat-7.0.42/bin/bootstrap.jar:/u02/app/apache-tomcat-7.0.42/bin/tomcat-juli.jar -
Dcatalina.base=/u02/app/apache-tomcat-7.0.42 -Dcatalina.home=/u02/app/apache-tomcat-7.0.42 -
Djava.io.tmpdir=/u02/app/apache-tomcat-7.0.42/temp org.apache.catalina.startup.Bootstrap
start SHELL=/bin/bash TERM=xterm USER=delphix PATH=/sbin:/usr/sbin:/bin:/usr/bin PWD=/
HOME=/home/delphix SHLVL=3 LOGNAME=delphix _=/usr/java/jdk1.7.0_51/bin/java
What is FINDMNT?
• A [somewhat] directory tree view of Linux
• To Install:
$ yum install findmnt –y
$ apt-get install findmnt
58
findmnt Utility
59
findmnt Utility
• findmnt -m
60
What is NCDU?
• Quick utility to gather info on space usage in a directory
• To install:
$ yum install ncdu –y
$ apt-get install ncdu
Simply execute ncdu command in directory that you wish to
gather detailed file/directory sizes on
61
ncdu Utility
62
Linux for the DBA Summary
• Learn to walk before you run
• Command line is essential
• Utilities are your friends
• A few will get you far, choose which ones provide you with what
you need.
• Build a knowledge of command line editing tools, such as VIM or
Nano and Shell scripting to enhance utilities for full coverage.
• Tough at first, but will become second nature- I promise!
63
Ready to Get Started?
Microsoft Azure account will have you on Linux in minutes.
A Linux VM or Docker Image with access to an outside network to perform
installations of tools and/or software as needed.
• Docker for Windows
• Docker for Mac
• VMWare or VirtualBox
QUESTIONS?
Coming up next…
Pods, Containers, and SQL Server--What
You Need to Know
Joey D’Antoni
THANK YOU
FOR ATTENDING
@sqlpass
#sqlpass
@PASScommunity
Presenting Sponsors
24HOP Introduction to Linux for SQL Server DBAs

More Related Content

What's hot

Running the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker ContainerRunning the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker ContainerGuido Schmutz
 
Managing Complexity at Velocity
Managing Complexity at VelocityManaging Complexity at Velocity
Managing Complexity at VelocityMatt Ray
 
Take your database source code and data under control
Take your database source code and data under controlTake your database source code and data under control
Take your database source code and data under controlMarcin Przepiórowski
 
Chef for OpenStack - OpenStack Fall 2012 Summit
Chef for OpenStack  - OpenStack Fall 2012 SummitChef for OpenStack  - OpenStack Fall 2012 Summit
Chef for OpenStack - OpenStack Fall 2012 SummitMatt Ray
 
Introduction to Stacki - World's fastest Linux server provisioning Tool
Introduction to Stacki - World's fastest Linux server provisioning ToolIntroduction to Stacki - World's fastest Linux server provisioning Tool
Introduction to Stacki - World's fastest Linux server provisioning ToolSuresh Paulraj
 
OpenStack Deployments with Chef
OpenStack Deployments with ChefOpenStack Deployments with Chef
OpenStack Deployments with ChefMatt Ray
 
Develop with linux containers and docker
Develop with linux containers and dockerDevelop with linux containers and docker
Develop with linux containers and dockerFabio Fumarola
 
Bee con2016 presentation_20160125004_installing
Bee con2016 presentation_20160125004_installingBee con2016 presentation_20160125004_installing
Bee con2016 presentation_20160125004_installingAngel Borroy López
 
Creating PostgreSQL-as-a-Service at Scale
Creating PostgreSQL-as-a-Service at ScaleCreating PostgreSQL-as-a-Service at Scale
Creating PostgreSQL-as-a-Service at ScaleSean Chittenden
 
Chef & OpenStack: OSCON 2014
Chef & OpenStack: OSCON 2014Chef & OpenStack: OSCON 2014
Chef & OpenStack: OSCON 2014Matt Ray
 
Ef09 installing-alfresco-components-1-by-1
Ef09 installing-alfresco-components-1-by-1Ef09 installing-alfresco-components-1-by-1
Ef09 installing-alfresco-components-1-by-1Angel Borroy López
 
Docker在豆瓣的实践 刘天伟-20160709
Docker在豆瓣的实践 刘天伟-20160709Docker在豆瓣的实践 刘天伟-20160709
Docker在豆瓣的实践 刘天伟-20160709Tianwei Liu
 
Australian OpenStack User Group August 2012: Chef for OpenStack
Australian OpenStack User Group August 2012: Chef for OpenStackAustralian OpenStack User Group August 2012: Chef for OpenStack
Australian OpenStack User Group August 2012: Chef for OpenStackMatt Ray
 
Supercharging Content Delivery with Varnish
Supercharging Content Delivery with VarnishSupercharging Content Delivery with Varnish
Supercharging Content Delivery with VarnishSamantha Quiñones
 
Lucene/Solr 8: The Next Major Release Steve Rowe, Lucidworks
Lucene/Solr 8: The Next Major Release Steve Rowe, LucidworksLucene/Solr 8: The Next Major Release Steve Rowe, Lucidworks
Lucene/Solr 8: The Next Major Release Steve Rowe, LucidworksLucidworks
 
PostgreSQL and Linux Containers
PostgreSQL and Linux ContainersPostgreSQL and Linux Containers
PostgreSQL and Linux ContainersJignesh Shah
 
Practical introduction to dev ops with chef
Practical introduction to dev ops with chefPractical introduction to dev ops with chef
Practical introduction to dev ops with chefLeanDog
 
Alfresco Security Best Practices 2012
Alfresco Security Best Practices 2012Alfresco Security Best Practices 2012
Alfresco Security Best Practices 2012Toni de la Fuente
 
[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at Nuxeo[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at NuxeoNuxeo
 
Docker for PHP Developers - ZendCon 2016
Docker for PHP Developers - ZendCon 2016Docker for PHP Developers - ZendCon 2016
Docker for PHP Developers - ZendCon 2016Chris Tankersley
 

What's hot (20)

Running the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker ContainerRunning the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker Container
 
Managing Complexity at Velocity
Managing Complexity at VelocityManaging Complexity at Velocity
Managing Complexity at Velocity
 
Take your database source code and data under control
Take your database source code and data under controlTake your database source code and data under control
Take your database source code and data under control
 
Chef for OpenStack - OpenStack Fall 2012 Summit
Chef for OpenStack  - OpenStack Fall 2012 SummitChef for OpenStack  - OpenStack Fall 2012 Summit
Chef for OpenStack - OpenStack Fall 2012 Summit
 
Introduction to Stacki - World's fastest Linux server provisioning Tool
Introduction to Stacki - World's fastest Linux server provisioning ToolIntroduction to Stacki - World's fastest Linux server provisioning Tool
Introduction to Stacki - World's fastest Linux server provisioning Tool
 
OpenStack Deployments with Chef
OpenStack Deployments with ChefOpenStack Deployments with Chef
OpenStack Deployments with Chef
 
Develop with linux containers and docker
Develop with linux containers and dockerDevelop with linux containers and docker
Develop with linux containers and docker
 
Bee con2016 presentation_20160125004_installing
Bee con2016 presentation_20160125004_installingBee con2016 presentation_20160125004_installing
Bee con2016 presentation_20160125004_installing
 
Creating PostgreSQL-as-a-Service at Scale
Creating PostgreSQL-as-a-Service at ScaleCreating PostgreSQL-as-a-Service at Scale
Creating PostgreSQL-as-a-Service at Scale
 
Chef & OpenStack: OSCON 2014
Chef & OpenStack: OSCON 2014Chef & OpenStack: OSCON 2014
Chef & OpenStack: OSCON 2014
 
Ef09 installing-alfresco-components-1-by-1
Ef09 installing-alfresco-components-1-by-1Ef09 installing-alfresco-components-1-by-1
Ef09 installing-alfresco-components-1-by-1
 
Docker在豆瓣的实践 刘天伟-20160709
Docker在豆瓣的实践 刘天伟-20160709Docker在豆瓣的实践 刘天伟-20160709
Docker在豆瓣的实践 刘天伟-20160709
 
Australian OpenStack User Group August 2012: Chef for OpenStack
Australian OpenStack User Group August 2012: Chef for OpenStackAustralian OpenStack User Group August 2012: Chef for OpenStack
Australian OpenStack User Group August 2012: Chef for OpenStack
 
Supercharging Content Delivery with Varnish
Supercharging Content Delivery with VarnishSupercharging Content Delivery with Varnish
Supercharging Content Delivery with Varnish
 
Lucene/Solr 8: The Next Major Release Steve Rowe, Lucidworks
Lucene/Solr 8: The Next Major Release Steve Rowe, LucidworksLucene/Solr 8: The Next Major Release Steve Rowe, Lucidworks
Lucene/Solr 8: The Next Major Release Steve Rowe, Lucidworks
 
PostgreSQL and Linux Containers
PostgreSQL and Linux ContainersPostgreSQL and Linux Containers
PostgreSQL and Linux Containers
 
Practical introduction to dev ops with chef
Practical introduction to dev ops with chefPractical introduction to dev ops with chef
Practical introduction to dev ops with chef
 
Alfresco Security Best Practices 2012
Alfresco Security Best Practices 2012Alfresco Security Best Practices 2012
Alfresco Security Best Practices 2012
 
[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at Nuxeo[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at Nuxeo
 
Docker for PHP Developers - ZendCon 2016
Docker for PHP Developers - ZendCon 2016Docker for PHP Developers - ZendCon 2016
Docker for PHP Developers - ZendCon 2016
 

Similar to 24HOP Introduction to Linux for SQL Server DBAs

PowerShellForDBDevelopers
PowerShellForDBDevelopersPowerShellForDBDevelopers
PowerShellForDBDevelopersBryan Cafferky
 
Asian Spirit 3 Day Dba On Ubl
Asian Spirit 3 Day Dba On UblAsian Spirit 3 Day Dba On Ubl
Asian Spirit 3 Day Dba On Ublnewrforce
 
Linux Training For Beginners | Linux Administration Tutorial | Introduction T...
Linux Training For Beginners | Linux Administration Tutorial | Introduction T...Linux Training For Beginners | Linux Administration Tutorial | Introduction T...
Linux Training For Beginners | Linux Administration Tutorial | Introduction T...Edureka!
 
PowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue KidPowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue KidMatthew Johnson
 
Linux Desktop Operation - Session 1
Linux Desktop Operation - Session 1Linux Desktop Operation - Session 1
Linux Desktop Operation - Session 1Arash Foroughi
 
Linux: Everyting-as-a-service
Linux: Everyting-as-a-serviceLinux: Everyting-as-a-service
Linux: Everyting-as-a-serviceRohit Sansiya
 
Topic 3-1_More_Linux_Commands.pptx
Topic 3-1_More_Linux_Commands.pptxTopic 3-1_More_Linux_Commands.pptx
Topic 3-1_More_Linux_Commands.pptxdulala3
 
DevOpsDays InSpec Workshop
DevOpsDays InSpec WorkshopDevOpsDays InSpec Workshop
DevOpsDays InSpec WorkshopMandi Walls
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014biicode
 
Comandos linux bash, f2 linux pesquisa, http://f2linux.wordpress.com
Comandos linux bash,  f2 linux pesquisa, http://f2linux.wordpress.comComandos linux bash,  f2 linux pesquisa, http://f2linux.wordpress.com
Comandos linux bash, f2 linux pesquisa, http://f2linux.wordpress.comWlademir RS
 
17 Linux Basics #burningkeyboards
17 Linux Basics #burningkeyboards17 Linux Basics #burningkeyboards
17 Linux Basics #burningkeyboardsDenis Ristic
 
Environment for training models
Environment for training modelsEnvironment for training models
Environment for training modelsFlyElephant
 
Linux containers and docker
Linux containers and dockerLinux containers and docker
Linux containers and dockerFabio Fumarola
 
Surviving OS X as a Windows Admin
Surviving OS X as a Windows AdminSurviving OS X as a Windows Admin
Surviving OS X as a Windows AdminDell World
 
Oracle11g On Fedora14
Oracle11g On Fedora14Oracle11g On Fedora14
Oracle11g On Fedora14kmsa
 

Similar to 24HOP Introduction to Linux for SQL Server DBAs (20)

3. introduction of centos
3. introduction of centos3. introduction of centos
3. introduction of centos
 
Linux
Linux Linux
Linux
 
PowerShellForDBDevelopers
PowerShellForDBDevelopersPowerShellForDBDevelopers
PowerShellForDBDevelopers
 
Asian Spirit 3 Day Dba On Ubl
Asian Spirit 3 Day Dba On UblAsian Spirit 3 Day Dba On Ubl
Asian Spirit 3 Day Dba On Ubl
 
Linux Training For Beginners | Linux Administration Tutorial | Introduction T...
Linux Training For Beginners | Linux Administration Tutorial | Introduction T...Linux Training For Beginners | Linux Administration Tutorial | Introduction T...
Linux Training For Beginners | Linux Administration Tutorial | Introduction T...
 
PowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue KidPowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue Kid
 
Linux Desktop Operation - Session 1
Linux Desktop Operation - Session 1Linux Desktop Operation - Session 1
Linux Desktop Operation - Session 1
 
Linux: Everyting-as-a-service
Linux: Everyting-as-a-serviceLinux: Everyting-as-a-service
Linux: Everyting-as-a-service
 
Topic 3-1_More_Linux_Commands.pptx
Topic 3-1_More_Linux_Commands.pptxTopic 3-1_More_Linux_Commands.pptx
Topic 3-1_More_Linux_Commands.pptx
 
DevOpsDays InSpec Workshop
DevOpsDays InSpec WorkshopDevOpsDays InSpec Workshop
DevOpsDays InSpec Workshop
 
linux installation.pdf
linux installation.pdflinux installation.pdf
linux installation.pdf
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
Comandos linux bash, f2 linux pesquisa, http://f2linux.wordpress.com
Comandos linux bash,  f2 linux pesquisa, http://f2linux.wordpress.comComandos linux bash,  f2 linux pesquisa, http://f2linux.wordpress.com
Comandos linux bash, f2 linux pesquisa, http://f2linux.wordpress.com
 
File000127
File000127File000127
File000127
 
17 Linux Basics #burningkeyboards
17 Linux Basics #burningkeyboards17 Linux Basics #burningkeyboards
17 Linux Basics #burningkeyboards
 
Environment for training models
Environment for training modelsEnvironment for training models
Environment for training models
 
Linux containers and docker
Linux containers and dockerLinux containers and docker
Linux containers and docker
 
Surviving OS X as a Windows Admin
Surviving OS X as a Windows AdminSurviving OS X as a Windows Admin
Surviving OS X as a Windows Admin
 
Linux basic
Linux basicLinux basic
Linux basic
 
Oracle11g On Fedora14
Oracle11g On Fedora14Oracle11g On Fedora14
Oracle11g On Fedora14
 

More from Kellyn Pot'Vin-Gorman

Redgate_summit_atl_kgorman_intersection.pptx
Redgate_summit_atl_kgorman_intersection.pptxRedgate_summit_atl_kgorman_intersection.pptx
Redgate_summit_atl_kgorman_intersection.pptxKellyn Pot'Vin-Gorman
 
SQLSatOregon_kgorman_keynote_NIAIMLEC.pptx
SQLSatOregon_kgorman_keynote_NIAIMLEC.pptxSQLSatOregon_kgorman_keynote_NIAIMLEC.pptx
SQLSatOregon_kgorman_keynote_NIAIMLEC.pptxKellyn Pot'Vin-Gorman
 
Turning ADHD into "Awesome Dynamic Highly Dependable"
Turning ADHD into "Awesome Dynamic Highly Dependable"Turning ADHD into "Awesome Dynamic Highly Dependable"
Turning ADHD into "Awesome Dynamic Highly Dependable"Kellyn Pot'Vin-Gorman
 
Cepta The Future of Data with Power BI
Cepta The Future of Data with Power BICepta The Future of Data with Power BI
Cepta The Future of Data with Power BIKellyn Pot'Vin-Gorman
 
Pass Summit Linux Scripting for the Microsoft Professional
Pass Summit Linux Scripting for the Microsoft ProfessionalPass Summit Linux Scripting for the Microsoft Professional
Pass Summit Linux Scripting for the Microsoft ProfessionalKellyn Pot'Vin-Gorman
 
Power BI with Essbase in the Oracle Cloud
Power BI with Essbase in the Oracle CloudPower BI with Essbase in the Oracle Cloud
Power BI with Essbase in the Oracle CloudKellyn Pot'Vin-Gorman
 
ODTUG Leadership Talk- WIT and Sponsorship
ODTUG Leadership Talk-  WIT and SponsorshipODTUG Leadership Talk-  WIT and Sponsorship
ODTUG Leadership Talk- WIT and SponsorshipKellyn Pot'Vin-Gorman
 
DevOps and Decoys How to Build a Successful Microsoft DevOps Including the Data
DevOps and Decoys  How to Build a Successful Microsoft DevOps Including the DataDevOps and Decoys  How to Build a Successful Microsoft DevOps Including the Data
DevOps and Decoys How to Build a Successful Microsoft DevOps Including the DataKellyn Pot'Vin-Gorman
 

More from Kellyn Pot'Vin-Gorman (20)

Redgate_summit_atl_kgorman_intersection.pptx
Redgate_summit_atl_kgorman_intersection.pptxRedgate_summit_atl_kgorman_intersection.pptx
Redgate_summit_atl_kgorman_intersection.pptx
 
SQLSatOregon_kgorman_keynote_NIAIMLEC.pptx
SQLSatOregon_kgorman_keynote_NIAIMLEC.pptxSQLSatOregon_kgorman_keynote_NIAIMLEC.pptx
SQLSatOregon_kgorman_keynote_NIAIMLEC.pptx
 
Boston_sql_kegorman_highIO.pptx
Boston_sql_kegorman_highIO.pptxBoston_sql_kegorman_highIO.pptx
Boston_sql_kegorman_highIO.pptx
 
Oracle on Azure IaaS 2023 Update
Oracle on Azure IaaS 2023 UpdateOracle on Azure IaaS 2023 Update
Oracle on Azure IaaS 2023 Update
 
IaaS for DBAs in Azure
IaaS for DBAs in AzureIaaS for DBAs in Azure
IaaS for DBAs in Azure
 
Being Successful with ADHD
Being Successful with ADHDBeing Successful with ADHD
Being Successful with ADHD
 
Azure DBA with IaaS
Azure DBA with IaaSAzure DBA with IaaS
Azure DBA with IaaS
 
Turning ADHD into "Awesome Dynamic Highly Dependable"
Turning ADHD into "Awesome Dynamic Highly Dependable"Turning ADHD into "Awesome Dynamic Highly Dependable"
Turning ADHD into "Awesome Dynamic Highly Dependable"
 
PASS Summit 2020
PASS Summit 2020PASS Summit 2020
PASS Summit 2020
 
DevOps in Silos
DevOps in SilosDevOps in Silos
DevOps in Silos
 
Azure Databases with IaaS
Azure Databases with IaaSAzure Databases with IaaS
Azure Databases with IaaS
 
How to Win When Migrating to Azure
How to Win When Migrating to AzureHow to Win When Migrating to Azure
How to Win When Migrating to Azure
 
Securing Power BI Data
Securing Power BI DataSecuring Power BI Data
Securing Power BI Data
 
Cepta The Future of Data with Power BI
Cepta The Future of Data with Power BICepta The Future of Data with Power BI
Cepta The Future of Data with Power BI
 
Pass Summit Linux Scripting for the Microsoft Professional
Pass Summit Linux Scripting for the Microsoft ProfessionalPass Summit Linux Scripting for the Microsoft Professional
Pass Summit Linux Scripting for the Microsoft Professional
 
Taming the shrew Power BI
Taming the shrew Power BITaming the shrew Power BI
Taming the shrew Power BI
 
Power BI with Essbase in the Oracle Cloud
Power BI with Essbase in the Oracle CloudPower BI with Essbase in the Oracle Cloud
Power BI with Essbase in the Oracle Cloud
 
ODTUG Leadership Talk- WIT and Sponsorship
ODTUG Leadership Talk-  WIT and SponsorshipODTUG Leadership Talk-  WIT and Sponsorship
ODTUG Leadership Talk- WIT and Sponsorship
 
DevOps and Decoys How to Build a Successful Microsoft DevOps Including the Data
DevOps and Decoys  How to Build a Successful Microsoft DevOps Including the DataDevOps and Decoys  How to Build a Successful Microsoft DevOps Including the Data
DevOps and Decoys How to Build a Successful Microsoft DevOps Including the Data
 
GDPR- The Buck Stops Here
GDPR-  The Buck Stops HereGDPR-  The Buck Stops Here
GDPR- The Buck Stops Here
 

Recently uploaded

The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 

Recently uploaded (20)

The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 

24HOP Introduction to Linux for SQL Server DBAs

  • 1. Presenting Sponsors Essential Linux for the DBA Kellyn Pot'Vin-Gorman, Technical Intelligence Manager, Delphix, Inc. Moderated By: Andy Yun
  • 2. If you require assistance during the session, type your inquiry into the question pane on the right side. Maximize your screen with the zoom button on the top of the presentation window. Please fill in the short evaluation following the session. It will appear in your web browser. Technical Assistance
  • 3. Thank You to Our Presenting Sponsors Supporting Sponsor Quest helps IT Professionals simplify administration tasks so they can focus on the evolving needs of their businesses. Combined with its commitment to help companies protect today’s investment while planning for the future, Quest continues to deliver the most comprehensive solutions to monitor, manage, protect and replicate database environments Empower users with new insights through familiar tools while balancing the need for IT to monitor and manage user created content. Deliver access to all data types across structured and unstructured sources. IDERA designs powerful software with one goal in mind – to solve customers’ most complex challenges with easy-to-use solutions. IDERA’s award- winning SQL Server database solutions and multi- platform database, application and cloud monitoring tools ensure your business never slows down. SentryOne empowers Microsoft data professionals to achieve breakthrough performance across physical, virtual and cloud environments. We develop solutions to monitor, diagnose, and optimize SQL Server performance, including Plan Explorer, the query-tuning tool with more than 100,000 downloads.
  • 4. Attend PASS Summit to Grow Your Career The Community PASS Summit is the largest conference for technical professionals who leverage the Microsoft Data Platform. November 6-9 | Seattle, WA PASSsummit.com Connect with a global network of 250,000+ data professionals
  • 5. B Speaker Speaker numerous technical conferences for Oracle, Big Data, DevOps Testing and SQL Server Kellyn Pot’vin-Gorman Member of the Oak Table Network dbakevlar.com @DBAKevlar linkedin.com/in/kellynpotvin Oracle ACE Director alumnus Technical Intelligence Manager at Delphix
  • 6. Presenting Sponsors Essential Linux for the DBA Kellyn Pot'Vin-Gorman, Technical Intelligence Manager, Delphix, Inc.
  • 7. So SQL Server Has Come to the World of Linux There’s a lot to learn about Linux… Learning how to: • Navigate • Manage • Gather information • Monitor
  • 8. But You Need to Learn to Walk Before You Run.. 8
  • 9. History Lesson • 1991 project by Linus Torvalds from Finland to create free operating system kernel. • Based on C programming • Almost was named Freax • Now all part of the GNU Project • Debian, Redhat, Oracle Linux, Ubuntu, Suse are all flavors of Linux. • Microsoft introduces SQL Server on Linux in version 2017 beta 9
  • 10. Accessing a Linux Host • Most Common Tools • Putty, (free download) • Terminal, (MAC) • Docker or VM image with terminal via Linux console. • SSH, (Secure Shell) ssh OSUsername@<hostname or IP address> 10
  • 11. User, Groups and Penguins, Oh My! • Don’t do everything as ROOT, (aka super user) • Perform administrator tasks by using SUDO, (switch user domain owner) • Log in as with your own user ID and su, (switch user) to the application owner. • There is a UID, (User ID) for every user name. • Each user is assigned a group(s) for role hierarchy • A home directory will contain the following: • Profile, (RC) with environment variables, alias’ and other necessary configurations for the user environment. 11
  • 12. RC and Profiles • RC file stands for Run Commands • Profile is similar, but set up as a secondary set of profile settings, including: • Shell to be used • Alias’ • Environment variables • Path information • File name begins with a “.” • View with command ls -la .bashrc .bash_rc .profile .profile_xx 12
  • 13. Example of a profile #/! /usr/bin/sh EDITOR=nano # EDITOR=vi sudo visudo export PATH = $PATH:. # export ORACLE_HOME=/u01/app/oracle/dbhome_1/db12c export SQL_HOME=/u01/app/mssql/140 export LANG=en.UTF-8 export JAVA_HOME=/usr/bin/java # alias info alias reload=’source ~/.bash_profile’ alias pre-‘open -a Preview’ alias cd.. =’cd ..’ 13
  • 14. Creating Users • Useradd has different results than adduser, but both work. • Useradd will require you to: • Manually update the password with passwd <username> • Manually assign a group with usermod after creating a manual group with groupadd command • If you wish to add any pertinent information about the user, that must be added manually. A user should be created for every user logging in. Don’t share logins. Avoid non-audited, such as direct ROOT access. Grant SUDO with great care. Grant SU to only those that require it. 14
  • 15. SU and SUDO • To switch to from existing user to become jsmith: $ su – jsmith • To execute a command as ROOT after being granted SUDO privileges $ sudo setsys.sh –y 15
  • 16. Understanding File Permissions Where this can be confusing for some, is that we visibly identify the grants by their values, either as separate values or as totals. • Read,(r)= 4 • Write,(w)= 2 • Execute, (x)=1 • owner has 4+2+1=7 • group has 4+2+1=7 • other has 4+2+1=7 16
  • 17. Changing Permissions • CHMOD= change modify $ chmod <filename> XXX $ chmod test.txt 764 • Owner- read, write, execute • Group- read, write • Other- read You must have permissions to update the permissions or must SU/SUDO to perform them: $ sudo chmod test.txt 764 17
  • 18. Changing File Owner • CHOWN = change owner $ chown <newuser>:<group> <filename> $ chown jsmith:dba test.sh • You must have privileges or own the file to begin with to change the ownership. 18
  • 19. Basics What Command Common Change Diretory cd cd, cd .. ,cd /directory path List or Directory information ls ls, ls –lf, ls –la Locate program find <program name> find java, find sql Locate which installation used which <program name> which mssql Current Directory pwd pwd Create Directory mkdir mkdir scripts mkdir /u01/apps/scripts Create File touch <filename>, vim <filename> touch test.sh Edit File vim <filename>, vi <filename> vim touch.sh Remove rm <filename> rm touch.sh ** rmdir 19
  • 20. Processes • Ps command $ ps $ ps –ef To Kill a process, (BECAREFUL!) $ kill <PID> 20
  • 21. Editors • VI/VIM makes you cool- old school • Nano • eMacs • Create a file easily by issuing the touch command $ touch <filename> 21
  • 22. VI(M) Command line editor $ vi <filename> • Go down a line: j • Go up a line: k • Go to the right: l • Go to the left: h • Insert: i • Append: a • Append to the end of a line: a • Add a line and insert below your cursor: o 22 Add a line and insert ABOVE your cursor: <shft> o Undo: u Quit without saving: :q Quit without saving to a read only file: :q! Write to a file: :w Write to a read only file, (override): :w! Write to a file and quit: :wq Write to a read only file, (override) and quit: :wq!
  • 23. Redirecting Data Output to a File • $ <command> > <filename> $ ls > filelist.txt $ ls >> filelist.txt • If run again with the “>>”, the results will be appended to the first file’s contents. 23
  • 24. Running an Update on Linux • Updates and Installations are done most often via Yum, APT-GET or Zypper • Using APT-GET • Update from repository, (stored in $ apt-get update • Install updates, (may require SUDO) $ apt-get install 24
  • 25. Adding Utilities is Done via Packages • Common Installers for Linux • YUM • APT-GET • ZYPPER Installing a package with APT-GET $ sudo apt-get install –y <pkgname> Viewing package information: $apt-cache pkgname <pkgname> Display package information: $apt-cache show <pkgname> 25
  • 26. Cheat Sheets for Common Installers • Yum: https://access.redhat.com/articles/yum-cheat-sheet • Apt-Get https://blog.packagecloud.io/eng/2015/03/30/apt-cheat- sheet/ • Zypper: https://en.opensuse.org/images/1/17/Zypper-cheat-sheet- 1.pdf 26
  • 27. Mission Impossible • Initial Powershell for Linux: https://github.com/PowerShell/PowerShell • BASH, (Born again shell) • KSHELL, (Korn Shell) • CSHELL, (based off C) • Shell scripting is very similar in each of these languages and very different from Powershell. 27
  • 28. Linux system-level diagnostics • CPU and Memory • Process • Network • Other useful Linux diagnostic utilities • Support recommended diagnostic tools • A great source of living technical information
  • 29. Utilities to View Resource Usage • SAR • SADC/SADF • MPSTAT • VMSTAT • TOP 29
  • 30. Common Arguments and Values • Some of the utilities aren’t standard and may need to be installed. • Yum and apt-get are your friend • You may require sudo, (super user) privileges to install • <command> -x(xx) • Arguments are cap sensitive, (as is everything in Unix world.) • <command> -x 5 5 • First how many second sleep, Second value is how many results to return • <command> -h • Provides help information about the utility or command 30
  • 31. What is SAR? • System Activity Report • Provides information about • CPU • Memory and virtual memory • I/O • Network • Provided by the SYSSTAT package • What if it’s missing? • Install it as root: $yum -y install sysstat $apt-get install sysstat 31
  • 32. sar Utility • CPU utilization: sar -u • %usr, %sys, %idle • %nice • Intervals of CPU: sar 1 3 • 3 times, every 1 second • CPU run queue report: sar -q • Runq-sz • plist-sz and load averages • Context switching activity: sar -w • cswch/s • Virtual memory swapping: sar -W • swpin/s, swpot/s • Virtual memory paging: sar -B • pgpgin/s, pgpgot/s
  • 33. sar Utility $ sar -u 5 5 Linux 2.6.32-573.22.1.el6.x86_64 (linuxsource.delphix.local) 11/28/2017 _x86_64_ (2 CPU) 06:15:31 PM CPU %user %nice %system %iowait %steal %idle 06:15:36 PM all 0.20 0.00 0.20 48.58 0.00 51.01 06:15:41 PM all 0.30 0.00 0.20 47.98 0.10 51.41 06:15:46 PM all 0.30 0.00 0.20 46.92 0.00 52.58 06:15:51 PM all 0.20 0.00 0.20 47.77 0.00 51.82 06:15:56 PM all 0.20 0.00 0.20 47.78 0.10 51.72 Average: all 0.24 0.00 0.20 47.81 0.04 51.71
  • 34. sar Utility $ sar -q 5 5 Linux 2.6.32-573.22.1.el6.x86_64 (linuxsource.delphix.local) 11/28/2017 _x86_64_ (2 CPU) 06:16:45 PM runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15 06:16:50 PM 0 190 1.37 1.28 1.30 06:16:55 PM 0 190 1.34 1.28 1.29 06:17:00 PM 0 190 1.31 1.27 1.29 06:17:05 PM 0 190 1.36 1.29 1.30 06:17:10 PM 0 190 1.34 1.28 1.30 Average: 0 190 1.34 1.28 1.30
  • 35. What is SADC/SADF? • sadc: back-end system activity data collector utility behind sar • Collects specified system data at configured intervals • Saves data to specified binary files • sadf: system activity data formatter • report on data collected by sadc/sar • output to be consumed by other programs like awk, MS-Excel, etc • Options for translating and displaying dates, numbers, text • Output to plain text or XML
  • 36. What is MPSTAT? • Reports processor level statistics 36
  • 37. mpstat utility Processor Level Statisitcs $ mpstat –P ALL Linux 2.6.32-573.22.1.el6.x86_64 (linuxsource.delphix.local) 11/28/2017 _x86_64_ (2 CPU) 06:18:10 PM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle 06:18:10 PM all 1.42 0.00 0.19 8.01 0.00 0.00 0.02 0.00 90.36 06:18:10 PM 0 1.38 0.00 0.21 15.10 0.00 0.00 0.02 0.00 83.29 06:18:10 PM 1 1.45 0.00 0.17 0.94 0.00 0.00 0.02 0.00 97.42
  • 38. What is VMSTAT? • Virtual memory statistics 38
  • 39. vmstat Utility Virtual Memory Statistics vmstat 5 5 procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu----- r b swpd free buff cache si so bi bo in cs us sy id wa st 0 2 28612 131668 255192 6766272 0 0 0 148 1 3 1 0 90 8 0 0 1 28612 234736 255204 6766424 0 0 24 1480 1485 2737 2 1 48 49 0 0 2 28612 234752 255208 6766536 0 0 0 1511 1365 2632 0 0 50 50 0 1 1 28612 234752 255208 6766664 0 0 0 1399 1353 2626 0 0 50 50 0 0 2 28612 218164 255216 6766784 0 0 18 1310 1337 2591 0 0 49 51 0
  • 40. top Utility Tasks: 165 total, 1 running, 164 sleeping, 0 stopped, 0 zombie Cpu(s): 0.3%us, 0.2%sy, 0.0%ni, 53.5%id, 46.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 8057984k total, 7827928k used, 230056k free, 255324k buffers Swap: 311292k total, 28612k used, 282680k free, 6771660k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 9888 delphix 20 0 636m 43m 16m S 0.7 0.5 51:40.68 mssql 9892 delphix 20 0 636m 43m 16m D 0.7 0.5 51:18.86 mssql 9886 delphix 20 0 652m 43m 16m S 0.3 0.6 51:19.84 mssql 1 root 20 0 19232 976 820 S 0.0 0.0 0:26.11 delcli 2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd 3 root RT 0 0 0 0 S 0.0 0.0 0:09.92 migration/0
  • 41. What is UPTIME? • uptime displays current time and up-time • Also displays the average number of processes in run-queue over the past 1 minute, 5 minutes, and 15 minutes (a.k.a. load average) 41
  • 42. uptime and w Utilities $ uptime 18:20:41 up 41 days, 17 min, 1 user, load average: 1.17, 1.28, 1.30 • w displays same info plus info about logged-in UNIX users $ w 18:21:05 up 41 days, 17 min, 1 user, load average: 1.25, 1.29, 1.30 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT delphix pts/0 c-67-164-182-219 18:05 0.00s 0.02s 0.02s sshd: delphix [priv]
  • 43. Process Diagnostics • ps • Process status • pmap • Process mapping • http://dbakevlar.com/2017/12/sql-server-2017-linux-processes/ • dstat • Disk, cpu and network monitoring • nmon • Color coded display of cpu, disk and memory statistics
  • 44. Process Diagnostics • top • Display “top” resource-consuming processes and totals • Ctrl + C to exit ongoing refresh • ps • Process status • pmap • Process mapping • dstat • Disk, cpu and network monitoring
  • 45. top Utility Tasks: 165 total, 1 running, 164 sleeping, 0 stopped, 0 zombie Cpu(s): 0.3%us, 0.2%sy, 0.0%ni, 53.5%id, 46.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 8057984k total, 7827928k used, 230056k free, 255324k buffers Swap: 311292k total, 28612k used, 282680k free, 6771660k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 9888 delphix 20 0 636m 43m 16m S 0.7 0.5 51:40.68 mssql 9892 delphix 20 0 636m 43m 16m D 0.7 0.5 51:18.86 mssql 9886 delphix 20 0 652m 43m 16m S 0.3 0.6 51:19.84 mssql 1 root 20 0 19232 976 820 S 0.0 0.0 0:26.11 delcli 2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd 3 root RT 0 0 0 0 S 0.0 0.0 0:09.92 migration/0
  • 46. ps Utility • SysV version with many versions and variations: $ ps -eaf % ps -aux # ps –eo opt[,opt…] • Provides info about individual processes • Status, PID, PPID, user, command text and parameters • Cumulative and recent CPU usage • Memory (virtual, resident)
  • 47. ps Utility • An easy home-grown “top” command $ ps –eaf | sort –n | tail root 689 2 0 Oct18 ? 00:00:00 [ext4-dio-unwrit] root 7 2 0 Oct18 ? 00:00:12 [migration/1] root 723 2 0 Oct18 ? 00:01:34 [kauditd] root 781 2 0 Oct18 ? 00:00:18 [flush-253:0] root 8 2 0 Oct18 ? 00:00:00 [stopper/1] root 9 2 0 Oct18 ? 00:00:06 [ksoftirqd/1] root 99 2 0 Oct18 ? 00:00:00 [kdmremove] rpc 1101 1 0 Oct18 ? 00:00:01 rpcbind
  • 48. ps Utility • Another home-grown “top” command • Also displays memory consumption in Kbytes $ ps -eo user,pid,pcpu,vsz,rss,comm | sort -n | tail root 689 0.0 0 0 ext4-dio-unwrit root 7 0.0 0 0 migration/1 root 723 0.0 0 0 kauditd root 781 0.0 0 0 flush-253:0 root 8 0.0 0 0 stopper/1 root 9 0.0 0 0 ksoftirqd/1 root 99 0.0 0 0 kdmremove rpc 1101 0.0 18980 588 rpcbind
  • 49. ps Utility • Displaying environment variable values within a process $ ps -eaf | grep jar delphix 11313 1 0 Oct18 ? 00:23:10 /usr/java/jdk1.7.0_51/bin/java - Djava.util.logging.config.file=/u02/app/apache-tomcat-7.0.42/conf/logging.properties - Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager - Djava.endorsed.dirs=/u02/app/apache-tomcat-7.0.42/endorsed -classpath /u02/app/apache- tomcat-7.0.42/bin/bootstrap.jar:/u02/app/apache-tomcat-7.0.42/bin/tomcat-juli.jar - Dcatalina.base=/u02/app/apache-tomcat-7.0.42 -Dcatalina.home=/u02/app/apache-tomcat-7.0.42 - Djava.io.tmpdir=/u02/app/apache-tomcat-7.0.42/temp org.apache.catalina.startup.Bootstrap start $ ps eww 11313 PID TTY STAT TIME COMMAND 11313 ? Sl 23:10 /usr/java/jdk1.7.0_51/bin/java - Djava.util.logging.config.file=/u02/app/apache-tomcat-7.0.42/conf/logging.properties - Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager - Djava.endorsed.dirs=/u02/app/apache-tomcat-7.0.42/endorsed -classpath /u02/app/apache- tomcat-7.0.42/bin/bootstrap.jar:/u02/app/apache-tomcat-7.0.42/bin/tomcat-juli.jar - Dcatalina.base=/u02/app/apache-tomcat-7.0.42 -Dcatalina.home=/u02/app/apache-tomcat-7.0.42 - Djava.io.tmpdir=/u02/app/apache-tomcat-7.0.42/temp org.apache.catalina.startup.Bootstrap start SHELL=/bin/bash TERM=xterm USER=delphix PATH=/sbin:/usr/sbin:/bin:/usr/bin PWD=/ HOME=/home/delphix SHLVL=3 LOGNAME=delphix _=/usr/java/jdk1.7.0_51/bin/java
  • 50. CPU/Memory Diagnostics • Use top and/or ps to identify process activity in Linux • By current CPU activity • By total CPU time consumed • By time started • By process name • By UNIX account • By process hierarchy • parent processes, child processes, etc.
  • 51. pmap Utilities Example $ pmap -x 11313 11313: /usr/java/jdk1.7.0_51/bin/java -Djava.util.logging.config.file=/u02/app/apache-tomcat- 7.0.42/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager - Djava.endorsed.dirs=/u02/app/apache-tomcat-7.0.42/endorsed -classpath /u02/app/apache-tomcat- 7.0.42/bin/bootstrap.jar:/u02/app/apache-tomcat-7.0.42/bin/tomcat-juli.jar -Dcatalina.base=/u02/app/apache-tomcat- 7.0.42 -Dcatalina.home=/u02/app/apache-tomcat-7.0.42 -Djava.io.tmpdir=/u02/app/apache-tomcat-7.0.42/temp org.apache.cata Address Kbytes RSS Dirty Mode Mapping 0000000000400000 4 0 0 r-x-- java 0000000000600000 4 4 4 rw--- java … 00007f09de9a6000 4 0 0 r--s- commons-daemon.jar 00007f09de9a7000 4 0 0 r--s- bootstrap.jar 00007f09de9a8000 32 16 12 rw-s- 11313 00007f09de9b3000 4 4 4 r---- ld-2.12.so 00007f09de9b4000 4 4 4 rw--- ld-2.12.so 00007f09de9b5000 4 4 4 rw--- [ anon ] 00007fff04ccb000 84 32 32 rw--- [ stack ] 00007fff04df6000 4 4 0 r-x-- [ anon ] ffffffffff600000 4 0 0 r-x-- [ anon ] ---------------- ------ ------ ------ total kB 3294068 188964 186976
  • 52. fuser/lsof Utilities • Displays list of UNIX processes using file-system $ df -k Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/vg_linuxsource-lv_root 14600800 3135856 10720092 23% / tmpfs 4028992 0 4028992 0% /dev/shm /dev/xvda1 487652 132589 329463 29% /boot /dev/xvdf 30832636 28133056 1126716 97% /u01 /dev/xvdg 20511356 4213904 15248876 22% /u02 $ fuser /dev/xvdf /dev/xvdf: 727ctm 725ctm 723ctm 722tm 720ctom 633tom 623tom 462o 458o 456o 454o 452o 450o 448o 446o 444o
  • 53. What is DSTAT? • Monitoring tool for CPU, disk and network activity • Displays ongoing values in interval until q(uit) • To Install: $ yum install dstat –y Or $ sudo apt-get install dstat 53
  • 54. ps Utility • SysV version with many versions and variations: $ ps -eaf % ps -aux # ps –eo opt[,opt…] • Provides info about individual processes • Status, PID, PPID, user, command text and parameters • Cumulative and recent CPU usage • Memory (virtual, resident)
  • 55. ps Utility • An easy home-grown “top” command $ ps –eaf | sort –n | tail root 689 2 0 Oct18 ? 00:00:00 [ext4-dio-unwrit] root 7 2 0 Oct18 ? 00:00:12 [migration/1] root 723 2 0 Oct18 ? 00:01:34 [kauditd] root 781 2 0 Oct18 ? 00:00:18 [flush-253:0] root 8 2 0 Oct18 ? 00:00:00 [stopper/1] root 9 2 0 Oct18 ? 00:00:06 [ksoftirqd/1] root 99 2 0 Oct18 ? 00:00:00 [kdmremove] rpc 1101 1 0 Oct18 ? 00:00:01 rpcbind
  • 56. ps Utility • Another home-grown “top” command • Also displays memory consumption in Kbytes $ ps -eo user,pid,pcpu,vsz,rss,comm | sort -n | tail root 689 0.0 0 0 ext4-dio-unwrit root 7 0.0 0 0 migration/1 root 723 0.0 0 0 kauditd root 781 0.0 0 0 flush-253:0 root 8 0.0 0 0 stopper/1 root 9 0.0 0 0 ksoftirqd/1 root 99 0.0 0 0 kdmremove rpc 1101 0.0 18980 588 rpcbind
  • 57. ps Utility • Displaying environment variable values within a process $ ps -eaf | grep jar delphix 11313 1 0 Oct18 ? 00:23:10 /usr/java/jdk1.7.0_51/bin/java - Djava.util.logging.config.file=/u02/app/apache-tomcat-7.0.42/conf/logging.properties - Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager - Djava.endorsed.dirs=/u02/app/apache-tomcat-7.0.42/endorsed -classpath /u02/app/apache- tomcat-7.0.42/bin/bootstrap.jar:/u02/app/apache-tomcat-7.0.42/bin/tomcat-juli.jar - Dcatalina.base=/u02/app/apache-tomcat-7.0.42 -Dcatalina.home=/u02/app/apache-tomcat-7.0.42 - Djava.io.tmpdir=/u02/app/apache-tomcat-7.0.42/temp org.apache.catalina.startup.Bootstrap start $ ps eww 11313 PID TTY STAT TIME COMMAND 11313 ? Sl 23:10 /usr/java/jdk1.7.0_51/bin/java - Djava.util.logging.config.file=/u02/app/apache-tomcat-7.0.42/conf/logging.properties - Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager - Djava.endorsed.dirs=/u02/app/apache-tomcat-7.0.42/endorsed -classpath /u02/app/apache- tomcat-7.0.42/bin/bootstrap.jar:/u02/app/apache-tomcat-7.0.42/bin/tomcat-juli.jar - Dcatalina.base=/u02/app/apache-tomcat-7.0.42 -Dcatalina.home=/u02/app/apache-tomcat-7.0.42 - Djava.io.tmpdir=/u02/app/apache-tomcat-7.0.42/temp org.apache.catalina.startup.Bootstrap start SHELL=/bin/bash TERM=xterm USER=delphix PATH=/sbin:/usr/sbin:/bin:/usr/bin PWD=/ HOME=/home/delphix SHLVL=3 LOGNAME=delphix _=/usr/java/jdk1.7.0_51/bin/java
  • 58. What is FINDMNT? • A [somewhat] directory tree view of Linux • To Install: $ yum install findmnt –y $ apt-get install findmnt 58
  • 61. What is NCDU? • Quick utility to gather info on space usage in a directory • To install: $ yum install ncdu –y $ apt-get install ncdu Simply execute ncdu command in directory that you wish to gather detailed file/directory sizes on 61
  • 63. Linux for the DBA Summary • Learn to walk before you run • Command line is essential • Utilities are your friends • A few will get you far, choose which ones provide you with what you need. • Build a knowledge of command line editing tools, such as VIM or Nano and Shell scripting to enhance utilities for full coverage. • Tough at first, but will become second nature- I promise! 63
  • 64. Ready to Get Started? Microsoft Azure account will have you on Linux in minutes. A Linux VM or Docker Image with access to an outside network to perform installations of tools and/or software as needed. • Docker for Windows • Docker for Mac • VMWare or VirtualBox
  • 66. Coming up next… Pods, Containers, and SQL Server--What You Need to Know Joey D’Antoni