HostedDB - Dedicated UNIX Servers

Securing-Optimizing-RH-Linux-1_2_465
Comments and suggestions concerning this book should be mailed to gmourani@videotron.ca © Copyright 1999-2000 Gerhard Mourani and Open Network Architecture ® 465 Tweaks, Tips and Administration tasks Some of the tips in this section are specific to Linux systems. Most are applicable to UNIX system in general. 1.0  The “du” utility command You can use the "du" utility to estimate file space usage. For example, to determine in megabyte the sizes of the "/var/log/" and "/home/" directories trees, type the following command: [root@deep /]# du -sh /var/log /home 3.5M      /var/log 350M      /home Keep in mind that the above command will report the actual size of your data. Now that you know for example that “/home” is using 350M you can move into it and "du  -sh *" to locate where the largest files are. [root@deep /]# cd /home/ [root@deep /home]# du -sh * 343M      admin 11k       ftp 6.8M      httpd 12k       lost+found 6.0k      named 6.0k      smbclient 6.0k      test 8.0k      www NOTE: You can add to your crontab this command so that every day you get emailed the desire disk space list and you’ll be able to monitor it without logging in constantly. 1.1 Find out the route that the packets sent from your machine to a remote host If you want to find out the route that the packets sent from your machine to a remote host, simply issue the following command: [root@deep /]# traceroute www.redhat.com traceroute to www.portal.redhat.com (206.132.41.202), 30 hops max, 38 byte packets  1  ppp005.108-253-207.mtl.mt.videotron.net (207.253.108.5)  98.584 ms  1519.806 ms  109.911 ms 2  fa5-1-0.rb02-piex.videotron.net (207.96.135.1)  149.888 ms  89.830 ms  109.914 ms 3  ia-tlpt-bb01-fec1.videotron.net (207.253.253.53)  149.896 ms  99.873 ms  139.930 ms 4  ia-cduc-bb02-ge2-0.videotron.net (207.253.253.61)  99.897 ms  169.863 ms  329.926 ms 5  if-4-1.core1.Montreal.Teleglobe.net (207.45.204.5)  409.895 ms  1469.882 ms  109.902 ms 6  if-1-1.core1.NewYork.Teleglobe.net (207.45.223.109)  189.920 ms  139.852 ms  109.939 ms 7  206.132.150.133 (206.132.150.133)  99.902 ms  99.724 ms  119.914 ms 8  pos1-0-2488M.wr2.CLE1.gblx.net (206.132.111.89)  189.899 ms  129.873 ms  129.934 ms 9  pos8-0-2488m.wr2.kcy1.globalcenter.net (206.132.111.82)  169.890 ms  179.884 ms  169.933 ms 10  206.132.114.77 (206.132.114.77)  199.890 ms  179.771 ms  169.928 ms 11  pos8-0-2488M.wr2.SFO1.gblx.net (206.132.110.110)  159.909 ms  199.959 ms  179.837 ms 12  pos1-0-2488M.cr1.SNV2.gblx.net (208.48.118.118)  179.885 ms  309.855 ms  299.937 ms 13  pos0-0-0-155M.hr2.SNV2.gblx.net (206.132.151.46)  329.905 ms  179.843 ms  169.936 ms 14  206.132.41.202 (206.132.41.202)  2229.906 ms  199.752 ms  309.927 ms Where <www.redhat.com> is the name or ip address of the host that you want to trace.