0
(0)

In previous article, we learnt basic Unix commands and in this article we will learn some more Unix commands which would help SQL DBA's for their day to day BAU operation. Please check out my previous article here in case you have not yet visited.

  1. df -h : It shows filesystem usage on the Unix host.

2. du : it can be used to display files and directories usage information.

a) use -h option to display directories with size.

b) use -a option to display files as well as directories with their sizes.

c) use du -sh * |sort -rh to display files and directory sizes in descending order

3. uname :To display Unix flavor detail.

4. /etc/redhat-release :To display Redhat version information of Linux machine.

5. hostname : to display hostname information of Linux machine.

6. hostname -A : to display fully qualified domain name(FQDN) information.

7. who -b : To display last reboot information of Unix machine.

8. uptime : To display last reboot information of Unix machine.

9. last reboot : To display all the previous reboot date/time of Unix machine.

10. grep : it is used to search for specific pattern

File: EmpData.txt

a) grep -i : when -i is used with grep, it ignores case while string matching

b) grep –iE : when E is used with grep, it matches multiple string pattern. egrep is same as grep -E , so it can also be used for multiple pattern search.

11. awk : it is also used in pattern search in given file.

12. top : this command is used to check CPU/Memory usage on OS level along with running processes. In below top output snap, sqlserver process is consuming only 1% CPU.

13. free -g : It will display total/used/free memory along with swap memory on Unix machine. g indicates memory in GB

14. lscpu/nproc : It will display number of CPU cores configured on Linux machine.

15. chage : it will display Unix user last password change/ expiry details along with other useful information.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.