Basic Linux commands for DBA :

Today in this article we will learn about some basic Linux commands for DBAs that you should know while working that may help to troubleshoot in your daily tasks. Also, it may help in your database architecture, performance, and troubleshooting daily basis issues.

Basic Linux commands for DBA :

1. Server uptime, load average :

uptime

2. CPU Usage :

top
sar1
top command
sar command

3. Disk space usage :

df -kh
Filesystem usage

4. To Check if the inode is Full :

df -ih
inode usage

5. To check if there is any suspicious message coming in OS log

Although as a DBA, normally many DBAs don’t check the OS logs, but it may help as an advanced troubleshooting which lead to reach to our OS admin as well because many times OS issue may lead to DB outage as well. So we can get a idea of what is going on in the server side or if anything went wrong.

tail -500f /var/log/messages
dmesg -T
Basic Linux commands for DBA

6. When the server last rebooted :

last reboot
uptime

last reboot time pf server
7. If server is not reachable
Ping ip-adress of the server or hostname

8. Check connectivity remotely

telnet ip-address or hostname port number

9. Who logged in previously in that server

who
last
last login server

Apart from these also, sometimes we can dig dive performance or network issue through OSwatcher logs from DB end

ps -ef|grep osw


A path will come, go to that directory, you will see below directories :
oswcpuinfo
oswnetstat
oswiostat
oswtop
oswpidstat
oswpidstatd
oswifconfig

Going to the individual directory, we can go through each of the category’s logs and dig dive more.

So here are some of the basic Linux Commands for DBAs. Hope this helps!! Also for further you can follow the Oracle Doc too.

Related Article for Performance Issues:

https://dbapostmortem.com/oracle-database-is-performing-slow/

Leave a Reply